Skip to main content

tojiki

CI

Open-source tools for the Tajik language (забони тоҷикӣ), written in pure Python with no dependencies.

Tajik is spoken by about 10 million people, yet developers building apps, search, chat bots and AI products for Tajik speakers have almost no open tooling. tojiki is a small, well-tested foundation for that work.

Features

Feature Example
Cyrillic → Latin Тоҷикистон → Tojikiston
Latin → Cyrillic Dushanbe → Душанбе
Numbers → words 2026 → ду ҳазору бисту шаш
Ordinals 2 → дуюм, 30 → сиюм
Text normalization fixes Latin o hidden in Тoҷик, Kazakh һ → ҳ, combining macrons → ӣ

Install

pip install git+https://github.com/BAHROMTJ/tojiki.git

Usage

from tojiki import to_latin, to_cyrillic, to_words, to_ordinal, normalize

to_latin("Хуҷанд")                 # 'Khujand'
to_latin("Кӯлоб", ascii_only=True)  # 'Kulob'
to_cyrillic("Ghafurov")            # 'Ғафуров'
to_words(125)                      # 'саду бисту панҷ'
to_ordinal(21)                     # 'бисту якум'
normalize("Тoҷик")                 # 'Тоҷик'  (the "o" was Latin)

Command line:

tojiki latin "Забони тоҷикӣ"
tojiki number 2026
tojiki number --ordinal 3
echo "һафта" | tojiki normalize

Why normalization matters

Tajik text on the web is often typed on Russian or Kazakh keyboards, so words contain characters that look identical but are different Unicode letters. Two strings that look the same then fail to match in search, databases and AI pipelines. normalize() fixes the most common cases without touching words that are genuinely written in Latin script.

Roadmap

  • Tajik Cyrillic ↔ Perso-Arabic script
  • Restore Tajik letters typed on a Russian keyboard (х → ҳ, к → қ) using a word list
  • Tokenizer and stop-word list
  • Number words → integers
  • JavaScript port

Contributions are welcome — see CONTRIBUTING.md.

Development

python -m unittest discover -s tests

Бо забони тоҷикӣ

tojiki — китобхонаи кушода (open source) барои кор бо забони тоҷикӣ: табдили хат (кириллӣ ↔ лотинӣ), навиштани рақамҳо бо калима ва тоза кардани матн аз ҳарфҳои ба ҳам монанд. Ҳар кас метавонад бепул истифода барад ва дар рушди он саҳм гузорад.

License

MIT

Metadata

Release files for tojiki 0.1.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 tojiki 0.1.0
File Size Uploaded
tojiki-0.1.0.tar.gz 9.8 kB Details

Built distribution (wheel)

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

Total release size: 18.6 kB

Release files / tojiki-0.1.0.tar.gz

Download URL tojiki-0.1.0.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3758de91f0de950673bbc9069db66a9a438aa2ad82fb6b872ba594d1b8da35ea
BLAKE2b-256 checksum
How to use checksums
6bba2f9831f4a1397f144f8311f911b02d2635311f2070cab9788140a7481787
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release files / tojiki-0.1.0-py3-none-any.whl

Download URL tojiki-0.1.0-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f90b805cbfa9ca1b8c12e0bfb65e539606f153387d6dfbe015ac595f33cfc000
BLAKE2b-256 checksum
How to use checksums
c5764e3f64c68eab28c5b1a9650e5f866365fbe6e0b2802df8030eecd7c823a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

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