Expand description
§text-processing-rs
Inverse Text Normalization (ITN) — convert spoken-form ASR output to written form.
Converts spoken-form text to written form:
- “two hundred thirty two” → “232”
- “five dollars and fifty cents” → “$5.50”
- “january fifth twenty twenty five” → “January 5, 2025”
§Usage
use text_processing_rs::normalize;
let result = normalize("two hundred");
assert_eq!(result, "200");Modules§
- custom_
rules - Custom user-defined normalization rules.
- taggers
- Taggers for inverse text normalization.
Functions§
- normalize
- Normalize spoken-form text to written form.
- normalize_
sentence - Normalize a full sentence, replacing spoken-form spans with written form.
- normalize_
sentence_ with_ max_ span - Normalize a full sentence with a configurable max span size.
- normalize_
with_ lang - Normalize with language selection (future use).