pub struct Candidate<'a> {
pub score_vec_rounded: ScoresVector,
pub score_vec_full: ScoresVector,
pub rid: usize,
pub rule: &'a Rule,
pub high_set_intersection: TokenSet,
}Expand description
Candidate with its score vector and metadata.
Corresponds to the tuple structure used in Python: (scores_vectors, rid, rule, high_set_intersection)
Fields§
§score_vec_rounded: ScoresVectorRounded score vector for display/grouping
score_vec_full: ScoresVectorFull score vector for sorting
rid: usizeRule ID
rule: &'a RuleReference to the rule (borrowed from LicenseIndex)
high_set_intersection: TokenSetSet of high-value (legalese) tokens in the intersection
Trait Implementations§
Source§impl Ord for Candidate<'_>
impl Ord for Candidate<'_>
Source§impl PartialOrd for Candidate<'_>
impl PartialOrd for Candidate<'_>
impl Eq for Candidate<'_>
impl<'a> StructuralPartialEq for Candidate<'a>
Auto Trait Implementations§
impl<'a> Freeze for Candidate<'a>
impl<'a> RefUnwindSafe for Candidate<'a>
impl<'a> Send for Candidate<'a>
impl<'a> Sync for Candidate<'a>
impl<'a> Unpin for Candidate<'a>
impl<'a> UnsafeUnpin for Candidate<'a>
impl<'a> UnwindSafe for Candidate<'a>
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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