Thai abbreviation to full text library
Project description
KhamYo : คำย่อ
Thai abbreviation to full text tool
Install
pip install khamyo
How to use
just call replace function and use it!!!
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) |
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:
@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}
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file khamyo-0.3.0.tar.gz.
File metadata
- Download URL: khamyo-0.3.0.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26d86767cfa2f17ce16000e0b16cc025458c45e079945573f9c69b31db00efa5
|
|
| MD5 |
41bc923d1180c56378aa348e9207d8ee
|
|
| BLAKE2b-256 |
32660b164edaa3f66ba48ef7aebc8dc01bbf724a87f365ca8e3ee2988b8ed40c
|
File details
Details for the file KhamYo-0.3.0-py3-none-any.whl.
File metadata
- Download URL: KhamYo-0.3.0-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6de53eb748ee3049820aa923bc3198527ef34c42bb62f33e1ccb84afa610375e
|
|
| MD5 |
d2582dd0307f0a620c6e8afc48b9e6b2
|
|
| BLAKE2b-256 |
4d4db35f8fe6a359c4b339a4250f8a45c7a4e3cf0057111240d854a92741d0e5
|