pub struct Relation {
pub src: String,
pub dst: String,
pub weight: f32,
pub source: ExtractionSource,
}Expand description
A candidate relation between two previously-extracted entities.
The payload stays flat: a statistical miner emits raw
(subject_mention, object_mention, weight) triples without
predicate names. Callers that want to name the edge type map
ExtractionSource → edge label at ingest time.
Fields§
§src: StringSubject entity mention.
dst: StringObject entity mention.
weight: f32Extractor-assigned weight. For PMI-based mining this is the pointwise mutual information in natural-log units.
source: ExtractionSourceProvenance of the triple.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Relation
impl<'de> Deserialize<'de> for Relation
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
impl StructuralPartialEq for Relation
Auto Trait Implementations§
impl Freeze for Relation
impl RefUnwindSafe for Relation
impl Send for Relation
impl Sync for Relation
impl Unpin for Relation
impl UnsafeUnpin for Relation
impl UnwindSafe for Relation
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