Skip to main content

EntityRecognizer

Trait EntityRecognizer 

Source
pub trait EntityRecognizer: Send + Sync {
    // Required method
    fn recognize(&self, text: &str) -> Result<Vec<Entity>, RecognizerError>;
}
Expand description

Finds names in text. Implementations should return every entity they find with its score; the engine applies the threshold from the rules.

Required Methods§

Source

fn recognize(&self, text: &str) -> Result<Vec<Entity>, RecognizerError>

Returns every name found in text, with byte offsets into it.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§