# KhamYo : คำย่อ
Thai abbreviation to full text tool
## Install
> pip install khamyo
## How to use
just call replace function and use it!!!
```python
from khamyo import replace
print(replace("ตอนที่ผมเป็นครูอัตราจ้าง ไปอยู่เวรที่รร.ทุกวัน จนกระทั่งได้บรรจุรับราชการเป็นครู จากนั้นได้เลื่อนตำแหน่งเป็นครูใหญ่รร."))
# output: [
# ('ตอนที่ผมเป็นครูอัตราจ้าง ไปอยู่เวรที่โรงเรียนทุกวัน จนกระทั่งได้บรรจุรับราชการเป็นครู จากนั้นได้เลื่อนตำแหน่งเป็นครูใหญ่โรงเรียน',
# tensor(0.9713)),
# ('ตอนที่ผมเป็นครูอัตราจ้าง ไปอยู่เวรที่โรงเรียนทุกวัน จนกระทั่งได้บรรจุรับราชการเป็นครู จากนั้นได้เลื่อนตำแหน่งเป็นครูใหญ่โรงแรม',
# tensor(0.9595))
# ]
```
## How to work
I use Thai abbreviation dictionary for replace text abbreviation to full text (all possibility) and I use wangchanberta pretrained for Sentence Transformer than chose 2 top-k best results.
You can customize dictionary at ```khamyo/data.json```.
## Licenses
| | License |
|:---|:----|
| Source Code and Notebooks | Apache Software License 2.0 |
| Corpora | [Creative Commons Zero 1.0 Universal Public Domain Dedication License (CC0)](https://creativecommons.org/publicdomain/zero/1.0/)|
## Citations
If you use `KhamYo: Thai abbreviation to full text tool` in your project or publication, please cite the library as follows
```
Wannaphong Phatthiyaphaibun. (2021, July 8). KhamYo: Thai abbreviation to full text tool. GitHub. https://github.com/wannaphong/KhamYo
```
or BibTeX entry:
``` bib
@misc{wannaphong,
author = {Wannaphong Phatthiyaphaibun},
title = {{KhamYo: Thai abbreviation to full text tool}},
month = July,
year = 2021,
publisher = {GitHub},
url = {https://github.com/wannaphong/KhamYo}
}
```
Raw data
{
"_id": null,
"home_page": "https://github.com/wannaphong/KhamYo",
"name": "KhamYo",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "NLP, natural language processing, text analytics, text processing, localization, computational linguistics, ThaiNLP, Thai NLP, Thai language",
"author": "Wannaphong Phatthiyaphaibun",
"author_email": "wannaphong@yahoo.com",
"download_url": "https://files.pythonhosted.org/packages/32/66/0b164edaa3f66ba48ef7aebc8dc01bbf724a87f365ca8e3ee2988b8ed40c/khamyo-0.3.0.tar.gz",
"platform": null,
"description": "# KhamYo : \u0e04\u0e33\u0e22\u0e48\u0e2d\nThai abbreviation to full text tool\n\n## Install\n\n> pip install khamyo\n\n## How to use\n\njust call replace function and use it!!!\n\n```python\nfrom khamyo import replace\n\nprint(replace(\"\u0e15\u0e2d\u0e19\u0e17\u0e35\u0e48\u0e1c\u0e21\u0e40\u0e1b\u0e47\u0e19\u0e04\u0e23\u0e39\u0e2d\u0e31\u0e15\u0e23\u0e32\u0e08\u0e49\u0e32\u0e07 \u0e44\u0e1b\u0e2d\u0e22\u0e39\u0e48\u0e40\u0e27\u0e23\u0e17\u0e35\u0e48\u0e23\u0e23.\u0e17\u0e38\u0e01\u0e27\u0e31\u0e19 \u0e08\u0e19\u0e01\u0e23\u0e30\u0e17\u0e31\u0e48\u0e07\u0e44\u0e14\u0e49\u0e1a\u0e23\u0e23\u0e08\u0e38\u0e23\u0e31\u0e1a\u0e23\u0e32\u0e0a\u0e01\u0e32\u0e23\u0e40\u0e1b\u0e47\u0e19\u0e04\u0e23\u0e39 \u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19\u0e44\u0e14\u0e49\u0e40\u0e25\u0e37\u0e48\u0e2d\u0e19\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e40\u0e1b\u0e47\u0e19\u0e04\u0e23\u0e39\u0e43\u0e2b\u0e0d\u0e48\u0e23\u0e23.\"))\n# output: [\n# ('\u0e15\u0e2d\u0e19\u0e17\u0e35\u0e48\u0e1c\u0e21\u0e40\u0e1b\u0e47\u0e19\u0e04\u0e23\u0e39\u0e2d\u0e31\u0e15\u0e23\u0e32\u0e08\u0e49\u0e32\u0e07 \u0e44\u0e1b\u0e2d\u0e22\u0e39\u0e48\u0e40\u0e27\u0e23\u0e17\u0e35\u0e48\u0e42\u0e23\u0e07\u0e40\u0e23\u0e35\u0e22\u0e19\u0e17\u0e38\u0e01\u0e27\u0e31\u0e19 \u0e08\u0e19\u0e01\u0e23\u0e30\u0e17\u0e31\u0e48\u0e07\u0e44\u0e14\u0e49\u0e1a\u0e23\u0e23\u0e08\u0e38\u0e23\u0e31\u0e1a\u0e23\u0e32\u0e0a\u0e01\u0e32\u0e23\u0e40\u0e1b\u0e47\u0e19\u0e04\u0e23\u0e39 \u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19\u0e44\u0e14\u0e49\u0e40\u0e25\u0e37\u0e48\u0e2d\u0e19\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e40\u0e1b\u0e47\u0e19\u0e04\u0e23\u0e39\u0e43\u0e2b\u0e0d\u0e48\u0e42\u0e23\u0e07\u0e40\u0e23\u0e35\u0e22\u0e19',\n# tensor(0.9713)),\n# ('\u0e15\u0e2d\u0e19\u0e17\u0e35\u0e48\u0e1c\u0e21\u0e40\u0e1b\u0e47\u0e19\u0e04\u0e23\u0e39\u0e2d\u0e31\u0e15\u0e23\u0e32\u0e08\u0e49\u0e32\u0e07 \u0e44\u0e1b\u0e2d\u0e22\u0e39\u0e48\u0e40\u0e27\u0e23\u0e17\u0e35\u0e48\u0e42\u0e23\u0e07\u0e40\u0e23\u0e35\u0e22\u0e19\u0e17\u0e38\u0e01\u0e27\u0e31\u0e19 \u0e08\u0e19\u0e01\u0e23\u0e30\u0e17\u0e31\u0e48\u0e07\u0e44\u0e14\u0e49\u0e1a\u0e23\u0e23\u0e08\u0e38\u0e23\u0e31\u0e1a\u0e23\u0e32\u0e0a\u0e01\u0e32\u0e23\u0e40\u0e1b\u0e47\u0e19\u0e04\u0e23\u0e39 \u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19\u0e44\u0e14\u0e49\u0e40\u0e25\u0e37\u0e48\u0e2d\u0e19\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e40\u0e1b\u0e47\u0e19\u0e04\u0e23\u0e39\u0e43\u0e2b\u0e0d\u0e48\u0e42\u0e23\u0e07\u0e41\u0e23\u0e21',\n# tensor(0.9595))\n# ]\n```\n\n## How to work\n\nI use Thai abbreviation dictionary for replace text abbreviation to full text (all possibility) and I use wangchanberta pretrained for Sentence Transformer than chose 2 top-k best results.\n\nYou can customize dictionary at ```khamyo/data.json```.\n\n## Licenses\n\n| | License |\n|:---|:----|\n| Source Code and Notebooks | Apache Software License 2.0 |\n| Corpora | [Creative Commons Zero 1.0 Universal Public Domain Dedication License (CC0)](https://creativecommons.org/publicdomain/zero/1.0/)|\n\n## Citations\n\nIf you use `KhamYo: Thai abbreviation to full text tool` in your project or publication, please cite the library as follows\n\n```\nWannaphong Phatthiyaphaibun. (2021, July 8). KhamYo: Thai abbreviation to full text tool. GitHub. https://github.com/wannaphong/KhamYo\n```\n\nor BibTeX entry:\n\n``` bib\n@misc{wannaphong,\n author = {Wannaphong Phatthiyaphaibun},\n title = {{KhamYo: Thai abbreviation to full text tool}},\n month = July,\n year = 2021,\n publisher = {GitHub},\n url = {https://github.com/wannaphong/KhamYo}\n}\n```\n",
"bugtrack_url": null,
"license": "Apache Software License 2.0",
"summary": "Thai abbreviation to full text library",
"version": "0.3.0",
"project_urls": {
"Bug Tracker": "https://github.com/wannaphong/KhamYo/issues",
"Homepage": "https://github.com/wannaphong/KhamYo",
"Source Code": "https://github.com/wannaphong/KhamYo"
},
"split_keywords": [
"nlp",
" natural language processing",
" text analytics",
" text processing",
" localization",
" computational linguistics",
" thainlp",
" thai nlp",
" thai language"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4d4db35f8fe6a359c4b339a4250f8a45c7a4e3cf0057111240d854a92741d0e5",
"md5": "d2582dd0307f0a620c6e8afc48b9e6b2",
"sha256": "6de53eb748ee3049820aa923bc3198527ef34c42bb62f33e1ccb84afa610375e"
},
"downloads": -1,
"filename": "KhamYo-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d2582dd0307f0a620c6e8afc48b9e6b2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 13600,
"upload_time": "2024-09-04T14:24:53",
"upload_time_iso_8601": "2024-09-04T14:24:53.624908Z",
"url": "https://files.pythonhosted.org/packages/4d/4d/b35f8fe6a359c4b339a4250f8a45c7a4e3cf0057111240d854a92741d0e5/KhamYo-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "32660b164edaa3f66ba48ef7aebc8dc01bbf724a87f365ca8e3ee2988b8ed40c",
"md5": "41bc923d1180c56378aa348e9207d8ee",
"sha256": "26d86767cfa2f17ce16000e0b16cc025458c45e079945573f9c69b31db00efa5"
},
"downloads": -1,
"filename": "khamyo-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "41bc923d1180c56378aa348e9207d8ee",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 14143,
"upload_time": "2024-09-04T14:24:54",
"upload_time_iso_8601": "2024-09-04T14:24:54.691000Z",
"url": "https://files.pythonhosted.org/packages/32/66/0b164edaa3f66ba48ef7aebc8dc01bbf724a87f365ca8e3ee2988b8ed40c/khamyo-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-04 14:24:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "wannaphong",
"github_project": "KhamYo",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "khamyo"
}