Skip to main content

Crate ukrainian_tn

Crate ukrainian_tn 

Source
Expand description

Ukrainian text normalization, tokenization and sentence splitting.

The crate is split into two independent halves:

  • rozpodil segments text into sentences and tokens, returning borrowed Substring slices with byte offsets into the input.
  • uktextnorm rewrites numbers, dates, units, currencies, abbreviations and other machine-readable spellings into the words a Ukrainian speaker would say.
use ukrainian_tn::{rozpodil, uktextnorm};

assert_eq!(uktextnorm::number_to_words(123), "сто двадцять три");
let sentences = rozpodil::split_sentences("Перше речення. Друге.");
assert_eq!(sentences.len(), 2);

Modules§

rozpodil
Sentence and token segmentation for Ukrainian text.
uktextnorm
Ukrainian text normalization: numbers, dates, units, currencies, abbreviations and other machine-readable spellings rewritten as words.