pub struct EventCorefResolver {
pub require_type_match: bool,
pub min_arg_overlap: f64,
}Expand description
Simple event coreference resolver.
Uses heuristics based on:
- Trigger lemma matching (same verb stem)
- Event type matching
- Argument overlap
§Limitations
This rule-based approach is simplistic. For production, use:
- BERT-based event coref (Ahmed & Martin, 2021)
- Cross-document event coref with LSH blocking
Fields§
§require_type_match: boolRequire matching event types
min_arg_overlap: f64Minimum argument overlap ratio (0.0 = no requirement)
Implementations§
Source§impl EventCorefResolver
impl EventCorefResolver
Sourcepub fn new() -> EventCorefResolver
pub fn new() -> EventCorefResolver
Create a new resolver with default settings.
Sourcepub fn resolve(&self, mentions: &[EventMention]) -> Vec<EventCluster>
pub fn resolve(&self, mentions: &[EventMention]) -> Vec<EventCluster>
Resolve event coreference, grouping mentions into clusters.
Sourcepub fn triggers_match(&self, a: &str, b: &str) -> bool
pub fn triggers_match(&self, a: &str, b: &str) -> bool
Make method public for testing
Trait Implementations§
Source§impl Clone for EventCorefResolver
impl Clone for EventCorefResolver
Source§fn clone(&self) -> EventCorefResolver
fn clone(&self) -> EventCorefResolver
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 EventCorefResolver
impl Debug for EventCorefResolver
Source§impl Default for EventCorefResolver
impl Default for EventCorefResolver
Source§fn default() -> EventCorefResolver
fn default() -> EventCorefResolver
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EventCorefResolver
impl RefUnwindSafe for EventCorefResolver
impl Send for EventCorefResolver
impl Sync for EventCorefResolver
impl Unpin for EventCorefResolver
impl UnsafeUnpin for EventCorefResolver
impl UnwindSafe for EventCorefResolver
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