Skip to main content

Kokborok (Kókborok) Language Library for Python

PyPI Version Python Version License: MIT Language

Kokborok (Kókborok) is the first-ever comprehensive, standard-library-style Python NLP and linguistic preservation toolkit for Kokborok (Tripuri)—the official Sino-Tibetan / Bodo-Garo language of the state of Tripura in Northeast India.

Built with 500,000 quadri-lingual headwords (Kokborok-English-Hindi-Bengali), 180 classical and descriptive grammar rules and validation engine, dynamic generation of 1,600,000+ morphological inflections, complete cultural compendiums (attire, clans, cuisine, deities, folklore, geography, idioms, music, botany, wildlife, rituals, sacred sites, songs), Roman <-> Bengali script transliteration, semantic numeral classifiers, and audio synthesis.


🌟 Key Features

  1. 500,000+ Quadri-lingual Dictionary: Curated and book-extracted vocabulary with definitions in Kokborok, English, Hindi, and Bengali, supporting unhyphenated fast lookup and morphological root fallbacks.
  2. Classical Grammar Rules Engine (kokborok.grammar.rules): 180 classical grammar rules spanning phonology, nominal agreement, case postpositions, verbal TAM morphology, negation, valency/voice, syntax, and reduplication/expressives with automated clause diagnostics.
  3. 1,600,000+ Morphological Inflections: Decomposes and generates verbal aspects (-kha, -nai, -tong, -ya, -liya, -yakhw, -glak), nominal case postpositions (-no, -ni, -o, -bai, -ni-simi, -ha, -sog, -hai), and adjectival prefixation (kw- / k-).
  4. Comprehensive Cultural Heritage Subsystems:
    • Attire & Handloom: Rignai, Risa, Rikutu, Kamchwlwi, Takborok, Chamathwi Bar weaving motifs.
    • Clans & Tribes: 19 indigenous tribes and clans of Tripura (Debbarma, Reang/Bru, Jamatia, Noatia, Kalai, Murasing, Halam, Uchoi, Chakma, Mog, Garo, Lushai).
    • Cuisine: Berma, Chakhwi (zero-oil alkaline stew), Gudok, Mosdeng, Bangui, Mwkhwi, Wahan Mosdeng.
    • Deities: Subrai, Baba Garia, Mailuma, Khuluma, Tuibuma, Lampra, Ker, Chaturdasha Devata.
    • Folklore: Chethwang, Subrai creation of the hills, Haithathorani, Dumbur waterfall legend, Champaknagar lore.
    • Sacred Geography: Longtharai Hills, Jampui Hills, Baramura, Gomati River, Saidra (Howrah), Dumbur Lake, Unakoti, Neermahal, Ujjayanta Palace, Matabari.
    • Idioms & Sayings: Authentic Kokborok idioms and metaphors (Kok-Hajakma).
    • Music & Dance: Kham, Sumui, Sarinda, Chongpreng, Dangdu; Hojagiri dance, Garia dance, Lebang Boomani.
    • Botany & Wildlife: Muli bamboo (Melocanna baccifera), Muya shoots, Chundri herb; Phayre's leaf monkey, Green Imperial Pigeon, Hoolock gibbon, Clouded leopard.
    • Rituals & Sacred Sites: Ochai shamanic priesthood, Chukbar wedding, Risa Sormani rite of passage; Unakoti rock carvings, Tripura Sundari Matabari.
    • Folk Songs: Jaduni romantic hill ballads, Baba Garia processional chants, Hojagiri dance songs, lullabies.
  5. Digitized Books & Whole-Book Literature Library (kokborok.books): 225 authentic, public-domain Kokborok books (32,995 pages, 9,229,226 words) digitized page-by-page from the Ministry of Tribal Affairs and DLI, with in-book and cross-book search.
  6. Roman & Bengali Script Support: High-accuracy bidirectional transliteration between official Roman Kokborok orthography and Bengali-Assamese script.
  7. Tone & Syllable Engine: High-tone pitch accent marking (á, é, í, ó, ú, ẃ), tone stripping, and syllable segmentation.
  8. Numeral & Classifier System: 1 to 1,000,000 numerals with human (khorok-), animal (kwtwi-), long (gong-), flat (tai-), and plant (phang-) classifiers.
  9. Universal Multi-Lingual Translation: Bidirectional translation across Kokborok, English, Hindi, and Bengali with dialect adaptation (Debbarma, Reang/Bru, Jamatia, Noatia).
  10. Command-Line Interface (CLI): Full CLI (kokborok translate, lookup, num, culture, books, read, search-books, stats).

📦 Installation

pip install kokborok

Or install from source:

git clone https://github.com/infoakshatsinghbisht-eng/kokborok-language-Library.git
cd kokborok-language-Library
pip install -e .

🚀 Quick Start Guide

1. Classical Grammar Rules Engine

import kokborok

# Query all 180 classical grammar rules
rules = kokborok.grammar_rules()
print(f"Catalogued rules: {len(rules)}")

# Lookup a specific rule
r = kokborok.get_grammar_rules_engine().get("PHON-01")
print(r.name)         # "Close Back Unrounded Vowel Representation ('w')"
print(r.formula)      # "'w' -> /ɯ/ (unrounded close back vowel)"

# Perform automated grammatical clause validation
engine = kokborok.get_grammar_rules_engine()
diag = engine.validate_clause("Ang bo-no mai rwi-kha de?")
for item in diag["applicable_rules"]:
    print(f"- {item['rule']}: {item['note']}")
# Exact or unhyphenated lookup
entry = kokborok.lookup("risa")
print(entry)
# {'kokborok': 'risa', 'english': 'handwoven upper bust wrap / stole', 'hindi': 'रीसा', 'bengali': 'রিসা'}

entry_derived = kokborok.lookup("swinai")
print(entry_derived["english"])  # "writer / author / one who writes"

# Search across English, Hindi, Bengali, or Kokborok
results = kokborok.search("bamboo")
print(f"Found {len(results)} matching vocabulary terms")

3. Cultural Heritage, Attire, Cuisine & Folklore

# Traditional Attire & Weaving Motifs
for g in kokborok.list_attire():
    print(f"{g['name']} ({g['gender']}): {g['english_name']}")

# Traditional Cuisine
chakhwi = kokborok.get_dish("chakhwi")
print(chakhwi["description"])

# Tripuri Clans
clans = kokborok.list_clans()
print(f"Total tribes and clans: {len(clans)}")

# Sacred Geography & Ancient Shrines
unakoti = kokborok.get_place("unakoti")
print(unakoti["description"])

# Idioms & Metaphors (Kok-Hajakma)
for idiom in kokborok.list_idioms()[:3]:
    print(f"'{idiom['idiom']}': {idiom['meaning']}")

4. Translation Across Dialects & Languages

# English -> Kokborok
res = kokborok.translate("How are you?")
print(res.text)  # "Nwng bahai tong?"

# Hindi -> Kokborok
res_hi = kokborok.translate("नमस्ते")
print(res_hi.text)  # "Khulumkha!"

# Bengali -> Kokborok
res_ben = kokborok.translate("ধন্যবাদ")
print(res_ben.text)  # "Hambai!"

5. Grammar & Verbal Conjugation

# Verb conjugation across tenses and aspects
print(kokborok.conjugate("thang", tense="past", subject="ang"))
# "ang thang-kha" (I went)

print(kokborok.conjugate("thang", tense="future", subject="bo"))
# "bo thang-nai" (He/She will go)

print(kokborok.conjugate("thang", tense="present", subject="bo", negative=True))
# "bo thang-ya" (He/She does not go)

# Causative and Reciprocal forms
print(kokborok.causative("thang"))    # "thang-ri" (cause to go)
print(kokborok.reciprocal("hamjak"))  # "hamjak-lai" (love each other)

# Noun case declensions with postpositions
print(kokborok.decline_noun("borok", "accusative"))  # "borok-no"
print(kokborok.decline_noun("nok", "genitive"))       # "nok-ni"
print(kokborok.pluralize("borok"))                   # "borok-rok"

6. Numerals & Semantic Classifiers

# Numbers to words
print(kokborok.num_to_words(1))    # "sa"
print(kokborok.num_to_words(25))   # "rwichi-ba"
print(kokborok.num_to_words(100))  # "ra-sa"

# Applying numeral classifiers
print(kokborok.apply_classifier(2, "khorok"))  # "khorok-nwi" (2 persons)
print(kokborok.apply_classifier(3, "gong"))    # "gong-tham" (3 long items/pens)
print(kokborok.apply_classifier(4, "tai"))     # "tai-brwi" (4 flat items/clothes)

7. Digitized Books & Literature Library

# Check digitized literature counts
print(kokborok.total_books())  # 225 books
print(f"{kokborok.total_pages():,} pages")  # 32,995 pages
print(f"{kokborok.total_words():,} words")  # 9,229,226 words

# Load and read a book page-by-page
book = kokborok.get_book("kokborok_swrongma")
print(f"{book.title} by {book.author}")
print("Page 1 snippet:", book.get_page(1)[:200])

# Search within book
matches = book.search("kokborok")
for m in matches[:2]:
    print(f"Page {m['page_number']}: {m['snippet']}")

# Cross-book search
results = kokborok.search_books("Tripura", max_results=3)
for r in results:
    print(f"[{r['book_title']} P.{r['page_number']}]: {r['snippet']}")

🖥️ Command-Line Interface (CLI)

# Check library stats
kokborok stats

# Translate
kokborok translate "Hello how are you?" --to kokborok

# Dictionary lookup
kokborok lookup "khulumkha"

# Convert numbers with classifiers
kokborok num 42 --classifier khorok

# Explore cultural topics
kokborok culture festivals
kokborok culture authors
kokborok culture kinship

# Read and search digitized literature
kokborok books
kokborok read kokborok_swrongma --page 1
kokborok search-books "Tripura"

👨‍💻 Author & Maintainer Profile


📜 License

This project is licensed under the MIT License — see the LICENSE file for full details.

Metadata

Release files for kokborok 1.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 kokborok 1.1.0
File Size Uploaded Provenance Actions
kokborok-1.1.0.tar.gz 24.2 MB With provenance Details for kokborok-1.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 49.1 MB

Release files / kokborok-1.1.0.tar.gz

Download URL kokborok-1.1.0.tar.gz
Size 24.2 MB
Tags Source
SHA-256 checksum
How to use checksums
e7ca2a2e8c9207f7209b46c1085dcbdd6d11385839864fb2ce9f85f190cf5e6d
BLAKE2b-256 checksum
How to use checksums
f83c5efdc4f6b45b407300e67eb29a77412cbdab3381ce6bbd004be5dd15cbaa
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 Oct 27, 2026.

Transparency log

Release files / kokborok-1.1.0-py3-none-any.whl

Download URL kokborok-1.1.0-py3-none-any.whl
Size 24.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
479db2abed44092517012d00a323c5fe85808bc7b9e4386d7342c2b183c08b65
BLAKE2b-256 checksum
How to use checksums
f16b9900c7a0b6875c1f8936454f17b373b4018db4bb081a280aaa4087501abf
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 Oct 27, 2026.

Transparency log

Security for kokborok 1.1.0

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 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for kokborok-1.1.0.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 Oct 27, 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