jpreprocess 0.13.2

Japanese text preprocessor for Text-to-Speech application (OpenJTalk rewrite in rust language).
Documentation
use lindera_dictionary::dictionary::Dictionary;

/// Specifies the kind of self-contained dictionary used for tokenization and preprocessing.
pub enum JPreprocessDictionaryKind {
    #[cfg(feature = "naist-jdic")]
    NaistJdic,
}

impl JPreprocessDictionaryKind {
    pub(crate) fn load(&self) -> Dictionary {
        match &self {
            #[cfg(feature = "naist-jdic")]
            Self::NaistJdic => jpreprocess_naist_jdic::lindera::load().unwrap(),

            #[allow(unreachable_patterns)]
            _ => unreachable!(),
        }
    }
}