pub struct DocumentInformationExtractor { /* private fields */ }Expand description
Document-level information extraction and organization
Implementations§
Source§impl DocumentInformationExtractor
impl DocumentInformationExtractor
Sourcepub fn extract_structured_information(
&self,
documents: &[String],
pipeline: &AdvancedExtractionPipeline,
) -> Result<StructuredDocumentInformation>
pub fn extract_structured_information( &self, documents: &[String], pipeline: &AdvancedExtractionPipeline, ) -> Result<StructuredDocumentInformation>
Extract information organized by topics and themes
Sourcepub fn cluster_entities(
&self,
entities: &[Entity],
) -> Result<Vec<EntityCluster>>
pub fn cluster_entities( &self, entities: &[Entity], ) -> Result<Vec<EntityCluster>>
Cluster similar entities across documents
Sourcepub fn calculate_entity_similarity(
&self,
entity1: &Entity,
entity2: &Entity,
) -> f64
pub fn calculate_entity_similarity( &self, entity1: &Entity, entity2: &Entity, ) -> f64
Calculate similarity between two entities
Sourcepub fn levenshtein_distance(&self, s1: &str, s2: &str) -> usize
pub fn levenshtein_distance(&self, s1: &str, s2: &str) -> usize
Simple Levenshtein distance implementation
Sourcepub fn extract_events(
&self,
relations: &[Relation],
entities: &[Entity],
) -> Result<Vec<Event>>
pub fn extract_events( &self, relations: &[Relation], entities: &[Entity], ) -> Result<Vec<Event>>
Extract events from relations and entities
Sourcepub fn identify_topics(
&self,
summaries: &[DocumentSummary],
) -> Result<Vec<Topic>>
pub fn identify_topics( &self, summaries: &[DocumentSummary], ) -> Result<Vec<Topic>>
Identify topics from document summaries
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DocumentInformationExtractor
impl RefUnwindSafe for DocumentInformationExtractor
impl Send for DocumentInformationExtractor
impl Sync for DocumentInformationExtractor
impl Unpin for DocumentInformationExtractor
impl UnwindSafe for DocumentInformationExtractor
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.