pub struct GraderTextSimilarity {
pub name: String,
pub input: String,
pub reference: String,
pub evaluation_metric: GraderTextSimilarityEvaluationMetric,
}
Expand description
A TextSimilarityGrader object which grades text based on similarity metrics.
Fields§
§name: String
The name of the grader.
input: String
The text being graded.
reference: String
The text being graded against.
evaluation_metric: GraderTextSimilarityEvaluationMetric
The 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 GraderTextSimilarity
impl GraderTextSimilarity
Sourcepub fn builder() -> GraderTextSimilarityBuilder<((), (), (), ())>
pub fn builder() -> GraderTextSimilarityBuilder<((), (), (), ())>
Create a builder for building GraderTextSimilarity
.
On the builder, call .name(...)
, .input(...)
, .reference(...)
, .evaluation_metric(...)
to set the values of the fields.
Finally, call .build()
to create the instance of GraderTextSimilarity
.
Trait Implementations§
Source§impl Clone for GraderTextSimilarity
impl Clone for GraderTextSimilarity
Source§fn clone(&self) -> GraderTextSimilarity
fn clone(&self) -> GraderTextSimilarity
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 GraderTextSimilarity
impl Debug for GraderTextSimilarity
Source§impl<'de> Deserialize<'de> for GraderTextSimilarity
impl<'de> Deserialize<'de> for GraderTextSimilarity
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 GraderTextSimilarity
impl PartialEq for GraderTextSimilarity
Source§impl Serialize for GraderTextSimilarity
impl Serialize for GraderTextSimilarity
impl StructuralPartialEq for GraderTextSimilarity
Auto Trait Implementations§
impl Freeze for GraderTextSimilarity
impl RefUnwindSafe for GraderTextSimilarity
impl Send for GraderTextSimilarity
impl Sync for GraderTextSimilarity
impl Unpin for GraderTextSimilarity
impl UnwindSafe for GraderTextSimilarity
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