khasi 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. khasi-1.0.0/LICENSE +21 -0
  2. khasi-1.0.0/PKG-INFO +263 -0
  3. khasi-1.0.0/README.md +223 -0
  4. khasi-1.0.0/khasi/__init__.py +211 -0
  5. khasi-1.0.0/khasi/__main__.py +7 -0
  6. khasi-1.0.0/khasi/cli.py +126 -0
  7. khasi-1.0.0/khasi/constants.py +188 -0
  8. khasi-1.0.0/khasi/culture/__init__.py +52 -0
  9. khasi-1.0.0/khasi/culture/calendar.py +91 -0
  10. khasi-1.0.0/khasi/culture/festivals.py +54 -0
  11. khasi-1.0.0/khasi/culture/kinship.py +28 -0
  12. khasi-1.0.0/khasi/culture/literature.py +78 -0
  13. khasi-1.0.0/khasi/grammar/__init__.py +102 -0
  14. khasi-1.0.0/khasi/grammar/adjectives.py +90 -0
  15. khasi-1.0.0/khasi/grammar/adverbs.py +89 -0
  16. khasi-1.0.0/khasi/grammar/echo_words.py +107 -0
  17. khasi-1.0.0/khasi/grammar/nouns.py +108 -0
  18. khasi-1.0.0/khasi/grammar/prepositions.py +75 -0
  19. khasi-1.0.0/khasi/grammar/pronouns.py +122 -0
  20. khasi-1.0.0/khasi/grammar/syntax.py +77 -0
  21. khasi-1.0.0/khasi/grammar/verbs.py +136 -0
  22. khasi-1.0.0/khasi/lexicon/__init__.py +16 -0
  23. khasi-1.0.0/khasi/lexicon/data/phrases.json +303 -0
  24. khasi-1.0.0/khasi/lexicon/data/proverbs.json +38 -0
  25. khasi-1.0.0/khasi/lexicon/data/riddles.json +22 -0
  26. khasi-1.0.0/khasi/lexicon/data/words.json +3043 -0
  27. khasi-1.0.0/khasi/lexicon/dictionary.py +154 -0
  28. khasi-1.0.0/khasi/lexicon/morphology.py +216 -0
  29. khasi-1.0.0/khasi/numbers/__init__.py +6 -0
  30. khasi-1.0.0/khasi/numbers/converter.py +140 -0
  31. khasi-1.0.0/khasi/phonetics.py +214 -0
  32. khasi-1.0.0/khasi/preservation.py +113 -0
  33. khasi-1.0.0/khasi/translator/__init__.py +15 -0
  34. khasi-1.0.0/khasi/translator/engine.py +143 -0
  35. khasi-1.0.0/khasi/translator/llm_adapter.py +12 -0
  36. khasi-1.0.0/khasi/translator/pivot.py +13 -0
  37. khasi-1.0.0/khasi/translator/rule_based.py +179 -0
  38. khasi-1.0.0/khasi/voice/__init__.py +6 -0
  39. khasi-1.0.0/khasi/voice/engine.py +62 -0
  40. khasi-1.0.0/khasi.egg-info/PKG-INFO +263 -0
  41. khasi-1.0.0/khasi.egg-info/SOURCES.txt +53 -0
  42. khasi-1.0.0/khasi.egg-info/dependency_links.txt +1 -0
  43. khasi-1.0.0/khasi.egg-info/entry_points.txt +2 -0
  44. khasi-1.0.0/khasi.egg-info/requires.txt +4 -0
  45. khasi-1.0.0/khasi.egg-info/top_level.txt +1 -0
  46. khasi-1.0.0/pyproject.toml +70 -0
  47. khasi-1.0.0/setup.cfg +4 -0
  48. khasi-1.0.0/setup.py +52 -0
  49. khasi-1.0.0/tests/test_culture.py +57 -0
  50. khasi-1.0.0/tests/test_grammar.py +103 -0
  51. khasi-1.0.0/tests/test_lexicon.py +42 -0
  52. khasi-1.0.0/tests/test_numbers.py +41 -0
  53. khasi-1.0.0/tests/test_phonetics.py +59 -0
  54. khasi-1.0.0/tests/test_preservation.py +30 -0
  55. khasi-1.0.0/tests/test_top_level.py +93 -0
khasi-1.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 PyKhasi Language Preservation Initiative
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
khasi-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,263 @@
1
+ Metadata-Version: 2.4
2
+ Name: khasi
3
+ Version: 1.0.0
4
+ Summary: Khasi (Ka Ktien Khasi) Language Library: 300,000+ Inflections, Multi-dialect Translation, NLP Toolkit, and Meghalaya Cultural Heritage
5
+ Home-page: https://github.com/infoakshatsinghbisht-eng/KHASI-language-library
6
+ Author: Akshat Singh Bisht
7
+ Author-email: Akshat Singh Bisht <infoakshatsinghbisht@gmail.com>
8
+ Maintainer: Akshat Singh Bisht
9
+ Maintainer-email: Akshat Singh Bisht <infoakshatsinghbisht@gmail.com>
10
+ License-Expression: MIT
11
+ Project-URL: Homepage, https://akshatsinghbisht.com/
12
+ Project-URL: GitHub, https://github.com/infoakshatsinghbisht-eng/KHASI-language-library
13
+ Project-URL: Issues, https://github.com/infoakshatsinghbisht-eng/KHASI-language-library/issues
14
+ Project-URL: LinkedIn, https://www.linkedin.com/in/akshat-singh-bisht-digital-performance-marketing-specialist/
15
+ Project-URL: ResearchGate, https://www.researchgate.net/profile/Akshat-Bisht-8
16
+ Keywords: khasi,meghalaya,shillong,cherrapunji,pnar,northeast-india,language-preservation,nlp,austroasiatic,mon-khmer,linguistics,indigenous-languages
17
+ Classifier: Development Status :: 5 - Production/Stable
18
+ Classifier: Intended Audience :: Developers
19
+ Classifier: Intended Audience :: Science/Research
20
+ Classifier: Topic :: Text Processing :: Linguistic
21
+ Classifier: Programming Language :: Python :: 3
22
+ Classifier: Programming Language :: Python :: 3.8
23
+ Classifier: Programming Language :: Python :: 3.9
24
+ Classifier: Programming Language :: Python :: 3.10
25
+ Classifier: Programming Language :: Python :: 3.11
26
+ Classifier: Programming Language :: Python :: 3.12
27
+ Classifier: Programming Language :: Python :: 3.13
28
+ Classifier: Operating System :: OS Independent
29
+ Requires-Python: >=3.8
30
+ Description-Content-Type: text/markdown
31
+ License-File: LICENSE
32
+ Provides-Extra: dev
33
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
34
+ Requires-Dist: flake8>=5.0.0; extra == "dev"
35
+ Dynamic: author
36
+ Dynamic: home-page
37
+ Dynamic: license-file
38
+ Dynamic: maintainer
39
+ Dynamic: requires-python
40
+
41
+ # 🌿 Khasi (Ka Ktien Khasi) Language Library
42
+
43
+ [![PyPI Version](https://img.shields.io/pypi/v/khasi.svg)](https://pypi.org/project/khasi/)
44
+ [![Python Versions](https://img.shields.io/pypi/pyversions/khasi.svg)](https://pypi.org/project/khasi/)
45
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
46
+ [![GitHub Repository](https://img.shields.io/badge/GitHub-KHASI--language--library-blue.svg)](https://github.com/infoakshatsinghbisht-eng/KHASI-language-library)
47
+ [![Website](https://img.shields.io/badge/Website-akshatsinghbisht.com-orange.svg)](https://akshatsinghbisht.com/)
48
+ [![LinkedIn](https://img.shields.io/badge/LinkedIn-Akshat_Singh_Bisht-0077b5.svg)](https://www.linkedin.com/in/akshat-singh-bisht-digital-performance-marketing-specialist/)
49
+ [![ResearchGate](https://img.shields.io/badge/ResearchGate-Akshat_Bisht-00ccbb.svg)](https://www.researchgate.net/profile/Akshat-Bisht-8)
50
+ [![Amazon Author](https://img.shields.io/badge/Amazon-Author_Page-FF9900.svg)](https://www.amazon.com/stores/Akshat-Singh-Bisht/author/B0D5TYDT28)
51
+
52
+ A standard-library-style Python package, NLP toolkit, and computational linguistics engine for the **Khasi language (*Ka Ktien Khasi*)** — an Austroasiatic (Mon-Khmer) language spoken by over 1.6 million people in the pine-covered hills of **Meghalaya, Northeast India** and adjacent borderlands.
53
+
54
+ Khasi is globally renowned for its distinct grammatical features, rich prefix morphology, and the deep cultural heritage of the **world's largest surviving matrilineal society**.
55
+
56
+ ---
57
+
58
+ ## 🌟 Key Capabilities
59
+
60
+ 1. **📚 300,000+ Morphological Word Forms (`khasi.lexicon.morphology`)**:
61
+ - Dynamic inflectional and derivational engine generating extensive verbal TAM forms, nominalizations (`jing-`), causatives (`pyn-`), agentives (`nong-`), experientials (`sngew-`), and prepositional case declensions across noun gender articles (`u`, `ka`, `i`, `ki`).
62
+ 2. **🔄 Multi-Dialect Universal Translation Engine (`khasi.translator`)**:
63
+ - Rule-based, conversational, and lexical translation across **English $\leftrightarrow$ Khasi**, **Hindi $\leftrightarrow$ Khasi**, and **Hinglish $\leftrightarrow$ Khasi**.
64
+ - Dialect adaptations for **Sohra** (Standard Literary), **Shillong** (Colloquial Urban), **Pnar** (Jaiñtia Hills), **War** (Southern escarpment), and **Bhoi** (Ri-Bhoi).
65
+ 3. **📖 Trilingual Lexicon & Dictionary (`khasi.lexicon`)**:
66
+ - Comprehensive Khasi-English-Hindi lexical database with part-of-speech, gender, etymology, and morphological root fallback.
67
+ 4. **🔡 Orthography, Phonetics & Normalizer (`khasi.phonetics`)**:
68
+ - Unicode NFC standardizer, smart contraction expander (`nga'm` $\rightarrow$ `nga ym`, `u'n` $\rightarrow$ `u yn`), and diacritic restorer (`ï`, `ñ`).
69
+ - Syllabification engine and bidirectional Devanagari $\leftrightarrow$ Latin transliteration.
70
+ 5. **🔢 Base-10 Numeral & Number Engine (`khasi.numbers`)**:
71
+ - Converts numbers up to crores/billions into formal Khasi words (`num_to_words`), ordinals (`ordinal`), and fractions.
72
+ 6. **🌸 Matrilineal Heritage, Culture & Calendar (`khasi.culture`)**:
73
+ - Complete documentation of the matrilineal kinship structure (*Kur* and *Kha*, *Ka Khadduh*, *U Kñi*).
74
+ - 12 traditional lunar months (*Ki Bnai*), 4 seasons (*Ki Aïom*), 8-day traditional rotating market cycle (*Sngi Iew*), traditional proverbs (*Ki Ktien Tymmen* / *Phawar*), and classical folklore.
75
+ 7. **🎙️ Voice Synthesis & SSML (`khasi.voice`)**:
76
+ - SSML markup generator and PCM audio waveform generator for speech synthesis pipelines.
77
+ 8. **🏛️ Digital Archival & Field Preservation (`khasi.preservation`)**:
78
+ - Schema and metadata cataloging for field researchers, oral folktale archiving, orthographic health scoring, and export to **JSONL**, **CSV**, and **Hugging Face** formats.
79
+ 9. **💻 Interactive CLI (`khasi`)**:
80
+ - Command-line tool for translation, dictionary lookups, verb conjugation, cultural exploration, and statistics.
81
+
82
+ ---
83
+
84
+ ## 🚀 Installation
85
+
86
+ ```bash
87
+ # Install directly from repository
88
+ pip install .
89
+
90
+ # Or install in editable mode for development
91
+ pip install -e .
92
+ ```
93
+
94
+ ---
95
+
96
+ ## ⚡ Quick Start
97
+
98
+ ```python
99
+ import khasi
100
+
101
+ # 1. Universal Multi-Dialect Translation
102
+ res = khasi.translate("How are you?")
103
+ print(res.text) # "Kumno phi long?"
104
+
105
+ # Dialect variation (Pnar / Jaintia)
106
+ res_pnar = khasi.translate("I love you", dialect="pnar")
107
+ print(res_pnar.text) # "Nga maya ïa phi."
108
+
109
+ # Hindi to Khasi
110
+ res_hi = khasi.translate("आप कैसे हैं?")
111
+ print(res_hi.text) # "Kumno phi long?"
112
+
113
+ # 2. Dictionary & Lexical Lookup
114
+ entry = khasi.lookup("khublei")
115
+ print(entry["english"]) # "hello / thank you / greetings"
116
+ print(entry["hindi"]) # "नमस्ते / धन्यवाद / प्रणाम"
117
+
118
+ # 3. Numbers & Ordinals
119
+ print(khasi.num_to_words(42)) # "sawphew ar"
120
+ print(khasi.ordinal(1)) # "ba-nyngkong"
121
+ print(khasi.words_to_num("sawphew ar")) # 42
122
+
123
+ # 4. Grammar & Verb Conjugation
124
+ # Tense-Aspect-Mood (TAM)
125
+ print(khasi.conjugate("wan", tense="past", pronoun="u")) # "u la wan" (he came)
126
+ print(khasi.conjugate("wan", tense="future", pronoun="u")) # "un wan" (he will come)
127
+
128
+ # Productive Derivations
129
+ print(khasi.causative("ïap")) # "pynïap" (cause to die -> kill)
130
+ print(khasi.nominalize("stad")) # "jingstad" (wise -> wisdom)
131
+ print(khasi.agent_noun("hikai")) # "nonghikai" (teach -> teacher)
132
+
133
+ # 5. Morphological Analysis (300,000+ forms)
134
+ analysis = khasi.analyze("jingstad")
135
+ print(analysis.lemma) # "stad"
136
+ print(analysis.pos) # "derived_jing"
137
+ print(khasi.total_word_forms()) # 312,500+
138
+
139
+ # 6. Culture, Seasons & Market Cycle
140
+ season = khasi.get_current_season()
141
+ print(season["name_khasi"]) # e.g., "Aïom Synrai" (Autumn)
142
+
143
+ market_day = khasi.get_market_day(1)
144
+ print(market_day["name"]) # "Sngi Iewduh" (Shillong Barabazar)
145
+
146
+ # 7. Traditional Proverbs (Ki Ktien Tymmen)
147
+ p = khasi.proverbs.random()
148
+ print(f"\"{p['khasi']}\" - {p['meaning']}")
149
+ # "Kamai ïa ka hok." - Live by honest toil and upright conduct.
150
+ ```
151
+
152
+ ---
153
+
154
+ ## 🖥️ Command Line Interface (CLI)
155
+
156
+ The library provides a standalone CLI command `khasi`:
157
+
158
+ ```bash
159
+ # 1. Translate sentences into Khasi
160
+ khasi translate "How are you?"
161
+ khasi translate "Where are you going?" --dialect pnar
162
+
163
+ # 2. Look up a word in the dictionary
164
+ khasi lookup khublei
165
+ khasi lookup kshaid
166
+
167
+ # 3. Number conversions
168
+ khasi num 42
169
+ khasi num 2500
170
+
171
+ # 4. Conjugate verbs
172
+ khasi conjugate wan --tense past --pronoun u
173
+ khasi conjugate leit --tense future --pronoun nga
174
+
175
+ # 5. Culture, season & proverbs
176
+ khasi culture
177
+
178
+ # 6. Traditional riddles (Ki Jingkyntip)
179
+ khasi riddle
180
+
181
+ # 7. Corpus statistics
182
+ khasi stats
183
+ ```
184
+
185
+ ---
186
+
187
+ ## 📁 Project Architecture
188
+
189
+ ```
190
+ khasi/
191
+ ├── __init__.py # Unified top-level standard library API & facades
192
+ ├── constants.py # ISO codes, alphabet, phonemes, dialects, moral pillars
193
+ ├── phonetics.py # Orthography normalizer, syllabifier, transliteration
194
+ ├── cli.py # Command-line interface
195
+ ├── preservation.py # Archival corpus manager, health scorer & dataset exporter
196
+ ├── numbers/
197
+ │ ├── __init__.py
198
+ │ └── converter.py # Base-10 Khasi number & ordinal engine
199
+ ├── grammar/
200
+ │ ├── __init__.py
201
+ │ ├── nouns.py # Noun gender articles (u, ka, i, ki) & declensions
202
+ │ ├── prepositions.py # Case prepositions (jong, ha, sha, na, bad, ban, ïa)
203
+ │ ├── pronouns.py # Pronominal paradigm & interrogatives
204
+ │ ├── verbs.py # TAM conjugation & productive prefixes (pyn-, jing-, nong-)
205
+ │ └── syntax.py # SVO sentence & question builder
206
+ ├── lexicon/
207
+ │ ├── __init__.py
208
+ │ ├── dictionary.py # Trilingual lookup & root fallback engine
209
+ │ ├── morphology.py # 300,000+ inflectional & derivational universe engine
210
+ │ └── data/
211
+ │ ├── words.json # Core vocabulary with dialect variants
212
+ │ ├── phrases.json # Conversational phrases
213
+ │ ├── proverbs.json # Ki Ktien Tymmen / Phawar
214
+ │ └── riddles.json # Traditional riddles (Ki Jingkyntip)
215
+ ├── culture/
216
+ │ ├── __init__.py
217
+ │ ├── calendar.py # Months (Ki Bnai), Seasons (Ki Aïom), 8-day Market Cycle
218
+ │ ├── festivals.py # Shad Suk Mynsiem, Pomblang Nongkrem, Behdeinkhlam
219
+ │ ├── literature.py # U Soso Tham, Babu Jeebon Roy, epics & folklore
220
+ │ └── kinship.py # Matrilineal kinship system (Kur & Kha, Khadduh, Kñi)
221
+ ├── translator/
222
+ │ ├── __init__.py
223
+ │ ├── engine.py # Main translation coordinator
224
+ │ ├── rule_based.py # Conversational maps & multi-dialect adaptations
225
+ │ ├── pivot.py # Pivot translation engine
226
+ │ └── llm_adapter.py # Generative neural prompt generator
227
+ └── voice/
228
+ ├── __init__.py
229
+ └── engine.py # KhasiVoiceSynthesizer, SSML & PCM audio generation
230
+ ```
231
+
232
+ ---
233
+
234
+ ## 📜 Linguistic & Cultural Notes
235
+
236
+ - **Language Family**: Austroasiatic $\rightarrow$ Mon-Khmer branch (sharing ancient linguistic affinity with Mon and Khmer in Southeast Asia, distinct from surrounding Tibeto-Burman and Indo-Aryan languages).
237
+ - **Four-Article Gender System**:
238
+ - `u` : Masculine singular (e.g., *u briew* - the man, *u lum* - the mountain)
239
+ - `ka`: Feminine singular (e.g., *ka kynthei* - the woman, *ka ïing* - the house, *ka wah* - the river)
240
+ - `i` : Diminutive / Affectionate (e.g., *i khunlung* - the baby)
241
+ - `ki` : Plural for all genders (e.g., *ki briew* - the people)
242
+ - **Three Supreme Moral Pillars**:
243
+ 1. *Kamai ïa ka hok* : Earn righteousness through honest hard work.
244
+ 2. *Tip kur, tip kha* : Honor and know maternal lineage (*Kur*) and paternal heritage (*Kha*).
245
+ 3. *Tip briew, tip Blei* : Know and respect human dignity to know God.
246
+
247
+ ---
248
+
249
+ ## 👨‍💻 Author & Maintainer
250
+
251
+ **Akshat Singh Bisht**
252
+ - **Website**: [https://akshatsinghbisht.com/](https://akshatsinghbisht.com/)
253
+ - **Email**: [infoakshatsinghbisht@gmail.com](mailto:infoakshatsinghbisht@gmail.com)
254
+ - **LinkedIn**: [Akshat Singh Bisht](https://www.linkedin.com/in/akshat-singh-bisht-digital-performance-marketing-specialist/)
255
+ - **Amazon Author**: [Akshat Singh Bisht on Amazon](https://www.amazon.com/stores/Akshat-Singh-Bisht/author/B0D5TYDT28)
256
+ - **ResearchGate**: [Akshat Bisht](https://www.researchgate.net/profile/Akshat-Bisht-8)
257
+ - **GitHub**: [infoakshatsinghbisht-eng](https://github.com/infoakshatsinghbisht-eng)
258
+
259
+ ---
260
+
261
+ ## 📄 License
262
+
263
+ This project is licensed under the **MIT License**.
khasi-1.0.0/README.md ADDED
@@ -0,0 +1,223 @@
1
+ # 🌿 Khasi (Ka Ktien Khasi) Language Library
2
+
3
+ [![PyPI Version](https://img.shields.io/pypi/v/khasi.svg)](https://pypi.org/project/khasi/)
4
+ [![Python Versions](https://img.shields.io/pypi/pyversions/khasi.svg)](https://pypi.org/project/khasi/)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+ [![GitHub Repository](https://img.shields.io/badge/GitHub-KHASI--language--library-blue.svg)](https://github.com/infoakshatsinghbisht-eng/KHASI-language-library)
7
+ [![Website](https://img.shields.io/badge/Website-akshatsinghbisht.com-orange.svg)](https://akshatsinghbisht.com/)
8
+ [![LinkedIn](https://img.shields.io/badge/LinkedIn-Akshat_Singh_Bisht-0077b5.svg)](https://www.linkedin.com/in/akshat-singh-bisht-digital-performance-marketing-specialist/)
9
+ [![ResearchGate](https://img.shields.io/badge/ResearchGate-Akshat_Bisht-00ccbb.svg)](https://www.researchgate.net/profile/Akshat-Bisht-8)
10
+ [![Amazon Author](https://img.shields.io/badge/Amazon-Author_Page-FF9900.svg)](https://www.amazon.com/stores/Akshat-Singh-Bisht/author/B0D5TYDT28)
11
+
12
+ A standard-library-style Python package, NLP toolkit, and computational linguistics engine for the **Khasi language (*Ka Ktien Khasi*)** — an Austroasiatic (Mon-Khmer) language spoken by over 1.6 million people in the pine-covered hills of **Meghalaya, Northeast India** and adjacent borderlands.
13
+
14
+ Khasi is globally renowned for its distinct grammatical features, rich prefix morphology, and the deep cultural heritage of the **world's largest surviving matrilineal society**.
15
+
16
+ ---
17
+
18
+ ## 🌟 Key Capabilities
19
+
20
+ 1. **📚 300,000+ Morphological Word Forms (`khasi.lexicon.morphology`)**:
21
+ - Dynamic inflectional and derivational engine generating extensive verbal TAM forms, nominalizations (`jing-`), causatives (`pyn-`), agentives (`nong-`), experientials (`sngew-`), and prepositional case declensions across noun gender articles (`u`, `ka`, `i`, `ki`).
22
+ 2. **🔄 Multi-Dialect Universal Translation Engine (`khasi.translator`)**:
23
+ - Rule-based, conversational, and lexical translation across **English $\leftrightarrow$ Khasi**, **Hindi $\leftrightarrow$ Khasi**, and **Hinglish $\leftrightarrow$ Khasi**.
24
+ - Dialect adaptations for **Sohra** (Standard Literary), **Shillong** (Colloquial Urban), **Pnar** (Jaiñtia Hills), **War** (Southern escarpment), and **Bhoi** (Ri-Bhoi).
25
+ 3. **📖 Trilingual Lexicon & Dictionary (`khasi.lexicon`)**:
26
+ - Comprehensive Khasi-English-Hindi lexical database with part-of-speech, gender, etymology, and morphological root fallback.
27
+ 4. **🔡 Orthography, Phonetics & Normalizer (`khasi.phonetics`)**:
28
+ - Unicode NFC standardizer, smart contraction expander (`nga'm` $\rightarrow$ `nga ym`, `u'n` $\rightarrow$ `u yn`), and diacritic restorer (`ï`, `ñ`).
29
+ - Syllabification engine and bidirectional Devanagari $\leftrightarrow$ Latin transliteration.
30
+ 5. **🔢 Base-10 Numeral & Number Engine (`khasi.numbers`)**:
31
+ - Converts numbers up to crores/billions into formal Khasi words (`num_to_words`), ordinals (`ordinal`), and fractions.
32
+ 6. **🌸 Matrilineal Heritage, Culture & Calendar (`khasi.culture`)**:
33
+ - Complete documentation of the matrilineal kinship structure (*Kur* and *Kha*, *Ka Khadduh*, *U Kñi*).
34
+ - 12 traditional lunar months (*Ki Bnai*), 4 seasons (*Ki Aïom*), 8-day traditional rotating market cycle (*Sngi Iew*), traditional proverbs (*Ki Ktien Tymmen* / *Phawar*), and classical folklore.
35
+ 7. **🎙️ Voice Synthesis & SSML (`khasi.voice`)**:
36
+ - SSML markup generator and PCM audio waveform generator for speech synthesis pipelines.
37
+ 8. **🏛️ Digital Archival & Field Preservation (`khasi.preservation`)**:
38
+ - Schema and metadata cataloging for field researchers, oral folktale archiving, orthographic health scoring, and export to **JSONL**, **CSV**, and **Hugging Face** formats.
39
+ 9. **💻 Interactive CLI (`khasi`)**:
40
+ - Command-line tool for translation, dictionary lookups, verb conjugation, cultural exploration, and statistics.
41
+
42
+ ---
43
+
44
+ ## 🚀 Installation
45
+
46
+ ```bash
47
+ # Install directly from repository
48
+ pip install .
49
+
50
+ # Or install in editable mode for development
51
+ pip install -e .
52
+ ```
53
+
54
+ ---
55
+
56
+ ## ⚡ Quick Start
57
+
58
+ ```python
59
+ import khasi
60
+
61
+ # 1. Universal Multi-Dialect Translation
62
+ res = khasi.translate("How are you?")
63
+ print(res.text) # "Kumno phi long?"
64
+
65
+ # Dialect variation (Pnar / Jaintia)
66
+ res_pnar = khasi.translate("I love you", dialect="pnar")
67
+ print(res_pnar.text) # "Nga maya ïa phi."
68
+
69
+ # Hindi to Khasi
70
+ res_hi = khasi.translate("आप कैसे हैं?")
71
+ print(res_hi.text) # "Kumno phi long?"
72
+
73
+ # 2. Dictionary & Lexical Lookup
74
+ entry = khasi.lookup("khublei")
75
+ print(entry["english"]) # "hello / thank you / greetings"
76
+ print(entry["hindi"]) # "नमस्ते / धन्यवाद / प्रणाम"
77
+
78
+ # 3. Numbers & Ordinals
79
+ print(khasi.num_to_words(42)) # "sawphew ar"
80
+ print(khasi.ordinal(1)) # "ba-nyngkong"
81
+ print(khasi.words_to_num("sawphew ar")) # 42
82
+
83
+ # 4. Grammar & Verb Conjugation
84
+ # Tense-Aspect-Mood (TAM)
85
+ print(khasi.conjugate("wan", tense="past", pronoun="u")) # "u la wan" (he came)
86
+ print(khasi.conjugate("wan", tense="future", pronoun="u")) # "un wan" (he will come)
87
+
88
+ # Productive Derivations
89
+ print(khasi.causative("ïap")) # "pynïap" (cause to die -> kill)
90
+ print(khasi.nominalize("stad")) # "jingstad" (wise -> wisdom)
91
+ print(khasi.agent_noun("hikai")) # "nonghikai" (teach -> teacher)
92
+
93
+ # 5. Morphological Analysis (300,000+ forms)
94
+ analysis = khasi.analyze("jingstad")
95
+ print(analysis.lemma) # "stad"
96
+ print(analysis.pos) # "derived_jing"
97
+ print(khasi.total_word_forms()) # 312,500+
98
+
99
+ # 6. Culture, Seasons & Market Cycle
100
+ season = khasi.get_current_season()
101
+ print(season["name_khasi"]) # e.g., "Aïom Synrai" (Autumn)
102
+
103
+ market_day = khasi.get_market_day(1)
104
+ print(market_day["name"]) # "Sngi Iewduh" (Shillong Barabazar)
105
+
106
+ # 7. Traditional Proverbs (Ki Ktien Tymmen)
107
+ p = khasi.proverbs.random()
108
+ print(f"\"{p['khasi']}\" - {p['meaning']}")
109
+ # "Kamai ïa ka hok." - Live by honest toil and upright conduct.
110
+ ```
111
+
112
+ ---
113
+
114
+ ## 🖥️ Command Line Interface (CLI)
115
+
116
+ The library provides a standalone CLI command `khasi`:
117
+
118
+ ```bash
119
+ # 1. Translate sentences into Khasi
120
+ khasi translate "How are you?"
121
+ khasi translate "Where are you going?" --dialect pnar
122
+
123
+ # 2. Look up a word in the dictionary
124
+ khasi lookup khublei
125
+ khasi lookup kshaid
126
+
127
+ # 3. Number conversions
128
+ khasi num 42
129
+ khasi num 2500
130
+
131
+ # 4. Conjugate verbs
132
+ khasi conjugate wan --tense past --pronoun u
133
+ khasi conjugate leit --tense future --pronoun nga
134
+
135
+ # 5. Culture, season & proverbs
136
+ khasi culture
137
+
138
+ # 6. Traditional riddles (Ki Jingkyntip)
139
+ khasi riddle
140
+
141
+ # 7. Corpus statistics
142
+ khasi stats
143
+ ```
144
+
145
+ ---
146
+
147
+ ## 📁 Project Architecture
148
+
149
+ ```
150
+ khasi/
151
+ ├── __init__.py # Unified top-level standard library API & facades
152
+ ├── constants.py # ISO codes, alphabet, phonemes, dialects, moral pillars
153
+ ├── phonetics.py # Orthography normalizer, syllabifier, transliteration
154
+ ├── cli.py # Command-line interface
155
+ ├── preservation.py # Archival corpus manager, health scorer & dataset exporter
156
+ ├── numbers/
157
+ │ ├── __init__.py
158
+ │ └── converter.py # Base-10 Khasi number & ordinal engine
159
+ ├── grammar/
160
+ │ ├── __init__.py
161
+ │ ├── nouns.py # Noun gender articles (u, ka, i, ki) & declensions
162
+ │ ├── prepositions.py # Case prepositions (jong, ha, sha, na, bad, ban, ïa)
163
+ │ ├── pronouns.py # Pronominal paradigm & interrogatives
164
+ │ ├── verbs.py # TAM conjugation & productive prefixes (pyn-, jing-, nong-)
165
+ │ └── syntax.py # SVO sentence & question builder
166
+ ├── lexicon/
167
+ │ ├── __init__.py
168
+ │ ├── dictionary.py # Trilingual lookup & root fallback engine
169
+ │ ├── morphology.py # 300,000+ inflectional & derivational universe engine
170
+ │ └── data/
171
+ │ ├── words.json # Core vocabulary with dialect variants
172
+ │ ├── phrases.json # Conversational phrases
173
+ │ ├── proverbs.json # Ki Ktien Tymmen / Phawar
174
+ │ └── riddles.json # Traditional riddles (Ki Jingkyntip)
175
+ ├── culture/
176
+ │ ├── __init__.py
177
+ │ ├── calendar.py # Months (Ki Bnai), Seasons (Ki Aïom), 8-day Market Cycle
178
+ │ ├── festivals.py # Shad Suk Mynsiem, Pomblang Nongkrem, Behdeinkhlam
179
+ │ ├── literature.py # U Soso Tham, Babu Jeebon Roy, epics & folklore
180
+ │ └── kinship.py # Matrilineal kinship system (Kur & Kha, Khadduh, Kñi)
181
+ ├── translator/
182
+ │ ├── __init__.py
183
+ │ ├── engine.py # Main translation coordinator
184
+ │ ├── rule_based.py # Conversational maps & multi-dialect adaptations
185
+ │ ├── pivot.py # Pivot translation engine
186
+ │ └── llm_adapter.py # Generative neural prompt generator
187
+ └── voice/
188
+ ├── __init__.py
189
+ └── engine.py # KhasiVoiceSynthesizer, SSML & PCM audio generation
190
+ ```
191
+
192
+ ---
193
+
194
+ ## 📜 Linguistic & Cultural Notes
195
+
196
+ - **Language Family**: Austroasiatic $\rightarrow$ Mon-Khmer branch (sharing ancient linguistic affinity with Mon and Khmer in Southeast Asia, distinct from surrounding Tibeto-Burman and Indo-Aryan languages).
197
+ - **Four-Article Gender System**:
198
+ - `u` : Masculine singular (e.g., *u briew* - the man, *u lum* - the mountain)
199
+ - `ka`: Feminine singular (e.g., *ka kynthei* - the woman, *ka ïing* - the house, *ka wah* - the river)
200
+ - `i` : Diminutive / Affectionate (e.g., *i khunlung* - the baby)
201
+ - `ki` : Plural for all genders (e.g., *ki briew* - the people)
202
+ - **Three Supreme Moral Pillars**:
203
+ 1. *Kamai ïa ka hok* : Earn righteousness through honest hard work.
204
+ 2. *Tip kur, tip kha* : Honor and know maternal lineage (*Kur*) and paternal heritage (*Kha*).
205
+ 3. *Tip briew, tip Blei* : Know and respect human dignity to know God.
206
+
207
+ ---
208
+
209
+ ## 👨‍💻 Author & Maintainer
210
+
211
+ **Akshat Singh Bisht**
212
+ - **Website**: [https://akshatsinghbisht.com/](https://akshatsinghbisht.com/)
213
+ - **Email**: [infoakshatsinghbisht@gmail.com](mailto:infoakshatsinghbisht@gmail.com)
214
+ - **LinkedIn**: [Akshat Singh Bisht](https://www.linkedin.com/in/akshat-singh-bisht-digital-performance-marketing-specialist/)
215
+ - **Amazon Author**: [Akshat Singh Bisht on Amazon](https://www.amazon.com/stores/Akshat-Singh-Bisht/author/B0D5TYDT28)
216
+ - **ResearchGate**: [Akshat Bisht](https://www.researchgate.net/profile/Akshat-Bisht-8)
217
+ - **GitHub**: [infoakshatsinghbisht-eng](https://github.com/infoakshatsinghbisht-eng)
218
+
219
+ ---
220
+
221
+ ## 📄 License
222
+
223
+ This project is licensed under the **MIT License**.