pub struct Assignment {
pub antecedents: HashMap<usize, AntecedentValue>,
pub types: HashMap<usize, EntityType>,
pub links: HashMap<usize, LinkValue>,
}Expand description
An assignment of values to variables.
Fields§
§antecedents: HashMap<usize, AntecedentValue>Antecedent assignments: mention_idx → antecedent
types: HashMap<usize, EntityType>Type assignments: mention_idx → entity type
links: HashMap<usize, LinkValue>Link assignments: mention_idx → link value
Implementations§
Source§impl Assignment
impl Assignment
Sourcepub fn get_antecedent(&self, mention_idx: usize) -> Option<AntecedentValue>
pub fn get_antecedent(&self, mention_idx: usize) -> Option<AntecedentValue>
Get antecedent for mention.
Sourcepub fn get_type(&self, mention_idx: usize) -> Option<EntityType>
pub fn get_type(&self, mention_idx: usize) -> Option<EntityType>
Get type for mention.
Sourcepub fn set_antecedent(&mut self, mention_idx: usize, value: AntecedentValue)
pub fn set_antecedent(&mut self, mention_idx: usize, value: AntecedentValue)
Set antecedent.
Sourcepub fn set_type(&mut self, mention_idx: usize, value: EntityType)
pub fn set_type(&mut self, mention_idx: usize, value: EntityType)
Set type.
Trait Implementations§
Source§impl Clone for Assignment
impl Clone for Assignment
Source§fn clone(&self) -> Assignment
fn clone(&self) -> Assignment
Returns a duplicate of the value. Read more
1.0.0 · 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 Assignment
impl Debug for Assignment
Source§impl Default for Assignment
impl Default for Assignment
Source§fn default() -> Assignment
fn default() -> Assignment
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Assignment
impl RefUnwindSafe for Assignment
impl Send for Assignment
impl Sync for Assignment
impl Unpin for Assignment
impl UnsafeUnpin for Assignment
impl UnwindSafe for Assignment
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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