Skip to main content

EntityExtractor

Trait EntityExtractor 

Source
pub trait EntityExtractor: Send + Sync {
    // Required method
    fn entities(&self, text: &str) -> Vec<String>;
}
Expand description

Finds the entities a fact mentions. Optional; default none. The result is stored with the fact and matched exactly by RecallOptions::entities. This and MemoryObserver are the extension points for a graph or entity layer; nothing in the store requires one.

Required Methods§

Source

fn entities(&self, text: &str) -> Vec<String>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<F: Fn(&str) -> Vec<String> + Send + Sync> EntityExtractor for F