pub struct EvalTextSimilarityGrader {
    pub name: Option<String>,
    pub input: String,
    pub reference: String,
    pub pass_threshold: f64,
    pub evaluation_metric: EvalTextSimilarityGraderEvaluationMetric,
}Expand description
A TextSimilarityGrader object which grades text based on similarity metrics.
Fields§
§name: Option<String>The name of the grader.
input: StringThe text being graded.
reference: StringThe text being graded against.
pass_threshold: f64A float score where a value greater than or equal indicates a passing grade.
evaluation_metric: EvalTextSimilarityGraderEvaluationMetricThe evaluation metric to use. One of fuzzy_match, bleu, gleu, meteor, rouge_1, rouge_2, rouge_3, rouge_4, rouge_5, or rouge_l.
Implementations§
Source§impl EvalTextSimilarityGrader
 
impl EvalTextSimilarityGrader
Sourcepub fn builder() -> EvalTextSimilarityGraderBuilder<((), (), (), (), ())>
 
pub fn builder() -> EvalTextSimilarityGraderBuilder<((), (), (), (), ())>
Create a builder for building EvalTextSimilarityGrader.
On the builder, call .name(...)(optional), .input(...), .reference(...), .pass_threshold(...), .evaluation_metric(...) to set the values of the fields.
Finally, call .build() to create the instance of EvalTextSimilarityGrader.
Trait Implementations§
Source§impl Clone for EvalTextSimilarityGrader
 
impl Clone for EvalTextSimilarityGrader
Source§fn clone(&self) -> EvalTextSimilarityGrader
 
fn clone(&self) -> EvalTextSimilarityGrader
Returns a duplicate of the value. Read more
1.0.0 · 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 EvalTextSimilarityGrader
 
impl Debug for EvalTextSimilarityGrader
Source§impl<'de> Deserialize<'de> for EvalTextSimilarityGrader
 
impl<'de> Deserialize<'de> for EvalTextSimilarityGrader
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 EvalTextSimilarityGrader
 
impl PartialEq for EvalTextSimilarityGrader
Source§impl Serialize for EvalTextSimilarityGrader
 
impl Serialize for EvalTextSimilarityGrader
impl StructuralPartialEq for EvalTextSimilarityGrader
Auto Trait Implementations§
impl Freeze for EvalTextSimilarityGrader
impl RefUnwindSafe for EvalTextSimilarityGrader
impl Send for EvalTextSimilarityGrader
impl Sync for EvalTextSimilarityGrader
impl Unpin for EvalTextSimilarityGrader
impl UnwindSafe for EvalTextSimilarityGrader
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