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 MIT 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.0a8

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 8 scope

The PyPI 0.1.0a8 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 8 release record for artifact details.


License

Original code is MIT licensed. 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.0a8

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.0a8
File Size Uploaded Provenance Actions
tamil_toolkit-0.1.0a8.tar.gz 465.4 kB With provenance Details for tamil_toolkit-0.1.0a8.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for tamil-toolkit 0.1.0a8
File Interpreter ABI Platform Actions
tamil_toolkit-0.1.0a8-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for tamil_toolkit-0.1.0a8-cp311-abi3-win_amd64.whl
tamil_toolkit-0.1.0a8-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.0a8-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
tamil_toolkit-0.1.0a8-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for tamil_toolkit-0.1.0a8-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 6.7 MB

Release files / tamil_toolkit-0.1.0a8.tar.gz

Download URL tamil_toolkit-0.1.0a8.tar.gz
Size 465.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d26a593f3498473c05b0a3b60ef1aceb61936d8aa1f01f9c1f033962e15d54d7
BLAKE2b-256 checksum
How to use checksums
32e2a58f2c618119b6e1c25828ff53dd8fece4f3acb1af0397fe3c1dbc2294b6
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 20, 2026.

Transparency log

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

Download URL tamil_toolkit-0.1.0a8-cp311-abi3-win_amd64.whl
Size 1.9 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
fa68490e51fd108eaafb8351ec9a2bc4953bd07eb585638ab22b0e0774afb26a
BLAKE2b-256 checksum
How to use checksums
aaeb35e50dd354998b740164e2fde0dadce1ea50c0dc6906d8d4ef70c8a68a9a
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 20, 2026.

Transparency log

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

Download URL tamil_toolkit-0.1.0a8-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 2.3 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
9c732d6c175544a51fe76771b76f86dff6715efc00ecbe210e73332aeca337f1
BLAKE2b-256 checksum
How to use checksums
30aec144c6cf64c9805534eac245341acf664c6aca64a845939f684d6fe26a97
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 20, 2026.

Transparency log

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

Download URL tamil_toolkit-0.1.0a8-cp311-abi3-macosx_11_0_arm64.whl
Size 2.0 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4c17489f280d32bfcd7b9cfbf930929e59900e0205394fe23f788811f521222c
BLAKE2b-256 checksum
How to use checksums
9bdec9d0b44f4fb5fc4b86a25d5b7d023ec233ca6630721adff0106a6c03986c
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 20, 2026.

Transparency log

Security for tamil-toolkit 0.1.0a8

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.0a8.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 20, 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