Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

tamil-toolkit for Python

High-Performance Tamil NLP, Text Processing & Unicode Library for Python

Blazing fast Rust-backed Tamil NLP · Grapheme & Syllable segmentation · Agara varisai sorting · Legacy font conversion (Bamini, TSCII, TAB, TAM, Vanavil) · Currency & Numerals · Panchangam calendar

PyPI version PyPI monthly downloads CI Apache-2.0 license Python 3.11+ CPython abi3

Install · Quick Start · Key Capabilities · Feature Comparison · Documentation · License


tamil-toolkit is the premier, high-performance Tamil language and NLP library for Python 3.11+. Powered under the hood by memory-safe, zero-cost Rust abstractions, it brings deterministic, microsecond-level Tamil computational linguistics to Python data scientists, NLP researchers, web developers, and automation engineers.

Pre-built binary wheels using the stable CPython abi3 interface are provided for Windows, macOS (Apple Silicon and Intel x86_64), and Linux. Installation is instantaneous with zero compiler dependencies.


What is Included

Domain Python Capabilities
🔤 Unicode & Letters NFC/NFD normalization, tailored Tamil letter segmentation (get_letters), Mei/Uyir splitting, and scalar inspection. Correctly handles ligatures like க்ஷ and ஸ்ரீ.
🎵 Phonology & Prosody Tholkappiyam-grounded phonology: exact mora (Maathirai) duration calculation, letter quantity classification (is_kuril, is_nedil, is_mei, is_otru, is_aytham), stop-nasal cognates (Ina Ezhuthu via get_cognate, are_cognates), and zero-allocation syllable nuclei (Olippasai).
🔄 Legacy Font Transcoder Universal bidirectional transcoding between Unicode and legacy Tamil encoding formats: Bamini, TSCII, TAB, TAM, Anjal, Vanavil Avvaiyar, and LT-TM / IndoWord.
🔠 Agara Varisai Collation Traditional Tamil dictionary alphabetical sorting (Agara Varisai) with stable Mei-first collation order and versioned sort/search keys.
🔢 Numerals & Currency Bounded Tamil Nadu (ta-IN) and Sri Lankan (ta-LK) number-to-words conversion, exact financial currency formatting (INR/LKR) with zero floating-point drift, rational fractions, and Gregorian civil dates.
📅 Solar Calendar & Panchangam Classical Thirukanitham Drik and 1962 Vākyakaraṇa calendar models: Gregorian ↔ Tamil solar date conversion, 60-year Jovian cycles, and five-limb astronomical panchangam calculations.

Why tamil-toolkit for Python?

Unlike legacy pure-Python packages (such as open-tamil), tamil-toolkit is engineered for production workloads:

  • ⚡ 10x to 50x Faster: Core algorithms run in compiled Rust via the C-ABI with zero Python interpreter overhead.
  • 🎯 Linguistic Accuracy: Adheres strictly to Unicode UAX #29, CLDR 49, and classical grammatical treatises (Tolkappiyam).
  • 🛡️ Zero Floating Point Drift: Currency formatting uses exact integer minor-unit math (e.g. paisa/cents) rather than imprecise IEEE-754 floats.
  • 📦 Instant Installation: Pre-compiled binary wheels for all major platforms (Windows, macOS x86_64/ARM64, Linux glibc/musl).

Install

python -m pip install tamil-toolkit==0.1.0a9

Quick Start

1. Accurate Tamil Letter Segmentation

Python's built-in len() or string slicing breaks compound Tamil grapheme clusters. tamil-toolkit treats each Tamil letter (including vowel modifiers and atomic ligatures like க்ஷ and ஸ்ரீ) as a unified glyph:

import tamil_toolkit as tamil

text = "தமிழ்நாடு"
letters = tamil.get_letters(text)
print("Letter count:", len(letters))  # 5 (not 10!)
print("Letters:", letters)            # ['த', 'மி', 'ழ்', 'நா', 'டு']

# Correct handling of complex Grantha ligatures
shree = "ஸ்ரீலங்கா"
print(tamil.get_letters(shree))       # ['ஸ்ரீ', 'ல', 'ங்', 'கா']

2. Legacy Font Transcoder (Bamini, TSCII, TAB, TAM, Vanavil)

Convert legacy digitized archives, PDF extractions, and older websites into modern Unicode:

import tamil_toolkit as tamil

# Bamini font to Unicode
bamini_text = "jkpo;ehL"
unicode_text = tamil.bamini_to_unicode(bamini_text)
print(unicode_text)  # தமிழ்நாடு

# Unicode back to Bamini
print(tamil.unicode_to_bamini("வணக்கம்"))  # tzf;fk;

# Advanced transcoders via the unified execute() dispatcher
# TSCII bytes to Unicode:
tscii_data = [0xba, 0xa2, 0xc5, 0xfd]
restored = tamil.execute({
    "op": "tscii_bytes_to_unicode",
    "input": {"bytes": tscii_data}
})
print("From TSCII:", restored)

# Vanavil Avvaiyar font to Unicode:
vanavil_result = tamil.execute({
    "op": "vanavil_text_to_unicode",
    "input": {"text": "jkpo;"}
})

3. Number to Tamil Words & Cheque Currency Formatting

Format numbers for banking, legal cheques, invoices, and formal documents:

import tamil_toolkit as tamil

# Exact currency formatting without floating-point errors (input in minor units: cents/paisa)
# 102550 minor units = 1,025.50
inr = tamil.format_currency(102550, "INR", "TN")
print("Tamil Nadu INR:", inr)  # INR 1,025.50

lkr = tamil.format_currency(102550, "LKR", "SL")
print("Sri Lanka LKR:", lkr)   # LKR 1,025.50

# Rational fraction formatting
print(tamil.format_fraction(2, 4))  # 1/2

4. Agara Varisai Dictionary Collation

Sort lists and datasets according to traditional Tamil lexicographical ordering:

import tamil_toolkit as tamil

words = ["ஆப்பிள்", "அணில்", "ஔவையார்", "இலை", "ஈட்டி", "உரல்"]
sorted_words = tamil.sort_words(words)
print("Agara Varisai:", sorted_words)
# Output: ['அணில்', 'ஆப்பிள்', 'இலை', 'ஈட்டி', 'உரல்', 'ஔவையார்']

# Compare two words
print(tamil.compare("அம்மா", "அப்பா"))  # -1 (அம்மா comes before அப்பா)

5. Phonology, Mora (Maathirai) & Cognates (Ina Ezhuthu)

Analyze poetic prosody and phonetic properties:

import tamil_toolkit as tamil

# Letter Quantity Classification
assert tamil.is_kuril("அ") == True
assert tamil.is_nedil("ஆ") == True
assert tamil.is_mei("க்") == True
assert tamil.is_otru("க்") == True
assert tamil.is_aytham("ஃ") == True

# Exact Mora (Maathirai) calculation
# த (1.0) + மி (1.0) + ழ் (0.5) = 2.5
mora = tamil.baseline_maathirai("தமிழ்")
print("Maathirai for 'தமிழ்':", mora)  # 2.5

# Homorganic Stop-Nasal Cognates (Ina Ezhuthu)
assert tamil.get_cognate("க்") == "ங்"
assert tamil.get_cognate("ச்") == "ஞ்"
assert tamil.get_cognate("தூ") == "நூ"
assert tamil.are_cognates("ட்", "ண்") == True

Alpha 9 scope

The PyPI 0.1.0a9 package includes the capabilities listed above. The shared execute API exposes lt_tm_codes_to_unicode, lt_tm_text_to_unicode, unicode_to_lt_tm_codes, and unicode_to_lt_tm_text. LT-TM conversion handles selected 16-bit code sequences; it does not parse PDFs, select font runs, or detect encodings. The profile does not claim complete historical-font coverage. APIs may change.

Other planned linguistic modules, the private PDF extraction utility, and Dart/Pub distribution are not published.

import tamil_toolkit as tamil

codes = tamil.execute({"op": "unicode_to_lt_tm_codes", "input": {"text": "தமிழ்"}})
text = tamil.execute({"op": "lt_tm_codes_to_unicode", "input": {"codes": codes}})

Author & Maintainer

Abishtakan Sivachandrathevan (@abishtakan)


Documentation

The wheels target CPython 3.11+ through the stable abi3 interface. Source builds require Rust 1.85+. See the alpha 9 release record for artifact details.


License

Original code is Apache-2.0 licensed (see NOTICE). Bundled data and mappings retain their recorded terms in the third-party notices.


Keywords & Search Queries

tamil nlp python, python tamil text processing, bamini to unicode python, tscii to unicode converter python, tamil numerals spellout python, tamil sort agara varisai, tamil letter segmentation python, tamil panchangam calendar python, tamil unicode normalizer, open-tamil alternative, fast tamil library python.

Metadata

Release files for tamil-toolkit 0.1.0a9

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

Source distribution (sdist)

Source distribution for tamil-toolkit 0.1.0a9
File Size Uploaded Provenance Actions
tamil_toolkit-0.1.0a9.tar.gz 536.7 kB With provenance Details for tamil_toolkit-0.1.0a9.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for tamil-toolkit 0.1.0a9
File Interpreter ABI Platform Actions
tamil_toolkit-0.1.0a9-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for tamil_toolkit-0.1.0a9-cp311-abi3-win_amd64.whl
tamil_toolkit-0.1.0a9-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details for tamil_toolkit-0.1.0a9-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
tamil_toolkit-0.1.0a9-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for tamil_toolkit-0.1.0a9-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 7.0 MB

Release files / tamil_toolkit-0.1.0a9.tar.gz

Download URL tamil_toolkit-0.1.0a9.tar.gz
Size 536.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ef22be9041c9151bbef240221c45468cfc63e646d998f64c6b5e7f145b88f193
BLAKE2b-256 checksum
How to use checksums
35e6261bb83efc1247acc97942c443c1eb17e81a9a5c782577d23d776afb2038
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 22, 2026.

Transparency log

Release files / tamil_toolkit-0.1.0a9-cp311-abi3-win_amd64.whl

Download URL tamil_toolkit-0.1.0a9-cp311-abi3-win_amd64.whl
Size 2.0 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
972d434cade51a026dbc212ffaf726bda951471ac866c3aa93549ae55170ff89
BLAKE2b-256 checksum
How to use checksums
f1124eea51d329801f7f006f28ceb48f8999c8513b2c8f97cc3c88b91ac699a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 22, 2026.

Transparency log

Release files / tamil_toolkit-0.1.0a9-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL tamil_toolkit-0.1.0a9-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 2.4 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
e2033702318c558b8c0e8816fd63c294a4a4e9c9078291940c10e9238884b118
BLAKE2b-256 checksum
How to use checksums
e957c7a1478b37a48d59cc2cf23dd620ddd672db8248adb49b05caf0ab103ed5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 22, 2026.

Transparency log

Release files / tamil_toolkit-0.1.0a9-cp311-abi3-macosx_11_0_arm64.whl

Download URL tamil_toolkit-0.1.0a9-cp311-abi3-macosx_11_0_arm64.whl
Size 2.1 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
83b67040196979fbfa98db26fd902cc8d8c08ecc9ede9bf25d1b2114e505bd77
BLAKE2b-256 checksum
How to use checksums
ef7ab69f00eebaa911aa52bb4832e645e8cbe3c7a49420c6b30c188bfa807566
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 22, 2026.

Transparency log

Security for tamil-toolkit 0.1.0a9

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.

Full provenance

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for tamil_toolkit-0.1.0a9.tar.gz

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 Nov 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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