Skip to main content

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}
}

Metadata

Release files for KhamYo 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for KhamYo 0.3.0
File Size Uploaded
khamyo-0.3.0.tar.gz 14.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for KhamYo 0.3.0
File Interpreter ABI Platform
KhamYo-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 27.7 kB

Release files / khamyo-0.3.0.tar.gz

Download URL khamyo-0.3.0.tar.gz
Size 14.1 kB
Tags Source
SHA-256 checksum
How to use checksums
26d86767cfa2f17ce16000e0b16cc025458c45e079945573f9c69b31db00efa5
BLAKE2b-256 checksum
How to use checksums
32660b164edaa3f66ba48ef7aebc8dc01bbf724a87f365ca8e3ee2988b8ed40c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Release files / KhamYo-0.3.0-py3-none-any.whl

Download URL KhamYo-0.3.0-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6de53eb748ee3049820aa923bc3198527ef34c42bb62f33e1ccb84afa610375e
BLAKE2b-256 checksum
How to use checksums
4d4db35f8fe6a359c4b339a4250f8a45c7a4e3cf0057111240d854a92741d0e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page