pub struct TypedRelation {
pub src: String,
pub dst: String,
pub predicate: String,
pub confidence: f32,
pub source: ExtractionSource,
pub source_label: String,
}Expand description
An inferred typed edge between two previously-extracted entities.
Distinct from crate::traits::Relation:
Relationis a raw(src, dst, weight)triple with no named predicate.TypedRelationhas a clustering-assigned predicate and a confidence in[0.0, 1.0]so the trust gate can filter it.
Fields§
§src: StringSubject entity mention.
dst: StringObject entity mention.
predicate: StringClustering-assigned predicate label (e.g. "causes").
confidence: f32Confidence in [0.0, 1.0]. Fed to
crate::trust::TrustBoundary::admit downstream.
source: ExtractionSourceProvenance in the full taxonomy (ExtractionSource).
source_label: StringShort human-readable provenance label, always of the shape
"inferred:<method>". Derived from InferenceMethod at
emission time to keep the struct serde-flat.
Implementations§
Trait Implementations§
Source§impl Clone for TypedRelation
impl Clone for TypedRelation
Source§fn clone(&self) -> TypedRelation
fn clone(&self) -> TypedRelation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TypedRelation
impl Debug for TypedRelation
Source§impl<'de> Deserialize<'de> for TypedRelation
impl<'de> Deserialize<'de> for TypedRelation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TypedRelation
impl PartialEq for TypedRelation
Source§fn eq(&self, other: &TypedRelation) -> bool
fn eq(&self, other: &TypedRelation) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TypedRelation
impl Serialize for TypedRelation
impl StructuralPartialEq for TypedRelation
Auto Trait Implementations§
impl Freeze for TypedRelation
impl RefUnwindSafe for TypedRelation
impl Send for TypedRelation
impl Sync for TypedRelation
impl Unpin for TypedRelation
impl UnsafeUnpin for TypedRelation
impl UnwindSafe for TypedRelation
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