pub struct HeuristicCorefProvider { /* private fields */ }Expand description
A simple heuristic CorefScoreProvider based on string matching.
This is a lightweight alternative to neural mention-ranking models.
Implementations§
Source§impl HeuristicCorefProvider
impl HeuristicCorefProvider
Sourcepub fn with_exact_match_weight(self, weight: f64) -> Self
pub fn with_exact_match_weight(self, weight: f64) -> Self
Set exact match weight.
Sourcepub fn with_distance_penalty(self, penalty: f64) -> Self
pub fn with_distance_penalty(self, penalty: f64) -> Self
Set distance penalty.
Trait Implementations§
Source§impl CorefScoreProvider for HeuristicCorefProvider
impl CorefScoreProvider for HeuristicCorefProvider
Source§fn antecedent_scores(
&self,
mention: &JointMention,
candidates: &[&JointMention],
_text: &str,
) -> Vec<(AntecedentValue, f64)>
fn antecedent_scores( &self, mention: &JointMention, candidates: &[&JointMention], _text: &str, ) -> Vec<(AntecedentValue, f64)>
Get antecedent scores for a mention. Read more
Auto Trait Implementations§
impl Freeze for HeuristicCorefProvider
impl RefUnwindSafe for HeuristicCorefProvider
impl Send for HeuristicCorefProvider
impl Sync for HeuristicCorefProvider
impl Unpin for HeuristicCorefProvider
impl UnsafeUnpin for HeuristicCorefProvider
impl UnwindSafe for HeuristicCorefProvider
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> 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