pub struct KnowledgeFusion { /* private fields */ }Expand description
Multi-source knowledge fusion engine.
Implementations§
Source§impl KnowledgeFusion
impl KnowledgeFusion
Sourcepub fn new(config: FusionConfig) -> Self
pub fn new(config: FusionConfig) -> Self
Create a new fusion engine with the given configuration.
Sourcepub fn register_source(
&mut self,
source_id: impl Into<String>,
accuracy: f64,
completeness: f64,
timeliness: f64,
)
pub fn register_source( &mut self, source_id: impl Into<String>, accuracy: f64, completeness: f64, timeliness: f64, )
Register a source with its quality assessment.
Sourcepub fn fuse(&mut self, triples: &[ProvenancedTriple]) -> FusionResult
pub fn fuse(&mut self, triples: &[ProvenancedTriple]) -> FusionResult
Fuse a collection of provenanced triples from multiple sources.
Sourcepub fn fuse_incremental(
&mut self,
existing: &[FusedTriple],
new_triples: &[ProvenancedTriple],
) -> FusionResult
pub fn fuse_incremental( &mut self, existing: &[FusedTriple], new_triples: &[ProvenancedTriple], ) -> FusionResult
Incremental fusion: add new triples to an existing fused graph.
Sourcepub fn align_entities(
&self,
triples: &[ProvenancedTriple],
) -> Vec<(String, String)>
pub fn align_entities( &self, triples: &[ProvenancedTriple], ) -> Vec<(String, String)>
Detect aligned entities across sources using name similarity.
Sourcepub fn source_quality(&self, source_id: &str) -> Option<&SourceQuality>
pub fn source_quality(&self, source_id: &str) -> Option<&SourceQuality>
Compute source quality score from registered sources.
Sourcepub fn total_fusions(&self) -> u64
pub fn total_fusions(&self) -> u64
Total number of fusion operations performed.
Sourcepub fn registered_source_count(&self) -> usize
pub fn registered_source_count(&self) -> usize
Number of registered sources.
Auto Trait Implementations§
impl Freeze for KnowledgeFusion
impl RefUnwindSafe for KnowledgeFusion
impl Send for KnowledgeFusion
impl Sync for KnowledgeFusion
impl Unpin for KnowledgeFusion
impl UnsafeUnpin for KnowledgeFusion
impl UnwindSafe for KnowledgeFusion
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more