pub struct Resolver { /* private fields */ }Expand description
Coalescer for inter-document entity resolution.
Implementations§
Source§impl Resolver
impl Resolver
Sourcepub fn with_threshold(self, threshold: f32) -> Self
pub fn with_threshold(self, threshold: f32) -> Self
Create a new resolver with custom settings.
Sourcepub fn require_type_match(self, require: bool) -> Self
pub fn require_type_match(self, require: bool) -> Self
Set whether to require entity type match for clustering.
Sourcepub fn resolve_inter_doc_coref(
&self,
corpus: &mut Corpus,
similarity_threshold: Option<f32>,
require_type_match: Option<bool>,
) -> Vec<IdentityId>
pub fn resolve_inter_doc_coref( &self, corpus: &mut Corpus, similarity_threshold: Option<f32>, require_type_match: Option<bool>, ) -> Vec<IdentityId>
Coalesce inter-document entities across all documents in a corpus.
This method clusters tracks from different documents that refer to the same
real-world entity, creating Identity instances without KB links.
§Algorithm
- Extract all tracks from all documents
- Compute track embeddings (if available) or use string similarity
- Cluster tracks using similarity threshold
- Create Identity for each cluster
- Link tracks to identities
§Parameters
corpus- The corpus containing documents to resolvesimilarity_threshold- Minimum similarity (0.0-1.0) to cluster tracksrequire_type_match- Only cluster tracks with same entity type
§Returns
Vector of created identities, each linked to tracks from multiple documents.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Resolver
impl RefUnwindSafe for Resolver
impl Send for Resolver
impl Sync for Resolver
impl Unpin for Resolver
impl UnsafeUnpin for Resolver
impl UnwindSafe for Resolver
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