Skip to main content

StringClassifier

Trait StringClassifier 

Source
pub trait StringClassifier: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn classify(&self, input: &str) -> Vec<(StringCategory, f32)>;
}
Expand description

A classifier that examines a string and returns matching categories.

Required Methods§

Source

fn name(&self) -> &str

Human-readable name for this classifier.

Source

fn classify(&self, input: &str) -> Vec<(StringCategory, f32)>

Classify a string. Returns a list of (category, confidence) pairs.

Trait Implementations§

Source§

impl Collect for &'static dyn StringClassifier

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§