1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//! Varna — Multilingual Language Engine
//!
//! **Varna** (Sanskrit: वर्ण — letter, character, sound) provides a structured,
//! queryable corpus of human language data. Phoneme inventories, grapheme-to-phoneme
//! rules, writing system metadata, grammar structures, and lexicon access for
//! 50+ languages.
//!
//! # Architecture
//!
//! Six modules:
//!
//! - [`phoneme`] — IPA phoneme inventories per language, phonological features
//! (manner, place, voicing), stress/tone patterns, builder pattern,
//! allophone rules, syllable structure, phonotactic constraints
//! - [`script`] — Writing system metadata: alphabet, syllabary, logographic,
//! abjad, abugida. Unicode ranges, directionality, lookup by ISO 15924 code,
//! transliteration tables, numeral system mappings
//! - [`grammar`] — Morphological typology (isolating, agglutinative, fusional),
//! word order (SVO/SOV/VSO), case systems
//! - [`lexicon`] — Core vocabulary per language (Swadesh lists, frequency-ranked
//! word lists)
//! - [`registry`] — Language registry: look up phoneme inventories and scripts
//! by ISO 639 code
//! - [`dialect`] — Language variety overlays: regional dialects, national
//! standards, phoneme add/remove relative to parent language
//!
//! # Relationship to Other Crates
//!
//! ```text
//! varna (this) — language structure & phoneme inventories
//! ↓ provides phoneme sets per language
//! shabda — G2P conversion (currently English-only, varna makes it multilingual)
//! ↓ produces phoneme sequences
//! shabdakosh — pronunciation dictionary (currently CMUdict, varna adds IPA dicts)
//! ↓ lookup fallback
//! svara — vocal synthesis (consumes phonemes, produces audio)
//! ↓ voice output
//! dhvani — audio engine (mixing, DSP, output)
//! ```
//!
//! Also feeds:
//! - **jnana** — multilingual knowledge access
//! - **vidya** — programming concepts explained in native languages
//! - **vansh** (planned) — voice assistant with multilingual TTS/STT
//! - **sahifa** (planned) — OCR language detection, multilingual document processing
pub use VarnaError;