Expand description
§shabdakosh — Pronunciation Dictionary
shabdakosh (Sanskrit: dictionary) provides pronunciation dictionaries
mapping words to svara Phoneme sequences.
§Features
- 10,000+ entry English dictionary generated at compile time from CMUdict
- ARPABET mapping — bidirectional conversion between ARPABET and svara phonemes
- User overlay — application-specific entries that override the base dictionary
- Import/export — CMUdict text format and JSON (with
jsonfeature)
§Quick Start
use shabdakosh::PronunciationDict;
let dict = PronunciationDict::english();
assert!(dict.lookup("hello").is_some());
assert!(dict.len() >= 10000);§Feature Flags
| Feature | Default | Description |
|---|---|---|
std | Yes | Standard library. Disable for no_std + alloc |
json | No | JSON import/export via serde_json |
varna | No | Multi-language support: inventory validation, lexicon ingestion, script detection |
Re-exports§
pub use dictionary::coverage::CoverageReport;pub use dictionary::entry::DictEntry;pub use dictionary::entry::Pronunciation;pub use dictionary::entry::Region;pub use dictionary::g2p::FallbackDict;pub use dictionary::g2p::G2PModel;pub use dictionary::g2p::G2PResult;pub use dictionary::g2p::LookupSource;pub use dictionary::stream::LookupStream;pub use dictionary::trie::PrefixTrie;pub use dictionary::DictDiff;pub use dictionary::PronunciationDict;pub use error::Result;pub use error::ShabdakoshError;
Modules§
- arpabet
- ARPABET-to-svara phoneme mapping.
- dictionary
- Pronunciation dictionary for common/irregular words.
- error
- Error types for the shabdakosh crate.
- ipa
- IPA (International Phonetic Alphabet) to svara phoneme mapping.
- notation
- Unified phoneme notation abstraction.