pub struct RuleBasedEntityExtractor { /* private fields */ }Expand description
Rule-based entity extractor
Implementations§
Source§impl RuleBasedEntityExtractor
impl RuleBasedEntityExtractor
Sourcepub fn new(config: EntityExtractionConfig) -> RragResult<Self>
pub fn new(config: EntityExtractionConfig) -> RragResult<Self>
Create a new rule-based entity extractor
Trait Implementations§
Source§impl EntityExtractor for RuleBasedEntityExtractor
impl EntityExtractor for RuleBasedEntityExtractor
Source§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_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
Source§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,
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
Source§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,
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
Auto Trait Implementations§
impl Freeze for RuleBasedEntityExtractor
impl RefUnwindSafe for RuleBasedEntityExtractor
impl Send for RuleBasedEntityExtractor
impl Sync for RuleBasedEntityExtractor
impl Unpin for RuleBasedEntityExtractor
impl UnwindSafe for RuleBasedEntityExtractor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more