Expand description
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 constraintsscript— Writing system metadata: alphabet, syllabary, logographic, abjad, abugida. Unicode ranges, directionality, lookup by ISO 15924 code, transliteration tables, numeral system mappingsgrammar— Morphological typology (isolating, agglutinative, fusional), word order (SVO/SOV/VSO), case systemslexicon— Core vocabulary per language (Swadesh lists, frequency-ranked word lists)registry— Language registry: look up phoneme inventories and scripts by ISO 639 codedialect— Language variety overlays: regional dialects, national standards, phoneme add/remove relative to parent language
§Relationship to Other Crates
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
Re-exports§
pub use error::VarnaError;
Modules§
- dialect
- Dialect and language variety support.
- error
- Error types for varna.
- grammar
- Grammar — morphological typology, word order, case systems.
- lexicon
- Lexicon — core vocabulary, Swadesh lists, frequency data, cognate tracking, and etymology.
- phoneme
- Phoneme inventories — IPA phonemes per language, phonological features.
- registry
- Language registry — look up phoneme inventories and scripts by ISO 639 code.
- script
- Writing systems — alphabet, syllabary, logographic, abjad, abugida.