Skip to main content

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 text
  • decode(pieces) - convert tokens back to text
  • decode_ids(ids) - convert ids to text
  • get_vocab_size() - vocabulary size
  • get_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)

Source distribution for burmese-tokenizer 0.1.3
File Size Uploaded
burmese_tokenizer-0.1.3.tar.gz 3.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for burmese-tokenizer 0.1.3
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

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