pub trait EntityExtractor: Send + Sync {
// Required methods
fn extract_entities<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
source_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = RragResult<Vec<Entity>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn extract_relationships<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
text: &'life1 str,
entities: &'life2 [Entity],
source_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = RragResult<Vec<Relationship>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
// Provided method
fn extract_all<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
source_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = RragResult<(Vec<Entity>, Vec<Relationship>)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
}Expand description
Entity extractor trait
Required Methods§
Sourcefn extract_entities<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
source_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = RragResult<Vec<Entity>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn extract_entities<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
source_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = RragResult<Vec<Entity>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Extract entities from text
Sourcefn extract_relationships<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
text: &'life1 str,
entities: &'life2 [Entity],
source_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = RragResult<Vec<Relationship>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn extract_relationships<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
text: &'life1 str,
entities: &'life2 [Entity],
source_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = RragResult<Vec<Relationship>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Extract relationships from text and entities
Provided Methods§
Sourcefn extract_all<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
source_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = RragResult<(Vec<Entity>, Vec<Relationship>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn extract_all<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
source_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = RragResult<(Vec<Entity>, Vec<Relationship>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Extract both entities and relationships