pub struct Referent {
pub variable: Symbol,
pub noun_class: Symbol,
pub gender: Gender,
pub number: Number,
pub source: ReferentSource,
pub used_by_pronoun: bool,
pub ownership: OwnershipState,
pub modifiers: Vec<Symbol>,
}Fields§
§variable: Symbol§noun_class: Symbol§gender: Gender§number: Number§source: ReferentSource§used_by_pronoun: bool§ownership: OwnershipState§modifiers: Vec<Symbol>The distinguishing modifier(s) of the description that introduced this
referent — the adjective/gerund that does the REFERRING in “the
[modifier] [head]”. For “the hunting vacation” this holds Hunt. Empty
for bare descriptions (“the vacation”). Used by context-driven
coreference: two definite descriptions that share their distinguishing
modifier AND have sort-compatible head nouns denote the same entity.
Implementations§
Source§impl Referent
impl Referent
pub fn new( variable: Symbol, noun_class: Symbol, gender: Gender, number: Number, source: ReferentSource, ) -> Referent
Sourcepub fn with_modifiers(
variable: Symbol,
noun_class: Symbol,
gender: Gender,
number: Number,
source: ReferentSource,
modifiers: Vec<Symbol>,
) -> Referent
pub fn with_modifiers( variable: Symbol, noun_class: Symbol, gender: Gender, number: Number, source: ReferentSource, modifiers: Vec<Symbol>, ) -> Referent
Construct a referent carrying its distinguishing modifier(s).
pub fn should_be_universal(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Referent
impl RefUnwindSafe for Referent
impl Send for Referent
impl Sync for Referent
impl Unpin for Referent
impl UnsafeUnpin for Referent
impl UnwindSafe for Referent
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.