pub struct EntityEnhancer { /* private fields */ }Expand description
Entity enhancer using a provider
Implementations§
Source§impl EntityEnhancer
impl EntityEnhancer
Sourcepub fn new(provider: Arc<dyn Provider>, model_id: impl Into<String>) -> Self
pub fn new(provider: Arc<dyn Provider>, model_id: impl Into<String>) -> Self
Create a new entity enhancer
Sourcepub fn with_min_confidence(self, confidence: f32) -> Self
pub fn with_min_confidence(self, confidence: f32) -> Self
Set minimum confidence threshold
Sourcepub fn with_max_entities(self, max: usize) -> Self
pub fn with_max_entities(self, max: usize) -> Self
Set max entities per extraction
Sourcepub async fn extract_entities(&self, text: &str) -> Option<Vec<EnhancedEntity>>
pub async fn extract_entities(&self, text: &str) -> Option<Vec<EnhancedEntity>>
Extract semantic entities from text using the provider
Sourcepub async fn extract_relationships(
&self,
entities: &[String],
context: &str,
) -> Option<Vec<EnhancedRelationship>>
pub async fn extract_relationships( &self, entities: &[String], context: &str, ) -> Option<Vec<EnhancedRelationship>>
Extract relationships between entities using the provider
Sourcepub async fn extract_concepts(&self, text: &str) -> Option<Vec<String>>
pub async fn extract_concepts(&self, text: &str) -> Option<Vec<String>>
Extract domain concepts from text using the provider
Sourcepub async fn enhance(&self, text: &str) -> EnhancementResult
pub async fn enhance(&self, text: &str) -> EnhancementResult
Full enhancement - extract entities, relationships, and concepts
Sourcepub fn extract_heuristic(&self, text: &str) -> Vec<EnhancedEntity>
pub fn extract_heuristic(&self, text: &str) -> Vec<EnhancedEntity>
Heuristic entity extraction (pattern-based fallback)
Auto Trait Implementations§
impl Freeze for EntityEnhancer
impl !RefUnwindSafe for EntityEnhancer
impl Send for EntityEnhancer
impl Sync for EntityEnhancer
impl Unpin for EntityEnhancer
impl UnsafeUnpin for EntityEnhancer
impl !UnwindSafe for EntityEnhancer
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