jpreprocess-njd 0.15.0

Japanese text preprocessor for Text-to-Speech application (OpenJTalk rewrite in rust language).
Documentation
use super::*;
use jpreprocess_core::pron;
use phf::{phf_map, phf_set};

pub const DIGIT_CONVERSION_TABLE: [(Keys, DigitLUT); 2] = [
    (NUMERAL_LIST8, NUMERAL_LIST9),
    (NUMERAL_LIST10, NUMERAL_LIST11),
];
pub const NUMERATIVE_CONVERSION_TABLE: [(Keys, NumerativeLUT); 1] =
    [(NUMERAL_LIST6, NUMERAL_LIST7)];

pub const NUMERAL_LIST4: Keys = phf_set! {
  "", "", "", "", "", "", "", "", "", "", "", "",
};

pub const NUMERAL_LIST5: Keys = phf_set! {
 "", "", "", "", "", "", "", "",
 "𥝱",
 "", "", "", "", "", "",
 "恒河沙", "阿僧祇", "那由他", "不可思議", "無量大数",
};

const NUMERAL_LIST6: Keys = phf_set! {"", ""};

const NUMERAL_LIST7: NumerativeLUT = phf_map! {
    "" => DigitType::Voiced,
    "" => DigitType::SemiVoiced,
    "" => DigitType::SemiVoiced,
    "" => DigitType::Voiced,
};

const NUMERAL_LIST8: Keys = phf_set! {""};

const NUMERAL_LIST9: DigitLUT = phf_map! {
    "" => pron!([Ro, Xtsu], 0),
    "" => pron!([Ha, Xtsu], 0),
};

const NUMERAL_LIST10: Keys = phf_set! {"", ""};

const NUMERAL_LIST11: DigitLUT = phf_map! {
    "" => pron!([I, Xtsu], 0),
    "" => pron!([Ha, Xtsu], 0),
    "" => pron!([Ju, Xtsu], 1),
};