pub struct DiscourseAwareResolver { /* private fields */ }Expand description
Discourse-aware coreference resolver.
This is intended for analysis/eval paths; it does not attempt to be a full abstract-anaphora system. It extracts a small event inventory and uses discourse boundary heuristics to propose clause/sentence antecedent spans for demonstratives and shell-noun phrases.
Implementations§
Source§impl DiscourseAwareResolver
impl DiscourseAwareResolver
Sourcepub fn new(config: DiscourseCorefConfig, text: &str) -> DiscourseAwareResolver
pub fn new(config: DiscourseCorefConfig, text: &str) -> DiscourseAwareResolver
Create a new discourse-aware resolver.
Sourcepub fn events(&self) -> &[EventMention]
pub fn events(&self) -> &[EventMention]
Get extracted events.
Sourcepub fn resolve_entities(&self, entities: &[Entity]) -> Vec<Entity>
pub fn resolve_entities(&self, entities: &[Entity]) -> Vec<Entity>
Resolve coreference with discourse awareness.
Sourcepub fn resolve(&self, entities: &[Entity]) -> Vec<Entity>
pub fn resolve(&self, entities: &[Entity]) -> Vec<Entity>
Resolve coreference with discourse awareness.
Inherent-method convenience wrapper (so callers don’t need to import the
CoreferenceResolver trait to call resolver.resolve(&entities)).
Sourcepub fn find_discourse_antecedent(
&self,
anaphor: &Entity,
) -> Option<DiscourseReferent>
pub fn find_discourse_antecedent( &self, anaphor: &Entity, ) -> Option<DiscourseReferent>
Find a discourse-level antecedent for an abstract anaphor.
Trait Implementations§
Source§impl Clone for DiscourseAwareResolver
impl Clone for DiscourseAwareResolver
Source§fn clone(&self) -> DiscourseAwareResolver
fn clone(&self) -> DiscourseAwareResolver
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 CoreferenceResolver for DiscourseAwareResolver
Available on crate feature discourse only.
impl CoreferenceResolver for DiscourseAwareResolver
Available on crate feature
discourse only.Auto Trait Implementations§
impl Freeze for DiscourseAwareResolver
impl RefUnwindSafe for DiscourseAwareResolver
impl Send for DiscourseAwareResolver
impl Sync for DiscourseAwareResolver
impl Unpin for DiscourseAwareResolver
impl UnsafeUnpin for DiscourseAwareResolver
impl UnwindSafe for DiscourseAwareResolver
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> ErasedDestructor for Twhere
T: 'static,
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