pub struct AmendmentSimilarity {
pub tree_diff_path: String,
pub amendment_id: String,
pub score: f32,
pub precision: f32,
pub recall: f32,
pub matched_words: i32,
pub tree_diff_words: i32,
}Expand description
Similarity between a TreeDiff and a bill amendment
Used to rank how likely a BillAmendment caused the changes at a TreeDiff location.
Fields§
§tree_diff_path: StringThe structural path of the TreeDiff node
amendment_id: StringThe ID of the matched BillAmendment
score: f32Primary ranking metric (precision-weighted F1)
precision: f32How well the amendment explains the TreeDiff’s changes |TreeDiff ∩ Amendment| / |TreeDiff|
recall: f32How much of the amendment is represented in this TreeDiff |TreeDiff ∩ Amendment| / |Amendment|
matched_words: i32Number of words that matched between TreeDiff and Amendment
tree_diff_words: i32Total significant words in the TreeDiff’s changes
Trait Implementations§
Source§impl Clone for AmendmentSimilarity
impl Clone for AmendmentSimilarity
Source§fn clone(&self) -> AmendmentSimilarity
fn clone(&self) -> AmendmentSimilarity
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 AmendmentSimilarity
impl Debug for AmendmentSimilarity
Source§impl<'de> Deserialize<'de> for AmendmentSimilarity
impl<'de> Deserialize<'de> for AmendmentSimilarity
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AmendmentSimilarity
impl PartialEq for AmendmentSimilarity
Source§fn eq(&self, other: &AmendmentSimilarity) -> bool
fn eq(&self, other: &AmendmentSimilarity) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AmendmentSimilarity
impl Serialize for AmendmentSimilarity
impl StructuralPartialEq for AmendmentSimilarity
Auto Trait Implementations§
impl Freeze for AmendmentSimilarity
impl RefUnwindSafe for AmendmentSimilarity
impl Send for AmendmentSimilarity
impl Sync for AmendmentSimilarity
impl Unpin for AmendmentSimilarity
impl UnsafeUnpin for AmendmentSimilarity
impl UnwindSafe for AmendmentSimilarity
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<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