1 stable release
1.18.0 | Nov 30, 2024 |
---|
#439 in Text processing
170 downloads per month
27KB
835 lines
uklatn
Ukrainian Cyrillic transliteration to Latin script.
Supported transliteration schemes:
Usage
use { uklatn::Table, uklatn::decode, uklatn::encode };
encode("Доброго вечора!", Table::default());
decode("Paljanycja", Table::default());
Select a transliteration scheme:
encode("Борщ", Table::Dstu9112B);
encode("Шевченко", Table::Kmu55);
Notes
Input is assumed to be in Ukrainian (Cyrillic or Latin script), and will be processed in full. If your data has mixed languages, do preprocessing to extract Ukrainian chunks.
lib.rs
:
Ukrainian Cyrillic transliteration to and from Latin script.
Tables:
- DSTU 9112:2021 System A
- DSTU 9112:2021 System B
- KMU 55:2010, not reversible
Examples
let s = uklatn::encode("Доброго вечора!", uklatn::Table::default());
assert_eq!(s, "Dobroğo večora!");
let s = uklatn::decode("Paljanycja", uklatn::Table::default());
assert_eq!(s, "Паляниця");
Select a transliteration scheme:
let s = uklatn::encode("Борщ", uklatn::Table::Dstu9112B);
assert_eq!(s, "Borshch");
Dependencies
~4.5MB
~95K SLoC