pub struct TextPreprocessor { /* private fields */ }Expand description
Main text preprocessor
Implementations§
Source§impl TextPreprocessor
impl TextPreprocessor
Sourcepub fn new(language: LanguageCode) -> Self
pub fn new(language: LanguageCode) -> Self
Create new text preprocessor for language
Sourcepub fn with_config(language: LanguageCode, config: PreprocessingConfig) -> Self
pub fn with_config(language: LanguageCode, config: PreprocessingConfig) -> Self
Create with custom configuration
Sourcepub fn preprocess(&self, text: &str) -> Result<String>
pub fn preprocess(&self, text: &str) -> Result<String>
Preprocess text for G2P conversion
Sourcepub fn entity_recognizer(&self) -> &SimpleNamedEntityRecognizer
pub fn entity_recognizer(&self) -> &SimpleNamedEntityRecognizer
Get access to the entity recognizer
Sourcepub fn pos_tagger(&self) -> &RuleBasedPosTagger
pub fn pos_tagger(&self) -> &RuleBasedPosTagger
Get access to the POS tagger
Sourcepub fn semantic_analyzer(&self) -> &BasicSemanticAnalyzer
pub fn semantic_analyzer(&self) -> &BasicSemanticAnalyzer
Get access to the semantic analyzer
Sourcepub fn variant_selector(&self) -> &DictionaryVariantSelector
pub fn variant_selector(&self) -> &DictionaryVariantSelector
Get access to the variant selector
Sourcepub fn analyze_text(&self, text: &str) -> Result<TextAnalysis>
pub fn analyze_text(&self, text: &str) -> Result<TextAnalysis>
Analyze text without preprocessing (for analysis purposes)
Auto Trait Implementations§
impl Freeze for TextPreprocessor
impl RefUnwindSafe for TextPreprocessor
impl Send for TextPreprocessor
impl Sync for TextPreprocessor
impl Unpin for TextPreprocessor
impl UnsafeUnpin for TextPreprocessor
impl UnwindSafe for TextPreprocessor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more