garhwali 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 (43) hide show
  1. garhwali-1.0.0/PKG-INFO +89 -0
  2. garhwali-1.0.0/README.md +75 -0
  3. garhwali-1.0.0/garhwali/__init__.py +60 -0
  4. garhwali-1.0.0/garhwali/cli.py +75 -0
  5. garhwali-1.0.0/garhwali/constants.py +56 -0
  6. garhwali-1.0.0/garhwali/culture/__init__.py +12 -0
  7. garhwali-1.0.0/garhwali/culture/calendar.py +51 -0
  8. garhwali-1.0.0/garhwali/culture/festivals.py +34 -0
  9. garhwali-1.0.0/garhwali/culture/literature.py +52 -0
  10. garhwali-1.0.0/garhwali/grammar/__init__.py +15 -0
  11. garhwali-1.0.0/garhwali/grammar/nouns.py +82 -0
  12. garhwali-1.0.0/garhwali/grammar/postpositions.py +29 -0
  13. garhwali-1.0.0/garhwali/grammar/pronouns.py +68 -0
  14. garhwali-1.0.0/garhwali/grammar/syntax.py +62 -0
  15. garhwali-1.0.0/garhwali/grammar/verbs.py +140 -0
  16. garhwali-1.0.0/garhwali/lexicon/__init__.py +12 -0
  17. garhwali-1.0.0/garhwali/lexicon/data/phrases.json +233 -0
  18. garhwali-1.0.0/garhwali/lexicon/data/proverbs.json +62 -0
  19. garhwali-1.0.0/garhwali/lexicon/data/riddles.json +32 -0
  20. garhwali-1.0.0/garhwali/lexicon/data/words.json +1833 -0
  21. garhwali-1.0.0/garhwali/lexicon/dictionary.py +71 -0
  22. garhwali-1.0.0/garhwali/lexicon/morphology.py +98 -0
  23. garhwali-1.0.0/garhwali/numbers/__init__.py +6 -0
  24. garhwali-1.0.0/garhwali/numbers/converter.py +39 -0
  25. garhwali-1.0.0/garhwali/phonetics.py +120 -0
  26. garhwali-1.0.0/garhwali/translator/__init__.py +13 -0
  27. garhwali-1.0.0/garhwali/translator/engine.py +46 -0
  28. garhwali-1.0.0/garhwali/translator/llm_adapter.py +11 -0
  29. garhwali-1.0.0/garhwali/translator/pivot.py +7 -0
  30. garhwali-1.0.0/garhwali/translator/rule_based.py +169 -0
  31. garhwali-1.0.0/garhwali/voice/__init__.py +6 -0
  32. garhwali-1.0.0/garhwali/voice/engine.py +51 -0
  33. garhwali-1.0.0/garhwali.egg-info/PKG-INFO +89 -0
  34. garhwali-1.0.0/garhwali.egg-info/SOURCES.txt +41 -0
  35. garhwali-1.0.0/garhwali.egg-info/dependency_links.txt +1 -0
  36. garhwali-1.0.0/garhwali.egg-info/top_level.txt +2 -0
  37. garhwali-1.0.0/pyproject.toml +16 -0
  38. garhwali-1.0.0/setup.cfg +4 -0
  39. garhwali-1.0.0/setup.py +32 -0
  40. garhwali-1.0.0/tests/__init__.py +0 -0
  41. garhwali-1.0.0/tests/test_garhwali_core.py +44 -0
  42. garhwali-1.0.0/tests/test_garhwali_grammar.py +75 -0
  43. garhwali-1.0.0/tests/test_garhwali_translator.py +36 -0
@@ -0,0 +1,89 @@
1
+ Metadata-Version: 2.4
2
+ Name: garhwali
3
+ Version: 1.0.0
4
+ Summary: Garhwali (गढ़वाली) Language Library: 300k+ words, NLP toolkit, multi-dialect translation and Himalayan lore
5
+ Home-page: https://github.com/infoakshatsinghbisht-eng/garhwali-language-library
6
+ Author: Akshat Singh Bisht
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.8
11
+ Description-Content-Type: text/markdown
12
+ Dynamic: home-page
13
+ Dynamic: requires-python
14
+
15
+ # 🏔️ Garhwali (गढ़वाली) Language Library
16
+
17
+ A comprehensive Python library, NLP toolkit, and cultural heritage engine for the **Garhwali Language (गढ़वाली भाषा)** — spoken by over 3 million people across Uttarakhand's Garhwal Himalayas (Pauri, Chamoli, Tehri, Uttarkashi, Rudraprayag, Dehradun, and Haridwar).
18
+
19
+ ---
20
+
21
+ ## 🌟 Key Features
22
+
23
+ 1. **📚 300,000+ Inflected Word Forms**:
24
+ - High-performance morphological engine covering noun declensions, pronoun cases, verb tenses/aspects, and postpositional compounds.
25
+ 2. **🔄 Multi-Strategy Translator**:
26
+ - Fast, accurate translation across **English $\leftrightarrow$ Garhwali**, **Hindi $\leftrightarrow$ Garhwali**, and **Hinglish $\leftrightarrow$ Garhwali**.
27
+ 3. **🏔️ Dialect Support**:
28
+ - **Srinagariya** (Standard Pauri Garhwal)
29
+ - **Rathwali / Tehri** (Tehri Garhwal)
30
+ - **Salani** (Southern Pauri / Kotdwar)
31
+ - **Badhani** (Chamoli / Alaknanda Valley)
32
+ 4. **🗣️ Phonetics & Syllable Engine**:
33
+ - Native syllabification, Devanagari $\leftrightarrow$ Romanized phonetic transliteration.
34
+ 5. **📜 Himalayan Lore & Culture**:
35
+ - Proverbs (*अखाण / पखाण*), Interactive Riddles (*आणा*), 12 Garhwali Months & 6 Ritus, Festivals (*Phooldei, Igas Bagwal, Nanda Devi Raj Jat*), and classic folk literature (*Chaita ki Chaitwali, Bedu Pako*).
36
+ 6. **🔢 Garhwali Numbers**:
37
+ - Converts any integer into Garhwali words, ordinals, and Devanagari numerals.
38
+ 7. **🎙️ Voice Synthesis SSML & Audio**:
39
+ - Himalayan pitch envelope generator, SSML formatter, and uncompressed PCM WAV synthesis.
40
+
41
+ ---
42
+
43
+ ## 🚀 Installation & Usage
44
+
45
+ ```bash
46
+ pip install garhwali
47
+ ```
48
+
49
+ ### Quick Python Example
50
+
51
+ ```python
52
+ import garhwali
53
+
54
+ # 1. Translate English or Hinglish to Garhwali
55
+ res = garhwali.translate("Where is mom?")
56
+ print(res.text) # "ईजा कहाँ छ?"
57
+
58
+ res_hinglish = garhwali.translate("are yah chal kyon nahin raha hai")
59
+ print(res_hinglish.text) # "अरे यो किलै नि चलनो छ?"
60
+
61
+ # 2. Dialect variations
62
+ print(garhwali.translate("What is your name?", dialect="rathwali").text) # "तमरो नाव क्या छ?"
63
+ print(garhwali.translate("What is your name?", dialect="salani").text) # "तुमारू नाव क्या छ?"
64
+
65
+ # 3. Numbers to Garhwali words
66
+ print(garhwali.num_to_words(2026)) # "दुई हजार छब्बीस"
67
+ print(garhwali.to_devanagari_numerals(2026)) # "२०२६"
68
+
69
+ # 4. Phonetics & Syllables
70
+ print(garhwali.syllables("गढ़वाली")) # ['गढ़', 'वा', 'ली']
71
+ print(garhwali.devanagari_to_latin("ईजा कहाँ छ?")) # "Ija kahaan chha?"
72
+
73
+ # 5. Culture & Calendar
74
+ print(garhwali.get_current_season()) # {'name_garhwali': 'सरद', 'english': 'Autumn'}
75
+ print(garhwali.proverbs.all()[0]["garhwali"]) # "अपणी घाम मा कुकुर भी राजा।"
76
+ ```
77
+
78
+ ---
79
+
80
+ ## 🧪 Testing
81
+
82
+ ```bash
83
+ python -m unittest discover tests
84
+ ```
85
+
86
+ ---
87
+
88
+ ## 📄 License
89
+ MIT License. Open-source for the preservation and advancement of Himalayan languages.
@@ -0,0 +1,75 @@
1
+ # 🏔️ Garhwali (गढ़वाली) Language Library
2
+
3
+ A comprehensive Python library, NLP toolkit, and cultural heritage engine for the **Garhwali Language (गढ़वाली भाषा)** — spoken by over 3 million people across Uttarakhand's Garhwal Himalayas (Pauri, Chamoli, Tehri, Uttarkashi, Rudraprayag, Dehradun, and Haridwar).
4
+
5
+ ---
6
+
7
+ ## 🌟 Key Features
8
+
9
+ 1. **📚 300,000+ Inflected Word Forms**:
10
+ - High-performance morphological engine covering noun declensions, pronoun cases, verb tenses/aspects, and postpositional compounds.
11
+ 2. **🔄 Multi-Strategy Translator**:
12
+ - Fast, accurate translation across **English $\leftrightarrow$ Garhwali**, **Hindi $\leftrightarrow$ Garhwali**, and **Hinglish $\leftrightarrow$ Garhwali**.
13
+ 3. **🏔️ Dialect Support**:
14
+ - **Srinagariya** (Standard Pauri Garhwal)
15
+ - **Rathwali / Tehri** (Tehri Garhwal)
16
+ - **Salani** (Southern Pauri / Kotdwar)
17
+ - **Badhani** (Chamoli / Alaknanda Valley)
18
+ 4. **🗣️ Phonetics & Syllable Engine**:
19
+ - Native syllabification, Devanagari $\leftrightarrow$ Romanized phonetic transliteration.
20
+ 5. **📜 Himalayan Lore & Culture**:
21
+ - Proverbs (*अखाण / पखाण*), Interactive Riddles (*आणा*), 12 Garhwali Months & 6 Ritus, Festivals (*Phooldei, Igas Bagwal, Nanda Devi Raj Jat*), and classic folk literature (*Chaita ki Chaitwali, Bedu Pako*).
22
+ 6. **🔢 Garhwali Numbers**:
23
+ - Converts any integer into Garhwali words, ordinals, and Devanagari numerals.
24
+ 7. **🎙️ Voice Synthesis SSML & Audio**:
25
+ - Himalayan pitch envelope generator, SSML formatter, and uncompressed PCM WAV synthesis.
26
+
27
+ ---
28
+
29
+ ## 🚀 Installation & Usage
30
+
31
+ ```bash
32
+ pip install garhwali
33
+ ```
34
+
35
+ ### Quick Python Example
36
+
37
+ ```python
38
+ import garhwali
39
+
40
+ # 1. Translate English or Hinglish to Garhwali
41
+ res = garhwali.translate("Where is mom?")
42
+ print(res.text) # "ईजा कहाँ छ?"
43
+
44
+ res_hinglish = garhwali.translate("are yah chal kyon nahin raha hai")
45
+ print(res_hinglish.text) # "अरे यो किलै नि चलनो छ?"
46
+
47
+ # 2. Dialect variations
48
+ print(garhwali.translate("What is your name?", dialect="rathwali").text) # "तमरो नाव क्या छ?"
49
+ print(garhwali.translate("What is your name?", dialect="salani").text) # "तुमारू नाव क्या छ?"
50
+
51
+ # 3. Numbers to Garhwali words
52
+ print(garhwali.num_to_words(2026)) # "दुई हजार छब्बीस"
53
+ print(garhwali.to_devanagari_numerals(2026)) # "२०२६"
54
+
55
+ # 4. Phonetics & Syllables
56
+ print(garhwali.syllables("गढ़वाली")) # ['गढ़', 'वा', 'ली']
57
+ print(garhwali.devanagari_to_latin("ईजा कहाँ छ?")) # "Ija kahaan chha?"
58
+
59
+ # 5. Culture & Calendar
60
+ print(garhwali.get_current_season()) # {'name_garhwali': 'सरद', 'english': 'Autumn'}
61
+ print(garhwali.proverbs.all()[0]["garhwali"]) # "अपणी घाम मा कुकुर भी राजा।"
62
+ ```
63
+
64
+ ---
65
+
66
+ ## 🧪 Testing
67
+
68
+ ```bash
69
+ python -m unittest discover tests
70
+ ```
71
+
72
+ ---
73
+
74
+ ## 📄 License
75
+ MIT License. Open-source for the preservation and advancement of Himalayan languages.
@@ -0,0 +1,60 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ Garhwali (गढ़वाली) Language Library.
4
+ Comprehensive NLP and Cultural Heritage toolkit for the Garhwali Language:
5
+ - 300,000+ Inflected Word Forms
6
+ - Multi-dialect Translation (Srinagariya, Rathwali, Tehri, Salani, Badhani)
7
+ - Phonetics & Syllabification
8
+ - Case Declensions & Verb Conjugations
9
+ - Himalayan Calendar, Proverbs (अखाण/पखाण), Riddles (आणा), Literature
10
+ - Voice Synthesis & SSML
11
+ """
12
+
13
+ __version__ = "1.0.0"
14
+ __author__ = "Akshat Singh Bisht"
15
+
16
+ from .translator.engine import translate, TranslationResult
17
+ from .lexicon.dictionary import GarhwaliDictionary
18
+ from .lexicon.morphology import get_morphology_engine, MorphAnalysis
19
+ from .phonetics import devanagari_to_latin, latin_to_devanagari, syllables
20
+ from .numbers.converter import num_to_words, to_devanagari_numerals, ordinal
21
+ from .culture.calendar import GARHWALI_MONTHS, GARHWALI_RITUS, get_current_season
22
+ from .culture.festivals import list_festivals
23
+ from .culture.literature import poems, epics, authors
24
+ from .voice.engine import GarhwaliVoiceSynthesizer
25
+
26
+ # Global instances for simple top-level access
27
+ _DICT = GarhwaliDictionary()
28
+ phrases = type("Phrases", (), {"all": _DICT.all_phrases, "random": _DICT.random_phrase})()
29
+ proverbs = type("Proverbs", (), {"all": _DICT.all_proverbs, "random": _DICT.random_proverb})()
30
+ riddles = type("Riddles", (), {"all": _DICT.all_riddles, "random": _DICT.random_riddle})()
31
+
32
+ def lookup(word: str):
33
+ return _DICT.lookup(word)
34
+
35
+ def search(query: str):
36
+ return _DICT.search(query)
37
+
38
+ def analyze(word: str):
39
+ engine = get_morphology_engine()
40
+ return engine.analyze(word)
41
+
42
+ def total_word_forms() -> int:
43
+ return get_morphology_engine().total_forms_count()
44
+
45
+ def get_months():
46
+ return GARHWALI_MONTHS
47
+
48
+ def get_seasons():
49
+ return GARHWALI_RITUS
50
+
51
+ __all__ = [
52
+ "translate", "TranslationResult",
53
+ "lookup", "search", "analyze", "total_word_forms",
54
+ "syllables", "devanagari_to_latin", "latin_to_devanagari",
55
+ "num_to_words", "to_devanagari_numerals", "ordinal",
56
+ "get_months", "get_seasons", "get_current_season",
57
+ "list_festivals", "poems", "epics", "authors",
58
+ "phrases", "proverbs", "riddles",
59
+ "GarhwaliVoiceSynthesizer"
60
+ ]
@@ -0,0 +1,75 @@
1
+ # -*- coding: utf-8 -*-
2
+ r"""Garhwali CLI tool with UTF-8 support on all platforms."""
3
+
4
+ import sys
5
+ import argparse
6
+ from pathlib import Path
7
+
8
+ # Ensure UTF-8 output on Windows consoles
9
+ if hasattr(sys.stdout, "reconfigure"):
10
+ try:
11
+ sys.stdout.reconfigure(encoding="utf-8", errors="replace")
12
+ except Exception:
13
+ pass
14
+
15
+ import garhwali
16
+
17
+ def main():
18
+ parser = argparse.ArgumentParser(
19
+ prog="garhwali",
20
+ description="Garhwali (गढ़वाली) Language Library & Multi-Dialect Tool"
21
+ )
22
+ subparsers = parser.add_subparsers(dest="command", help="Available commands")
23
+
24
+ # translate
25
+ t_parser = subparsers.add_parser("translate", help="Translate English/Hindi/Hinglish to Garhwali")
26
+ t_parser.add_argument("text", type=str, help="Text to translate")
27
+ t_parser.add_argument("--dialect", "-d", type=str, default="srinagariya",
28
+ choices=["srinagariya", "rathwali", "tehri", "salani", "badhani"],
29
+ help="Garhwali dialect variant")
30
+
31
+ # lookup
32
+ l_parser = subparsers.add_parser("lookup", help="Look up a Garhwali word")
33
+ l_parser.add_argument("word", type=str, help="Word to look up")
34
+
35
+ # num
36
+ n_parser = subparsers.add_parser("num", help="Convert numbers to Garhwali words")
37
+ n_parser.add_argument("value", type=int, help="Integer value")
38
+
39
+ # culture
40
+ c_parser = subparsers.add_parser("culture", help="Explore Garhwali culture, proverbs, and calendar")
41
+
42
+ args = parser.parse_args()
43
+
44
+ if args.command == "translate":
45
+ res = garhwali.translate(args.text, dialect=args.dialect)
46
+ print(f"\nGarhwali [{res.dialect}]: {res.text}")
47
+ print(f"Confidence: {res.confidence * 100:.1f}% | Target: {res.target_lang}")
48
+ elif args.command == "lookup":
49
+ d = garhwali.lookup(args.word)
50
+ if d:
51
+ print(f"\nWord: {d.get('garhwali')}")
52
+ print(f"Hindi: {d.get('hindi')}")
53
+ print(f"English: {d.get('english')}")
54
+ print(f"POS: {d.get('pos')}")
55
+ if "dialect_variants" in d:
56
+ print(f"Dialects: {d['dialect_variants']}")
57
+ else:
58
+ print(f"Word '{args.word}' not found in dictionary.")
59
+ elif args.command == "num":
60
+ w = garhwali.num_to_words(args.value)
61
+ d = garhwali.to_devanagari_numerals(args.value)
62
+ print(f"\nNumber: {args.value} ({d})")
63
+ print(f"Garhwali words: {w}")
64
+ elif args.command == "culture":
65
+ s = garhwali.get_current_season()
66
+ print(f"\nCurrent Himalayan Ritu: {s.get('name_garhwali')} ({s.get('name_hindi')}) - {s.get('english_season')}")
67
+ print("\nRandom Garhwali Proverb (पखाणा):")
68
+ p = garhwali.proverbs.random()
69
+ print(f" \"{p.get('pakhana')}\"")
70
+ print(f" Meaning: {p.get('meaning')}")
71
+ else:
72
+ parser.print_help()
73
+
74
+ if __name__ == "__main__":
75
+ main()
@@ -0,0 +1,56 @@
1
+ # -*- coding: utf-8 -*-
2
+ """Garhwali Language Constants and Phoneme Definitions."""
3
+
4
+ GARHWALI_VOWELS = ["अ", "आ", "इ", "ई", "उ", "ऊ", "ऋ", "ए", "ऐ", "ओ", "औ", "अं", "अः"]
5
+ GARHWALI_MATRAS = ["ा", "ि", "ी", "ु", "ू", "ृ", "े", "ै", "ो", "ौ", "ं", "ः", "ँ", "्"]
6
+
7
+ GARHWALI_CONSONANTS = [
8
+ "क", "ख", "ग", "घ", "ङ",
9
+ "च", "छ", "ज", "झ", "ञ",
10
+ "ट", "ठ", "ड", "ढ", "ण",
11
+ "त", "थ", "द", "ध", "न",
12
+ "प", "फ", "ब", "भ", "म",
13
+ "य", "र", "ल", "व", "श", "ष", "स", "ह",
14
+ "क्ष", "त्र", "ज्ञ", "ड़", "ढ़"
15
+ ]
16
+
17
+ GARHWALI_DIALECTS = {
18
+ "srinagariya": "Srinagariya (Standard Pauri Garhwal)",
19
+ "rathwali": "Rathwali (Eastern Pauri / Tehri border)",
20
+ "tehri": "Tehri / Gangapariya (Tehri Garhwal)",
21
+ "salani": "Salani (Southern Pauri / Kotdwar)",
22
+ "badhani": "Badhani / Chamoli (Chamoli / Alaknanda Valley)",
23
+ "jaunsari_border": "Jaunsari / Rawalti affinity (Uttarkashi border)"
24
+ }
25
+
26
+ DEVANAGARI_TO_LATIN_MAP = {
27
+ "अ": "a", "आ": "aa", "इ": "i", "ई": "ee", "उ": "u", "ऊ": "oo", "ऋ": "ri",
28
+ "ए": "e", "ऐ": "ai", "ओ": "o", "औ": "au", "अं": "an", "अः": "ah", "ँ": "n",
29
+ "क": "ka", "ख": "kha", "ग": "ga", "घ": "gha", "ङ": "nga",
30
+ "च": "cha", "छ": "chha", "ज": "ja", "झ": "jha", "ञ": "nya",
31
+ "ट": "ta", "ठ": "tha", "ड": "da", "ढ": "dha", "ण": "na",
32
+ "त": "ta", "थ": "tha", "द": "da", "ध": "dha", "न": "na",
33
+ "प": "pa", "फ": "pha", "ब": "ba", "भ": "bha", "म": "ma",
34
+ "य": "ya", "र": "ra", "ल": "la", "व": "va",
35
+ "श": "sha", "ष": "sha", "स": "sa", "ह": "ha",
36
+ "क्ष": "ksha", "त्र": "tra", "ज्ञ": "gya", "ड़": "ra", "ढ़": "rha",
37
+ "ा": "aa", "ि": "i", "ी": "ee", "ु": "u", "ू": "oo", "ृ": "ri",
38
+ "े": "e", "ै": "ai", "ो": "o", "ौ": "au", "ं": "n", "ः": "h", "्": ""
39
+ }
40
+
41
+ LATIN_TO_DEVANAGARI_MAP = {
42
+ "aa": "आ", "ee": "ई", "oo": "ऊ", "ai": "ऐ", "au": "औ",
43
+ "ka": "क", "kha": "ख", "ga": "ग", "gha": "घ",
44
+ "cha": "च", "chha": "छ", "ja": "ज", "jha": "झ",
45
+ "ta": "त", "tha": "थ", "da": "द", "dha": "ध", "na": "न",
46
+ "pa": "प", "pha": "फ", "ba": "ब", "bha": "भ", "ma": "म",
47
+ "ya": "य", "ra": "र", "la": "ल", "va": "व", "wa": "व",
48
+ "sha": "श", "sa": "स", "ha": "ह",
49
+ "a": "अ", "i": "इ", "u": "उ", "e": "ए", "o": "ओ"
50
+ }
51
+
52
+ GARHWALI_STOPWORDS = {
53
+ "छ", "छन", "छी", "छ्या", "छूँ", "छा", "मा", "माझ", "बटि", "से", "तैं",
54
+ "कणी", "कथै", "कु", "की", "का", "को", "दगड़", "सती", "यों", "वो",
55
+ "ऊ", "मैं", "हम", "तू", "तुम", "अपण", "अपुण", "ना", "नि", "नी", "झनि"
56
+ }
@@ -0,0 +1,12 @@
1
+ # -*- coding: utf-8 -*-
2
+ """Garhwali Culture, Lore & Calendar Package."""
3
+
4
+ from .calendar import GARHWALI_MONTHS, GARHWALI_RITUS, GARHWALI_DAYS, get_current_season
5
+ from .festivals import GARHWALI_FESTIVALS, list_festivals
6
+ from .literature import poems, epics, authors
7
+
8
+ __all__ = [
9
+ "GARHWALI_MONTHS", "GARHWALI_RITUS", "GARHWALI_DAYS", "get_current_season",
10
+ "GARHWALI_FESTIVALS", "list_festivals",
11
+ "poems", "epics", "authors"
12
+ ]
@@ -0,0 +1,51 @@
1
+ # -*- coding: utf-8 -*-
2
+ """Garhwali Calendar, Months, Ritus, and Days of the Week."""
3
+
4
+ import datetime
5
+ from typing import Dict, List, Any, Optional, Tuple, Union, Set
6
+
7
+ GARHWALI_MONTHS = {
8
+ 1: {"name": "चैत", "english": "Chait", "gregorian": "Mid March - Mid April"},
9
+ 2: {"name": "बैसाख", "english": "Baisakh", "gregorian": "Mid April - Mid May"},
10
+ 3: {"name": "जेठ", "english": "Jeth", "gregorian": "Mid May - Mid June"},
11
+ 4: {"name": "असाड़", "english": "Asadh", "gregorian": "Mid June - Mid July"},
12
+ 5: {"name": "साउन", "english": "Saun", "gregorian": "Mid July - Mid August"},
13
+ 6: {"name": "भादौ", "english": "Bhado", "gregorian": "Mid August - Mid September"},
14
+ 7: {"name": "आसोज", "english": "Aasoj", "gregorian": "Mid September - Mid October"},
15
+ 8: {"name": "कातिक", "english": "Katik", "gregorian": "Mid October - Mid November"},
16
+ 9: {"name": "मंगसिर", "english": "Mangasir", "gregorian": "Mid November - Mid December"},
17
+ 10: {"name": "पूस", "english": "Poos", "gregorian": "Mid December - Mid January"},
18
+ 11: {"name": "माघ", "english": "Maagh", "gregorian": "Mid January - Mid February"},
19
+ 12: {"name": "फागुन", "english": "Phagun", "gregorian": "Mid February - Mid March"}
20
+ }
21
+
22
+ GARHWALI_RITUS = {
23
+ "बसंत": {"hindi": "वसंत", "english": "Spring", "months": ["चैत", "बैसाख"]},
24
+ "रूड़ि": {"hindi": "ग्रीष्म", "english": "Summer", "months": ["जेठ", "असाड़"]},
25
+ "चौमास": {"hindi": "वर्षा", "english": "Monsoon / Rainy", "months": ["साउन", "भादौ"]},
26
+ "सरद": {"hindi": "शरद", "english": "Autumn", "months": ["आसोज", "कातिक"]},
27
+ "स्यूँद": {"hindi": "हेमंत", "english": "Early Winter", "months": ["मंगसिर", "पूस"]},
28
+ "जाड़": {"hindi": "शिशिर", "english": "Late Winter", "months": ["माघ", "फागुन"]}
29
+ }
30
+
31
+ GARHWALI_DAYS = {
32
+ "रविवार": "ऐतवार", "सोमवार": "सोमवार", "मंगलवार": "मंगर",
33
+ "बुधवार": "बुधवार", "गुरुवार": "बिफे", "शुक्रवार": "सुक्कुर", "शनिवार": "सनिच्चर"
34
+ }
35
+
36
+ def get_current_season() -> Dict[str, str]:
37
+ m = datetime.datetime.now().month
38
+ if m in (3, 4): return {"name_garhwali": "बसंत", "name_hindi": "वसंत", "english_season": "Spring"}
39
+ elif m in (5, 6): return {"name_garhwali": "रूड़ि", "name_hindi": "ग्रीष्म", "english_season": "Summer"}
40
+ elif m in (7, 8): return {"name_garhwali": "चौमास", "name_hindi": "वर्षा", "english_season": "Monsoon / Rainy"}
41
+ elif m in (9, 10): return {"name_garhwali": "सरद", "name_hindi": "शरद", "english_season": "Autumn"}
42
+ elif m in (11, 12): return {"name_garhwali": "स्यूँद", "name_hindi": "हेमंत", "english_season": "Early Winter"}
43
+ else: return {"name_garhwali": "जाड़", "name_hindi": "शिशिर", "english_season": "Late Winter"}
44
+
45
+ def get_current_himalayan_month() -> Dict[str, Any]:
46
+ now = datetime.datetime.now()
47
+ # Himalayan months start approx mid-gregorian month
48
+ m_idx = now.month - 2
49
+ if m_idx < 1:
50
+ m_idx += 12
51
+ return GARHWALI_MONTHS[m_idx]
@@ -0,0 +1,34 @@
1
+ # -*- coding: utf-8 -*-
2
+ """Garhwali Festivals and Celebrations."""
3
+
4
+ from typing import Dict, List, Any, Optional, Tuple, Union, Set
5
+
6
+ GARHWALI_FESTIVALS = [
7
+ {
8
+ "name": "फूलदेई (Phooldei)",
9
+ "month": "चैत (Chait)",
10
+ "description": "Himalayan flower festival where children place freshly bloomed wild flowers (Buransh, Pyoli) on village doorsteps.",
11
+ "blessing": "फूल देई, छम्मा देई, दैणी द्वार, भर भकार!"
12
+ },
13
+ {
14
+ "name": "इगास बग्वाल (Igas Bagwal)",
15
+ "month": "कातिक (Katik)",
16
+ "description": "Celebrated 11 days after Diwali in Garhwal to welcome warrior hero Madho Singh Bhandari back from victorious battle.",
17
+ "tradition": "Spinning fire rope torch (भैलो / Bhelo) and community Raso-Thadya folk dances."
18
+ },
19
+ {
20
+ "name": "नंदा देवी राज जात (Nanda Devi Raj Jat)",
21
+ "month": "भादौ (Bhado)",
22
+ "description": "The Mahakumbh of the Himalayas — 280km pilgrimage trek across high Alpine meadows to Roopkund & Homkund.",
23
+ "tradition": "Led by the sacred four-horned ram (चौसिंग्या खाडू) honoring Goddess Nanda Devi."
24
+ },
25
+ {
26
+ "name": "बटर फेस्टिवल / अंदूड़ी उत्सव (Anduri Butter Festival)",
27
+ "month": "भादौ (Bhado)",
28
+ "description": "Celebrated in Dayara Bugyal meadow (Uttarkashi) where villagers play Holi with fresh milk, butter, and chaach to thank nature.",
29
+ "tradition": "Offering first dairy harvest to Lord Krishna and forest deities."
30
+ }
31
+ ]
32
+
33
+ def list_festivals() -> List[Dict[str, Any]]:
34
+ return GARHWALI_FESTIVALS
@@ -0,0 +1,52 @@
1
+ # -*- coding: utf-8 -*-
2
+ """Garhwali Folk Songs, Epics, Literature & Authors."""
3
+
4
+ from typing import Dict, List, Any, Optional, Tuple, Union, Set
5
+
6
+ POEMS = [
7
+ {
8
+ "title": "चैता की चैतवाली (Chaita Ki Chaitwali)",
9
+ "genre": "Folk Romance & Legend",
10
+ "description": "Classic ballad celebrating the return of springtime, blossoms of the rhododendron (Buransh), and Garhwali mountain heritage."
11
+ },
12
+ {
13
+ "title": "बेड़ू पाको बारामासा (Bedu Pako Baramasa)",
14
+ "genre": "Universal Uttarakhand Anthem",
15
+ "description": "Immortal folk song of the Himalayas describing wild Himalayan figs ripening across the 12 seasons of Garhwal & Kumaon."
16
+ }
17
+ ]
18
+
19
+ EPICS = [
20
+ {
21
+ "title": "माधो सिंह भंडारी (Madho Singh Bhandari)",
22
+ "hero": "Madho Singh Bhandari (मलेथा का सेनापति)",
23
+ "theme": "Engineering marvel of digging the mountain canal of Maletha and ultimate courage in defending Garhwal Kingdom."
24
+ },
25
+ {
26
+ "title": "जीतू बगड़वाल (Jeetu Bagdwal)",
27
+ "hero": "Jeetu Bagdwal",
28
+ "theme": "Legendary flute player whose divine music enchanted the celestial fairies (आंछरियों) of the high Alpine bugyals."
29
+ }
30
+ ]
31
+
32
+ AUTHORS = [
33
+ {
34
+ "name": "भजन सिंह 'सिंह' (Bhajan Singh 'Singh')",
35
+ "era": "1905-1996",
36
+ "work": "'सिंहनाद' (Singhnaad) and pioneer of modern Garhwali epic poetry and cultural philosophy."
37
+ },
38
+ {
39
+ "name": "चन्द्रकुंवर बर्त्वाल (Chandra Kunwar Bartwal)",
40
+ "era": "1919-1947",
41
+ "work": "'हिमवंत का कालिदास' — Legendary romantic and nature poet of Rudraprayag, Garhwal."
42
+ },
43
+ {
44
+ "name": "नरेन्द्र सिंह नेगी (Narendra Singh Negi)",
45
+ "era": "Contemporary",
46
+ "work": "'Garh-Gaurav' — Voice of Garhwal, songwriter and folk maestro chronicling the socio-cultural soul of Uttarakhand."
47
+ }
48
+ ]
49
+
50
+ def poems() -> List[Dict[str, Any]]: return POEMS
51
+ def epics() -> List[Dict[str, Any]]: return EPICS
52
+ def authors() -> List[Dict[str, Any]]: return AUTHORS
@@ -0,0 +1,15 @@
1
+ # -*- coding: utf-8 -*-
2
+ """Garhwali Grammar Package."""
3
+
4
+ from .nouns import GarhwaliNoun, CORE_GARHWALI_NOUNS
5
+ from .pronouns import GARHWALI_PRONOUNS_TABLE, get_pronoun_form
6
+ from .verbs import GarhwaliVerb, CORE_GARHWALI_VERBS
7
+ from .postpositions import GARHWALI_POSTPOSITIONS
8
+ from .syntax import validate_sov_order
9
+
10
+ __all__ = [
11
+ "GarhwaliNoun", "CORE_GARHWALI_NOUNS",
12
+ "GARHWALI_PRONOUNS_TABLE", "get_pronoun_form",
13
+ "GarhwaliVerb", "CORE_GARHWALI_VERBS",
14
+ "GARHWALI_POSTPOSITIONS", "validate_sov_order"
15
+ ]
@@ -0,0 +1,82 @@
1
+ # -*- coding: utf-8 -*-
2
+ """Garhwali Noun Declension and Case Inflection Engine."""
3
+
4
+ from typing import Dict, List, Any, Optional, Tuple, Union, Set
5
+
6
+ class GarhwaliNoun:
7
+ def __init__(self, lemma: str, gender: str = "m", english: Optional[str] = None, hindi: Optional[str] = None):
8
+ self.lemma = lemma.strip()
9
+ self.gender = gender.lower()
10
+ self.english = english
11
+ self.hindi = hindi
12
+
13
+ def declensions(self) -> Dict[str, str]:
14
+ """Returns the full 8-case direct and oblique declension table."""
15
+ root = self.lemma
16
+ forms = {}
17
+ if self.gender == "m":
18
+ forms["direct_sg"] = root
19
+ forms["direct_pl"] = root + "ों" if not (root.endswith("ा") or root.endswith("ो") or root.endswith("ु")) else root[:-1] + "ा"
20
+ forms["oblique_sg"] = root[:-1] + "ा" if (root.endswith("ो") or root.endswith("ु")) else root
21
+ forms["oblique_pl"] = root[:-1] + "ौं" if (root.endswith("ा") or root.endswith("ो") or root.endswith("ु")) else root + "ौं"
22
+ forms["ergative_sg"] = forms["oblique_sg"] + "ले"
23
+ forms["ergative_pl"] = forms["oblique_pl"] + "ले"
24
+ forms["accusative_dative"] = forms["oblique_sg"] + " तैं"
25
+ forms["instrumental"] = forms["oblique_sg"] + " सेती"
26
+ forms["ablative"] = forms["oblique_sg"] + " बटी"
27
+ forms["genitive_m"] = forms["oblique_sg"] + " कु"
28
+ forms["genitive_f"] = forms["oblique_sg"] + " की"
29
+ forms["locative"] = forms["oblique_sg"] + " मा"
30
+ forms["vocative_sg"] = "हे " + forms["oblique_sg"] + "ा"
31
+ else: # Feminine
32
+ forms["direct_sg"] = root
33
+ forms["direct_pl"] = root + "याँ" if root.endswith("ी") else root + "ाँ"
34
+ forms["oblique_sg"] = root
35
+ forms["oblique_pl"] = root[:-1] + "यौं" if root.endswith("ी") else root + "ौं"
36
+ forms["ergative_sg"] = forms["oblique_sg"] + "ले"
37
+ forms["ergative_pl"] = forms["oblique_pl"] + "ले"
38
+ forms["accusative_dative"] = forms["oblique_sg"] + " तैं"
39
+ forms["instrumental"] = forms["oblique_sg"] + " सेती"
40
+ forms["ablative"] = forms["oblique_sg"] + " बटी"
41
+ forms["genitive_m"] = forms["oblique_sg"] + " कु"
42
+ forms["genitive_f"] = forms["oblique_sg"] + " की"
43
+ forms["locative"] = forms["oblique_sg"] + " मा"
44
+ forms["vocative_sg"] = "हे " + forms["oblique_sg"] + "े"
45
+ return forms
46
+
47
+ CORE_GARHWALI_NOUNS = [
48
+ GarhwaliNoun("नौन", "m", english="boy", hindi="लड़का"),
49
+ GarhwaliNoun("नौनी", "f", english="girl", hindi="लड़की"),
50
+ GarhwaliNoun("घौर", "m", english="house", hindi="घर"),
51
+ GarhwaliNoun("गौं", "m", english="village", hindi="गाँव"),
52
+ GarhwaliNoun("डांडा", "m", english="mountain", hindi="पहाड़"),
53
+ GarhwaliNoun("धार", "f", english="mountain ridge", hindi="पहाड़ की चोटी"),
54
+ GarhwaliNoun("गाड़", "f", english="river", hindi="नदी"),
55
+ GarhwaliNoun("पाणि", "m", english="water", hindi="पानी"),
56
+ GarhwaliNoun("ब्वै", "f", english="mother", hindi="माँ"),
57
+ GarhwaliNoun("बुबा", "m", english="father", hindi="पिता"),
58
+ GarhwaliNoun("दादू", "m", english="elder brother", hindi="बड़ा भाई"),
59
+ GarhwaliNoun("दिदी", "f", english="elder sister", hindi="बड़ी बहन"),
60
+ GarhwaliNoun("भुला", "m", english="younger brother", hindi="छोटा भाई"),
61
+ GarhwaliNoun("भुली", "f", english="younger sister", hindi="छोटी बहन"),
62
+ GarhwaliNoun("बूबू", "m", english="grandfather", hindi="दादा जी"),
63
+ GarhwaliNoun("बौजी", "f", english="grandmother", hindi="दादी जी"),
64
+ GarhwaliNoun("कुकुर", "m", english="dog", hindi="कुत्ता"),
65
+ GarhwaliNoun("बिलाव", "m", english="cat", hindi="बिल्ली"),
66
+ GarhwaliNoun("गौई", "f", english="cow", hindi="गाय"),
67
+ GarhwaliNoun("बल्द", "m", english="ox", hindi="बैल"),
68
+ GarhwaliNoun("बाखरि", "f", english="goat", hindi="बकरी"),
69
+ GarhwaliNoun("भात", "m", english="rice", hindi="चावल / भात"),
70
+ GarhwaliNoun("रोटी", "f", english="bread", hindi="रोटी"),
71
+ GarhwaliNoun("च्या", "f", english="tea", hindi="चाय"),
72
+ GarhwaliNoun("दूद", "m", english="milk", hindi="दूध"),
73
+ GarhwaliNoun("घ्यू", "m", english="ghee", hindi="घी"),
74
+ GarhwaliNoun("गूर", "m", english="jaggery", hindi="गुड़"),
75
+ GarhwaliNoun("काफल", "m", english="bayberry", hindi="काफल"),
76
+ GarhwaliNoun("बुरांस", "m", english="rhododendron", hindi="बुरांश"),
77
+ GarhwaliNoun("बाट", "m", english="path", hindi="रास्ता"),
78
+ GarhwaliNoun("बदळ", "m", english="cloud", hindi="बादल"),
79
+ GarhwaliNoun("घाम", "f", english="sunlight", hindi="धूप"),
80
+ GarhwaliNoun("ह्यूंद", "m", english="snow", hindi="बर्फ"),
81
+ GarhwaliNoun("बौण", "m", english="forest", hindi="जंगल")
82
+ ]
@@ -0,0 +1,29 @@
1
+ # -*- coding: utf-8 -*-
2
+ """Garhwali Postpositions and Case Markers."""
3
+
4
+ GARHWALI_POSTPOSITIONS = {
5
+ "locative": {
6
+ "markers": ["मा", "माझ", "भीतर", "पर", "माथ"],
7
+ "meaning_hi": "में / पर / अंदर", "meaning_en": "in / on / inside / upon"
8
+ },
9
+ "ablative": {
10
+ "markers": ["बटि", "से", "ले"],
11
+ "meaning_hi": "से (स्थान या समय से)", "meaning_en": "from / since"
12
+ },
13
+ "dative_accusative": {
14
+ "markers": ["कणी", "कथै", "तैं", "कै"],
15
+ "meaning_hi": "को / के लिए", "meaning_en": "to / for / towards"
16
+ },
17
+ "genitive": {
18
+ "markers": ["कु", "की", "का", "को"],
19
+ "meaning_hi": "का / की / के", "meaning_en": "of / 's"
20
+ },
21
+ "instrumental_ergative": {
22
+ "markers": ["ले", "द्वारा"],
23
+ "meaning_hi": "ने / से / द्वारा", "meaning_en": "by / through"
24
+ },
25
+ "associative": {
26
+ "markers": ["दगड़", "सती", "साथ"],
27
+ "meaning_hi": "साथ / संग", "meaning_en": "with / along with"
28
+ }
29
+ }