Skip to main content

CLAWS Tokenizer: Cluster Level Aggregation Khmer Word Segmentation

PyPI version Python Versions License: MIT

Claws is a lightweight, fast Khmer word segmentation and tokenization library for Python powered by LiteRT (formerly TensorFlow Lite runtime).


Features

  • Accurate Khmer Segmentation: Handles zero-width spaces, compound words, and standard continuous Khmer script.
  • Lightweight & Fast: Uses LiteRT for fast inference with minimal runtime overhead.
  • Zero Heavy Dependencies: Requires only numpy and ai-edge-litert.
  • Pre-packaged Model: Pre-trained model and vocabulary files are bundled directly inside the wheel.

Installation

Install via pip:

pip install claws-tokenizer

Quick Start

from claws_tokenizer import segment

tokens = segment("ខ្ញុំស្រឡាញ់ភាសាខ្មែរ")
print(tokens)
# Output: ['ខ្ញុំ', 'ស្រឡាញ់', 'ភាសា', 'ខ្មែរ']

Citation

If you use Claws in your research, please cite it as follows:

BibTeX

@software{claws_tokenizer,
  author = {Socret Lee},
  title = {CLAWS Tokenizer: Cluster Level Aggregation Khmer Word Segmentation},
  year = {2026},
  url = {[https://github.com/Socret360/claws](https://github.com/Socret360/claws)},
  version = {0.1.0}
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claws_tokenizer-0.1.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claws_tokenizer-0.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file claws_tokenizer-0.1.0.tar.gz.

File metadata

  • Download URL: claws_tokenizer-0.1.0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.9

File hashes

Hashes for claws_tokenizer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0e7b0a278ee076d98daf230b02220efcf19cd36a67e7f9108142e404337b1c0f
MD5 2ad200e70710be975228eabf56a40374
BLAKE2b-256 ff5b447c75f71da8ce00603832d2463ea32f3e18f0bff2e60acb82297043283a

See more details on using hashes here.

File details

Details for the file claws_tokenizer-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for claws_tokenizer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 412195c7cd192a6e15a9634ade142d6e13e2384b71d1cda5fdd14821d5bfb567
MD5 08d8743191885918c273cebd552b0383
BLAKE2b-256 3343e49c8a7a6b6844be9ed69250cf7163aacf91fc4d728a2325d1bf732d0f31

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.2

2 files

0.1.1

2 files

This release

0.1.0 This release

2 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