TextPreprocessor

Trait TextPreprocessor 

Source
pub trait TextPreprocessor:
    Send
    + Sync
    + Debug {
    // Required methods
    fn process_text(&self, text: &str) -> SklResult<String>;
    fn name(&self) -> &str;

    // Provided method
    fn process_batch(&self, texts: &[String]) -> SklResult<Vec<String>> { ... }
}
Expand description

Text preprocessing trait

Required Methods§

Source

fn process_text(&self, text: &str) -> SklResult<String>

Process a single text

Source

fn name(&self) -> &str

Get preprocessor name

Provided Methods§

Source

fn process_batch(&self, texts: &[String]) -> SklResult<Vec<String>>

Process a batch of texts

Implementors§