10 releases
0.2.0 | Oct 17, 2023 |
---|---|
0.1.8 | Sep 21, 2023 |
0.1.7 | Jul 15, 2023 |
0.1.6 | Nov 30, 2022 |
#1358 in Text processing
25 downloads per month
19KB
778 lines
ipa-translate
A crate for translating between IPA and ASCII text.
Usage
use ipa_translate;
fn main() {
let ipa = "prʲɪvʲet";
let xsampa = "pr_jIv_jet";
let praat = r"pr\^j\icv\^jet";
let branner = "prj^Ivj^et";
let sil = "prj^i=vj^et";
// forward translation.
assert_eq!(ipa_translate::xsampa_to_ipa(xsampa), ipa);
assert_eq!(ipa_translate::praat_to_ipa(praat), ipa);
assert_eq!(ipa_translate::branner_to_ipa(branner), ipa);
assert_eq!(ipa_translate::sil_to_ipa(sil), ipa);
// inverse translation.
assert_eq!(ipa_translate::ipa_to_xsampa(ipa), xsampa);
assert_eq!(ipa_translate::ipa_to_praat(ipa), praat);
assert_eq!(ipa_translate::ipa_to_branner(ipa), branner);
assert_eq!(ipa_translate::ipa_to_sil(ipa), sil);
}
Dependencies
~10KB