bodonlp 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 (51) hide show
  1. bodonlp-1.0.0/LICENSE +21 -0
  2. bodonlp-1.0.0/PKG-INFO +296 -0
  3. bodonlp-1.0.0/README.md +265 -0
  4. bodonlp-1.0.0/bodo_lang/__init__.py +18 -0
  5. bodonlp-1.0.0/bodonlp/__init__.py +232 -0
  6. bodonlp-1.0.0/bodonlp/cli.py +251 -0
  7. bodonlp-1.0.0/bodonlp/constants.py +165 -0
  8. bodonlp-1.0.0/bodonlp/culture/__init__.py +232 -0
  9. bodonlp-1.0.0/bodonlp/grammar/__init__.py +41 -0
  10. bodonlp-1.0.0/bodonlp/grammar/noun.py +90 -0
  11. bodonlp-1.0.0/bodonlp/grammar/pronouns.py +115 -0
  12. bodonlp-1.0.0/bodonlp/grammar/syntax.py +82 -0
  13. bodonlp-1.0.0/bodonlp/grammar/verb.py +143 -0
  14. bodonlp-1.0.0/bodonlp/lexicon/__init__.py +19 -0
  15. bodonlp-1.0.0/bodonlp/lexicon/data/phrases.json +177 -0
  16. bodonlp-1.0.0/bodonlp/lexicon/data/proverbs.json +58 -0
  17. bodonlp-1.0.0/bodonlp/lexicon/data/riddles.json +37 -0
  18. bodonlp-1.0.0/bodonlp/lexicon/data/words.json +294218 -0
  19. bodonlp-1.0.0/bodonlp/lexicon/dictionary.py +296 -0
  20. bodonlp-1.0.0/bodonlp/numbers/__init__.py +204 -0
  21. bodonlp-1.0.0/bodonlp/numbers/classifiers.py +131 -0
  22. bodonlp-1.0.0/bodonlp/phonetics.py +269 -0
  23. bodonlp-1.0.0/bodonlp/scraper/__init__.py +13 -0
  24. bodonlp-1.0.0/bodonlp/scraper/corpus_collector.py +50 -0
  25. bodonlp-1.0.0/bodonlp/scraper/glosbe_scraper.py +62 -0
  26. bodonlp-1.0.0/bodonlp/scraper/wiki_scraper.py +103 -0
  27. bodonlp-1.0.0/bodonlp/translator/__init__.py +25 -0
  28. bodonlp-1.0.0/bodonlp/translator/engine.py +200 -0
  29. bodonlp-1.0.0/bodonlp/translator/hf_adapter.py +58 -0
  30. bodonlp-1.0.0/bodonlp/translator/llm_adapter.py +92 -0
  31. bodonlp-1.0.0/bodonlp/translator/pivot.py +77 -0
  32. bodonlp-1.0.0/bodonlp/translator/rule_based.py +241 -0
  33. bodonlp-1.0.0/bodonlp/translator/web_adapter.py +40 -0
  34. bodonlp-1.0.0/bodonlp/voice/__init__.py +73 -0
  35. bodonlp-1.0.0/bodonlp/voice/cadence.py +70 -0
  36. bodonlp-1.0.0/bodonlp.egg-info/PKG-INFO +296 -0
  37. bodonlp-1.0.0/bodonlp.egg-info/SOURCES.txt +49 -0
  38. bodonlp-1.0.0/bodonlp.egg-info/dependency_links.txt +1 -0
  39. bodonlp-1.0.0/bodonlp.egg-info/entry_points.txt +3 -0
  40. bodonlp-1.0.0/bodonlp.egg-info/top_level.txt +2 -0
  41. bodonlp-1.0.0/pyproject.toml +42 -0
  42. bodonlp-1.0.0/setup.cfg +4 -0
  43. bodonlp-1.0.0/setup.py +54 -0
  44. bodonlp-1.0.0/tests/test_cli.py +51 -0
  45. bodonlp-1.0.0/tests/test_constants.py +36 -0
  46. bodonlp-1.0.0/tests/test_culture.py +42 -0
  47. bodonlp-1.0.0/tests/test_grammar.py +56 -0
  48. bodonlp-1.0.0/tests/test_lexicon.py +34 -0
  49. bodonlp-1.0.0/tests/test_numbers.py +54 -0
  50. bodonlp-1.0.0/tests/test_phonetics.py +37 -0
  51. bodonlp-1.0.0/tests/test_translator.py +35 -0
bodonlp-1.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Bhupesh Joshi
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.
bodonlp-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,296 @@
1
+ Metadata-Version: 2.1
2
+ Name: bodonlp
3
+ Version: 1.0.0
4
+ Summary: Bodo (बड़ो / बर') Language Standard NLP Library: 36,000+ Dictionary Entries, Universal Translation, Classifier Engine, and Cultural Heritage
5
+ Home-page: https://github.com/bhupeshjoshi7/bodo
6
+ Author: Bhupesh Joshi
7
+ Author-email: Bhupesh Joshi <bhupeshjoshi@example.com>
8
+ Maintainer: Bhupesh Joshi
9
+ Maintainer-email: Bhupesh Joshi <bhupeshjoshi@example.com>
10
+ Project-URL: Homepage, https://github.com/bhupeshjoshi7/bodo
11
+ Project-URL: Documentation, https://github.com/bhupeshjoshi7/bodo/blob/main/DOCUMENTATION.md
12
+ Project-URL: GitHub, https://github.com/bhupeshjoshi7/bodo
13
+ Project-URL: Bug Tracker, https://github.com/bhupeshjoshi7/bodo/issues
14
+ Keywords: bodo,brx,nlp,translation,bodoland,indian-languages,tibeto-burman,dictionary
15
+ Classifier: Development Status :: 5 - Production/Stable
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Intended Audience :: Education
18
+ Classifier: Intended Audience :: Science/Research
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.8
21
+ Classifier: Programming Language :: Python :: 3.9
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: License :: OSI Approved :: MIT License
26
+ Classifier: Operating System :: OS Independent
27
+ Classifier: Topic :: Text Processing :: Linguistic
28
+ Requires-Python: >=3.8
29
+ Description-Content-Type: text/markdown
30
+ License-File: LICENSE
31
+
32
+ # bodonlp · बर' राव (Bodo Language Standard NLP Library)
33
+
34
+ [![PyPI version](https://img.shields.io/badge/pypi-v1.0.0-blue.svg)](https://pypi.org/project/bodonlp/)
35
+ [![Python Versions](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-brightgreen.svg)](https://pypi.org/project/bodonlp/)
36
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
37
+ [![Language](https://img.shields.io/badge/ISO%20639--3-brx-orange.svg)](https://iso639-3.sil.org/code/brx)
38
+ [![FLORES-200 / NLLB](https://img.shields.io/badge/NLLB--200-brx__Deva-red.svg)](https://huggingface.co/facebook/nllb-200-distilled-600M)
39
+
40
+ A standard-library-style Python package and natural language processing toolkit for the **Bodo Language** (*बड़ो / बर'*, ISO 639-3: `brx`, FLORES/NLLB: `brx_Deva`), an official scheduled language of India spoken predominantly in the Bodoland Territorial Region (BTR) and Assam.
41
+
42
+ ---
43
+
44
+ ## 🌟 Key Highlights
45
+
46
+ - **36,770+ Offline Dictionary Entries**: Instant, zero-latency multi-way lookups across Bodo (Devanagari), Romanized Bodo, English, and Hindi compiled from official Bodo Sahitya Sabha datasets (*Bihung*).
47
+ - **Universal Multi-Engine Translation**: Bidirectional translation between Bodo and English, Hindi, Assamese, and 100+ global languages via local rule-based translation, universal pivot bridging, Hugging Face Meta NLLB-200 / AI4Bharat IndicTrans2, and LLM adapters.
48
+ - **Unique Bodo Numeral Classifiers**: Full support for Bodo's classifier system (`सा-` for humans, `मा-` for animals, `गं-` for flat/curved items, `दं-` for tall/cylindrical objects, `थाइ-` for fruits).
49
+ - **Agglutinative Morphology & Syntax**: Verb conjugation across 6 tenses/aspects, negation (`-आ` / `-या`), pluralization (`-फोर`), case declension (Accusative `-खौ`, Instrumental `-जों`, Dative `-नो`, Locative `-आव`), and Subject-Object-Verb (SOV) sentence synthesis.
50
+ - **Phonetics & Bidirectional Transliteration**: Seamless conversion between Devanagari (*बर' हांखो*) and Romanized/Latin Bodo scripts.
51
+ - **Voice AI & Acoustic Cadence**: Syllable stress calculation, high/low pitch tone profiling, and SSML generation for Text-To-Speech (TTS).
52
+ - **Cultural Heritage Engine**: Complete encyclopedic repositories of traditional festivals (*Bwisagu, Domashi, Kherai*), musical instruments (*Sifung, Kham, Serja*), attire (*Dokhona, Aronai*), clans/surnames (*Basumatary, Brahma, Narzary*), and sacred Bathou principles.
53
+ - **Internet Scrapers & Corpus Mining**: Ready-to-run scraping tools for Bodo Wikipedia / Wikimedia Incubator, Glosbe, and Hugging Face text datasets.
54
+
55
+ ---
56
+
57
+ ## 📦 Installation
58
+
59
+ ### From PyPI:
60
+ ```bash
61
+ pip install bodonlp
62
+ ```
63
+
64
+ ### From Source (Editable / Development Mode):
65
+ ```bash
66
+ git clone https://github.com/bhupeshjoshi7/bodo.git
67
+ cd bodo
68
+ pip install -e .
69
+ ```
70
+
71
+ ---
72
+
73
+ ## 🚀 Quick Start
74
+
75
+ ### 1. Universal Translation
76
+ ```python
77
+ import bodonlp
78
+
79
+ # Translate English to Bodo (Devanagari + Romanized)
80
+ res = bodonlp.translate("Hello, how are you?")
81
+ print(res.text) # मा खबर?
82
+ print(res.romanized) # Ma khobor?
83
+ print(res.method) # rule_based
84
+
85
+ # Translate Bodo to English
86
+ res_en = bodonlp.translate("आं मोजाङैनो दं", target="en")
87
+ print(res_en.text) # I am fine
88
+
89
+ # Translate between Hindi and Bodo
90
+ res_hi = bodonlp.translate("नमस्ते, आप कैसे हैं?", target="brx")
91
+ print(res_hi.text) # खुलुमबाय, मा खबर?
92
+ ```
93
+
94
+ ### 2. Multi-Way Dictionary Lookup
95
+ ```python
96
+ import bodonlp
97
+
98
+ # Search by Bodo Devanagari
99
+ w1 = bodonlp.lookup("खुलुमबाय")
100
+ print(w1.english) # Hello / Greetings
101
+ print(w1.roman) # Khulumbai
102
+ print(w1.pos) # phrase
103
+
104
+ # Search by English
105
+ w2 = bodonlp.lookup("water")
106
+ print(w2.bodo) # दै
107
+ print(w2.roman) # Dwi
108
+
109
+ # Search by Romanized Bodo
110
+ w3 = bodonlp.lookup("bifang")
111
+ print(w3.bodo) # बिफां (tree)
112
+ ```
113
+
114
+ ### 3. Numeral System & Classifiers
115
+ In Bodo, numerals attach to nouns using specific classifiers:
116
+ ```python
117
+ import bodonlp
118
+
119
+ # Numbers to words
120
+ print(bodonlp.num_to_words(42)) # 'ब्रैजिनै'
121
+ print(bodonlp.num_to_words(42, script="latin")) # 'brwizinwi'
122
+ print(bodonlp.numbers.to_devanagari_numerals(42)) # '४२'
123
+
124
+ # Classifiers:
125
+ # 'सा-' (sa) for humans
126
+ print(bodonlp.numbers.apply_classifier("mansi", 1)) # 'सासे मानसि' (one person)
127
+ print(bodonlp.numbers.apply_classifier("mansi", 2)) # 'सानै मानसि' (two people)
128
+
129
+ # 'मा-' (ma) for animals
130
+ print(bodonlp.numbers.apply_classifier("swima", 1)) # 'मासे सैमा' (one dog)
131
+ print(bodonlp.numbers.apply_classifier("swima", 2)) # 'मानै सैमा' (two dogs)
132
+
133
+ # 'दं-' (dwng) for trees, rivers, ropes
134
+ print(bodonlp.numbers.apply_classifier("tree", 1)) # 'दंसे बिफां' (one tree)
135
+ ```
136
+
137
+ ### 4. Grammar, Verb Conjugation & Syntax
138
+ ```python
139
+ import bodonlp
140
+
141
+ # Verb Conjugation (root 'जा' - to eat)
142
+ print(bodonlp.conjugate("जा", tense="present")) # 'जायो' (eats)
143
+ print(bodonlp.conjugate("जा", tense="present_continuous")) # 'जादों' (is eating)
144
+ print(bodonlp.conjugate("जा", tense="past")) # 'जाबाय' (ate / has eaten)
145
+ print(bodonlp.conjugate("जा", tense="future")) # 'जागोन' (will eat)
146
+ print(bodonlp.conjugate("जा", tense="present", negative=True)) # 'जाया' (does not eat)
147
+
148
+ # Pluralization & Case Declension
149
+ print(bodonlp.pluralize("मानसि")) # 'मानसिफोर' (people)
150
+ print(bodonlp.decline_noun("मानसि", bodonlp.constants.Case.ACCUSATIVE)) # 'मानसिखौ' (the person [object])
151
+ print(bodonlp.decline_noun("न'", bodonlp.constants.Case.LOCATIVE)) # 'न'आव' (in the house)
152
+
153
+ # Subject-Object-Verb (SOV) Sentence Construction
154
+ sent = bodonlp.build_sentence(subject="आं", object_="ओंखाम", verb="जा", tense="present")
155
+ print(sent) # 'आं ओंखाम जायो।' (I eat rice.)
156
+ ```
157
+
158
+ ### 5. Phonetics & Transliteration
159
+ ```python
160
+ import bodonlp
161
+
162
+ # Transliterate Romanized text to Devanagari
163
+ dev = bodonlp.transliterate("Khulumbai, ang Boro rao swlwngdwng.", to_script="devanagari")
164
+ print(dev) # 'खुलुमबाय, आं बर' राव सोलोंदों।'
165
+
166
+ # Transliterate Devanagari to Roman
167
+ lat = bodonlp.transliterate("गोजोन फुंबिलि", to_script="latin")
168
+ print(lat) # 'gwjwn fungbili'
169
+ ```
170
+
171
+ ### 6. Proverbs (फाथास) & Riddles (खानथि)
172
+ ```python
173
+ import bodonlp
174
+
175
+ # Traditional Proverb
176
+ p = bodonlp.random_proverb()
177
+ print(p['bodo']) # गावनि आफाखौ मान हो, गुबुननि आफाखौबो मान हो।
178
+ print(p['english']) # Respect your own father, and respect others' father as well.
179
+ print(p['meaning']) # Treat all elders with equal reverence.
180
+
181
+ # Traditional Riddle
182
+ r = bodonlp.random_riddle()
183
+ print(r['question']) # आं जाखाङोब्ला बारायलांगो, आं लोंखाङोब्ला थैयो। आं सोर?
184
+ print(r['answer']) # अर (Or / Fire)
185
+ ```
186
+
187
+ ### 7. Cultural Heritage
188
+ ```python
189
+ import bodonlp.culture as culture
190
+
191
+ # Festivals
192
+ for f in culture.list_festivals():
193
+ print(f"{f.bodo_name} ({f.name}): {f.significance}")
194
+
195
+ # Instruments (Sifung, Kham, Serja, etc.)
196
+ for inst in culture.list_instruments():
197
+ print(f"{inst.bodo_name} - {inst.instrument_type}")
198
+
199
+ # Bodo Surnames & Lineages
200
+ for clan in culture.list_clans():
201
+ print(f"{clan['devanagari']} ({clan['surname']}): {clan['meaning']}")
202
+ ```
203
+
204
+ ---
205
+
206
+ ## 💻 Command-Line Interface (CLI)
207
+
208
+ The library ships with a full CLI tool `bodonlp` (or `bodo-cli`):
209
+
210
+ ```bash
211
+ # 1. Translate
212
+ bodonlp translate "How are you?"
213
+ bodonlp translate "आं मोजाङैनो दं" --target en
214
+
215
+ # 2. Dictionary Search
216
+ bodonlp lookup "खुलुमबाय"
217
+ bodonlp lookup "water"
218
+ bodonlp search "dance"
219
+
220
+ # 3. Numbers & Classifiers
221
+ bodonlp number 42
222
+ bodonlp number 3 --classifier mansi
223
+
224
+ # 4. Conjugation
225
+ bodonlp conjugate "जा" --tense past
226
+ bodonlp conjugate "थां" --tense future --negative
227
+
228
+ # 5. Culture & Heritage
229
+ bodonlp culture --festivals
230
+ bodonlp culture --instruments
231
+ bodonlp culture --clans
232
+
233
+ # 6. Proverbs & Riddles
234
+ bodonlp proverb
235
+ bodonlp riddle
236
+
237
+ # 7. Voice Analysis & SSML
238
+ bodonlp voice "Welcome to Bodoland"
239
+
240
+ # 8. Web Scraping Wikipedia
241
+ bodonlp scrape --wiki "बैसागु"
242
+
243
+ # 9. Library Info
244
+ bodonlp info
245
+ ```
246
+
247
+ ---
248
+
249
+ ## 🌐 Internet Scraping & Corpus Mining Tools
250
+
251
+ Located in `data_sources/`:
252
+ - `data_sources/scrape_wiki_bodo.py`: Scrapes articles from Wikimedia Incubator (`Wp/brx/`) and Bodo Wikipedia, producing clean sentence corpora and vocabulary frequencies.
253
+ - `data_sources/scrape_glosbe.py`: Scrapes bilingual dictionary pairs.
254
+ - `data_sources/fetch_huggingface_corpus.py`: Streams web-scale Bodo datasets from Hugging Face Hub (`ai4bharat/IndicCorpV2`, FLORES-200).
255
+ - `data_sources/ingest_dictionary.py`: Parses and compiles dictionary databases.
256
+
257
+ ---
258
+
259
+ ## 🛠 Publishing to PyPI
260
+
261
+ To build and publish this library to PyPI:
262
+
263
+ 1. **Install build tools:**
264
+ ```bash
265
+ pip install --upgrade build twine
266
+ ```
267
+
268
+ 2. **Build distribution archives:**
269
+ ```bash
270
+ python -m build
271
+ ```
272
+
273
+ 3. **Check distribution:**
274
+ ```bash
275
+ twine check dist/*
276
+ ```
277
+
278
+ 4. **Upload to PyPI:**
279
+ ```bash
280
+ twine upload dist/*
281
+ ```
282
+
283
+ ---
284
+
285
+ ## 📖 Citation & License
286
+
287
+ This library is licensed under the [MIT License](LICENSE).
288
+
289
+ ```bibtex
290
+ @software{bodonlp2026,
291
+ author = {Bhupesh Joshi},
292
+ title = {bodonlp: Bodo Language Standard NLP Library},
293
+ year = {2026},
294
+ url = {https://github.com/bhupeshjoshi7/bodo}
295
+ }
296
+ ```
@@ -0,0 +1,265 @@
1
+ # bodonlp · बर' राव (Bodo Language Standard NLP Library)
2
+
3
+ [![PyPI version](https://img.shields.io/badge/pypi-v1.0.0-blue.svg)](https://pypi.org/project/bodonlp/)
4
+ [![Python Versions](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-brightgreen.svg)](https://pypi.org/project/bodonlp/)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+ [![Language](https://img.shields.io/badge/ISO%20639--3-brx-orange.svg)](https://iso639-3.sil.org/code/brx)
7
+ [![FLORES-200 / NLLB](https://img.shields.io/badge/NLLB--200-brx__Deva-red.svg)](https://huggingface.co/facebook/nllb-200-distilled-600M)
8
+
9
+ A standard-library-style Python package and natural language processing toolkit for the **Bodo Language** (*बड़ो / बर'*, ISO 639-3: `brx`, FLORES/NLLB: `brx_Deva`), an official scheduled language of India spoken predominantly in the Bodoland Territorial Region (BTR) and Assam.
10
+
11
+ ---
12
+
13
+ ## 🌟 Key Highlights
14
+
15
+ - **36,770+ Offline Dictionary Entries**: Instant, zero-latency multi-way lookups across Bodo (Devanagari), Romanized Bodo, English, and Hindi compiled from official Bodo Sahitya Sabha datasets (*Bihung*).
16
+ - **Universal Multi-Engine Translation**: Bidirectional translation between Bodo and English, Hindi, Assamese, and 100+ global languages via local rule-based translation, universal pivot bridging, Hugging Face Meta NLLB-200 / AI4Bharat IndicTrans2, and LLM adapters.
17
+ - **Unique Bodo Numeral Classifiers**: Full support for Bodo's classifier system (`सा-` for humans, `मा-` for animals, `गं-` for flat/curved items, `दं-` for tall/cylindrical objects, `थाइ-` for fruits).
18
+ - **Agglutinative Morphology & Syntax**: Verb conjugation across 6 tenses/aspects, negation (`-आ` / `-या`), pluralization (`-फोर`), case declension (Accusative `-खौ`, Instrumental `-जों`, Dative `-नो`, Locative `-आव`), and Subject-Object-Verb (SOV) sentence synthesis.
19
+ - **Phonetics & Bidirectional Transliteration**: Seamless conversion between Devanagari (*बर' हांखो*) and Romanized/Latin Bodo scripts.
20
+ - **Voice AI & Acoustic Cadence**: Syllable stress calculation, high/low pitch tone profiling, and SSML generation for Text-To-Speech (TTS).
21
+ - **Cultural Heritage Engine**: Complete encyclopedic repositories of traditional festivals (*Bwisagu, Domashi, Kherai*), musical instruments (*Sifung, Kham, Serja*), attire (*Dokhona, Aronai*), clans/surnames (*Basumatary, Brahma, Narzary*), and sacred Bathou principles.
22
+ - **Internet Scrapers & Corpus Mining**: Ready-to-run scraping tools for Bodo Wikipedia / Wikimedia Incubator, Glosbe, and Hugging Face text datasets.
23
+
24
+ ---
25
+
26
+ ## 📦 Installation
27
+
28
+ ### From PyPI:
29
+ ```bash
30
+ pip install bodonlp
31
+ ```
32
+
33
+ ### From Source (Editable / Development Mode):
34
+ ```bash
35
+ git clone https://github.com/bhupeshjoshi7/bodo.git
36
+ cd bodo
37
+ pip install -e .
38
+ ```
39
+
40
+ ---
41
+
42
+ ## 🚀 Quick Start
43
+
44
+ ### 1. Universal Translation
45
+ ```python
46
+ import bodonlp
47
+
48
+ # Translate English to Bodo (Devanagari + Romanized)
49
+ res = bodonlp.translate("Hello, how are you?")
50
+ print(res.text) # मा खबर?
51
+ print(res.romanized) # Ma khobor?
52
+ print(res.method) # rule_based
53
+
54
+ # Translate Bodo to English
55
+ res_en = bodonlp.translate("आं मोजाङैनो दं", target="en")
56
+ print(res_en.text) # I am fine
57
+
58
+ # Translate between Hindi and Bodo
59
+ res_hi = bodonlp.translate("नमस्ते, आप कैसे हैं?", target="brx")
60
+ print(res_hi.text) # खुलुमबाय, मा खबर?
61
+ ```
62
+
63
+ ### 2. Multi-Way Dictionary Lookup
64
+ ```python
65
+ import bodonlp
66
+
67
+ # Search by Bodo Devanagari
68
+ w1 = bodonlp.lookup("खुलुमबाय")
69
+ print(w1.english) # Hello / Greetings
70
+ print(w1.roman) # Khulumbai
71
+ print(w1.pos) # phrase
72
+
73
+ # Search by English
74
+ w2 = bodonlp.lookup("water")
75
+ print(w2.bodo) # दै
76
+ print(w2.roman) # Dwi
77
+
78
+ # Search by Romanized Bodo
79
+ w3 = bodonlp.lookup("bifang")
80
+ print(w3.bodo) # बिफां (tree)
81
+ ```
82
+
83
+ ### 3. Numeral System & Classifiers
84
+ In Bodo, numerals attach to nouns using specific classifiers:
85
+ ```python
86
+ import bodonlp
87
+
88
+ # Numbers to words
89
+ print(bodonlp.num_to_words(42)) # 'ब्रैजिनै'
90
+ print(bodonlp.num_to_words(42, script="latin")) # 'brwizinwi'
91
+ print(bodonlp.numbers.to_devanagari_numerals(42)) # '४२'
92
+
93
+ # Classifiers:
94
+ # 'सा-' (sa) for humans
95
+ print(bodonlp.numbers.apply_classifier("mansi", 1)) # 'सासे मानसि' (one person)
96
+ print(bodonlp.numbers.apply_classifier("mansi", 2)) # 'सानै मानसि' (two people)
97
+
98
+ # 'मा-' (ma) for animals
99
+ print(bodonlp.numbers.apply_classifier("swima", 1)) # 'मासे सैमा' (one dog)
100
+ print(bodonlp.numbers.apply_classifier("swima", 2)) # 'मानै सैमा' (two dogs)
101
+
102
+ # 'दं-' (dwng) for trees, rivers, ropes
103
+ print(bodonlp.numbers.apply_classifier("tree", 1)) # 'दंसे बिफां' (one tree)
104
+ ```
105
+
106
+ ### 4. Grammar, Verb Conjugation & Syntax
107
+ ```python
108
+ import bodonlp
109
+
110
+ # Verb Conjugation (root 'जा' - to eat)
111
+ print(bodonlp.conjugate("जा", tense="present")) # 'जायो' (eats)
112
+ print(bodonlp.conjugate("जा", tense="present_continuous")) # 'जादों' (is eating)
113
+ print(bodonlp.conjugate("जा", tense="past")) # 'जाबाय' (ate / has eaten)
114
+ print(bodonlp.conjugate("जा", tense="future")) # 'जागोन' (will eat)
115
+ print(bodonlp.conjugate("जा", tense="present", negative=True)) # 'जाया' (does not eat)
116
+
117
+ # Pluralization & Case Declension
118
+ print(bodonlp.pluralize("मानसि")) # 'मानसिफोर' (people)
119
+ print(bodonlp.decline_noun("मानसि", bodonlp.constants.Case.ACCUSATIVE)) # 'मानसिखौ' (the person [object])
120
+ print(bodonlp.decline_noun("न'", bodonlp.constants.Case.LOCATIVE)) # 'न'आव' (in the house)
121
+
122
+ # Subject-Object-Verb (SOV) Sentence Construction
123
+ sent = bodonlp.build_sentence(subject="आं", object_="ओंखाम", verb="जा", tense="present")
124
+ print(sent) # 'आं ओंखाम जायो।' (I eat rice.)
125
+ ```
126
+
127
+ ### 5. Phonetics & Transliteration
128
+ ```python
129
+ import bodonlp
130
+
131
+ # Transliterate Romanized text to Devanagari
132
+ dev = bodonlp.transliterate("Khulumbai, ang Boro rao swlwngdwng.", to_script="devanagari")
133
+ print(dev) # 'खुलुमबाय, आं बर' राव सोलोंदों।'
134
+
135
+ # Transliterate Devanagari to Roman
136
+ lat = bodonlp.transliterate("गोजोन फुंबिलि", to_script="latin")
137
+ print(lat) # 'gwjwn fungbili'
138
+ ```
139
+
140
+ ### 6. Proverbs (फाथास) & Riddles (खानथि)
141
+ ```python
142
+ import bodonlp
143
+
144
+ # Traditional Proverb
145
+ p = bodonlp.random_proverb()
146
+ print(p['bodo']) # गावनि आफाखौ मान हो, गुबुननि आफाखौबो मान हो।
147
+ print(p['english']) # Respect your own father, and respect others' father as well.
148
+ print(p['meaning']) # Treat all elders with equal reverence.
149
+
150
+ # Traditional Riddle
151
+ r = bodonlp.random_riddle()
152
+ print(r['question']) # आं जाखाङोब्ला बारायलांगो, आं लोंखाङोब्ला थैयो। आं सोर?
153
+ print(r['answer']) # अर (Or / Fire)
154
+ ```
155
+
156
+ ### 7. Cultural Heritage
157
+ ```python
158
+ import bodonlp.culture as culture
159
+
160
+ # Festivals
161
+ for f in culture.list_festivals():
162
+ print(f"{f.bodo_name} ({f.name}): {f.significance}")
163
+
164
+ # Instruments (Sifung, Kham, Serja, etc.)
165
+ for inst in culture.list_instruments():
166
+ print(f"{inst.bodo_name} - {inst.instrument_type}")
167
+
168
+ # Bodo Surnames & Lineages
169
+ for clan in culture.list_clans():
170
+ print(f"{clan['devanagari']} ({clan['surname']}): {clan['meaning']}")
171
+ ```
172
+
173
+ ---
174
+
175
+ ## 💻 Command-Line Interface (CLI)
176
+
177
+ The library ships with a full CLI tool `bodonlp` (or `bodo-cli`):
178
+
179
+ ```bash
180
+ # 1. Translate
181
+ bodonlp translate "How are you?"
182
+ bodonlp translate "आं मोजाङैनो दं" --target en
183
+
184
+ # 2. Dictionary Search
185
+ bodonlp lookup "खुलुमबाय"
186
+ bodonlp lookup "water"
187
+ bodonlp search "dance"
188
+
189
+ # 3. Numbers & Classifiers
190
+ bodonlp number 42
191
+ bodonlp number 3 --classifier mansi
192
+
193
+ # 4. Conjugation
194
+ bodonlp conjugate "जा" --tense past
195
+ bodonlp conjugate "थां" --tense future --negative
196
+
197
+ # 5. Culture & Heritage
198
+ bodonlp culture --festivals
199
+ bodonlp culture --instruments
200
+ bodonlp culture --clans
201
+
202
+ # 6. Proverbs & Riddles
203
+ bodonlp proverb
204
+ bodonlp riddle
205
+
206
+ # 7. Voice Analysis & SSML
207
+ bodonlp voice "Welcome to Bodoland"
208
+
209
+ # 8. Web Scraping Wikipedia
210
+ bodonlp scrape --wiki "बैसागु"
211
+
212
+ # 9. Library Info
213
+ bodonlp info
214
+ ```
215
+
216
+ ---
217
+
218
+ ## 🌐 Internet Scraping & Corpus Mining Tools
219
+
220
+ Located in `data_sources/`:
221
+ - `data_sources/scrape_wiki_bodo.py`: Scrapes articles from Wikimedia Incubator (`Wp/brx/`) and Bodo Wikipedia, producing clean sentence corpora and vocabulary frequencies.
222
+ - `data_sources/scrape_glosbe.py`: Scrapes bilingual dictionary pairs.
223
+ - `data_sources/fetch_huggingface_corpus.py`: Streams web-scale Bodo datasets from Hugging Face Hub (`ai4bharat/IndicCorpV2`, FLORES-200).
224
+ - `data_sources/ingest_dictionary.py`: Parses and compiles dictionary databases.
225
+
226
+ ---
227
+
228
+ ## 🛠 Publishing to PyPI
229
+
230
+ To build and publish this library to PyPI:
231
+
232
+ 1. **Install build tools:**
233
+ ```bash
234
+ pip install --upgrade build twine
235
+ ```
236
+
237
+ 2. **Build distribution archives:**
238
+ ```bash
239
+ python -m build
240
+ ```
241
+
242
+ 3. **Check distribution:**
243
+ ```bash
244
+ twine check dist/*
245
+ ```
246
+
247
+ 4. **Upload to PyPI:**
248
+ ```bash
249
+ twine upload dist/*
250
+ ```
251
+
252
+ ---
253
+
254
+ ## 📖 Citation & License
255
+
256
+ This library is licensed under the [MIT License](LICENSE).
257
+
258
+ ```bibtex
259
+ @software{bodonlp2026,
260
+ author = {Bhupesh Joshi},
261
+ title = {bodonlp: Bodo Language Standard NLP Library},
262
+ year = {2026},
263
+ url = {https://github.com/bhupeshjoshi7/bodo}
264
+ }
265
+ ```
@@ -0,0 +1,18 @@
1
+ """
2
+ Convenience alias package for bodonlp.
3
+ Allows users to do `import bodo_lang` interchangeably with `import bodonlp`.
4
+ """
5
+
6
+ import bodonlp
7
+ from bodonlp import *
8
+ from bodonlp import (
9
+ numbers,
10
+ grammar,
11
+ lexicon,
12
+ translator,
13
+ culture,
14
+ scraper,
15
+ voice,
16
+ )
17
+
18
+ __all__ = bodonlp.__all__