Burmese Tokenizer
Simple, fast Burmese text tokenization. No fancy stuff, just gets the job done.
Install
pip install burmese-tokenizer
Quick Start
from burmese_tokenizer import BurmeseTokenizer
tokenizer = BurmeseTokenizer()
text = "မင်္ဂလာပါ။ နေကောင်းပါသလား။"
# tokenize
tokens = tokenizer.encode(text)
print(tokens["pieces"])
# ['▁မင်္ဂလာ', '▁ပါ', '။', '▁နေ', '▁ကောင်း', '▁ပါ', '▁သလား', '။']
# decode back
text = tokenizer.decode(tokens["pieces"])
print(text)
# မင်္ဂလာပါ။ နေကောင်းပါသလား။
CLI
# tokenize
burmese-tokenizer "မင်္ဂလာပါ။"
# show details
burmese-tokenizer -v "မင်္ဂလာပါ။"
# decode tokens
burmese-tokenizer -d -t "▁မင်္ဂလာ,▁ပါ,။"
API
encode(text)- tokenize textdecode(pieces)- convert tokens back to textdecode_ids(ids)- convert ids to textget_vocab_size()- vocabulary sizeget_vocab()- full vocabulary
Links
License
MIT - Do whatever you want with it.
Metadata
Release files for burmese-tokenizer 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| burmese_tokenizer-0.1.3.tar.gz | 3.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| burmese_tokenizer-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.5 kB
Release files / burmese_tokenizer-0.1.3.tar.gz
| Download URL | burmese_tokenizer-0.1.3.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d7096e0f67635c9d50e6d2d5851d196c981d49beca87e68472e3a89b68a0100
|
|
BLAKE2b-256 checksum How to use checksums |
81833d329f08f486d6a8f332d99de232cca62ed25aab4e37bad1886096e7dd14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.8.13
|
Release files / burmese_tokenizer-0.1.3-py3-none-any.whl
| Download URL | burmese_tokenizer-0.1.3-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4d65ea467d57e7ea1d1a55ccd12e6de6c1c7d787f1a081fd5b336509bc04c68
|
|
BLAKE2b-256 checksum How to use checksums |
0c49b48277f7b90e58198a82b01642fae29ec1ba7e8e33a2672a823d1a56667a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.8.13
|