Class EvalTextSimilarityGrader
-
- All Implemented Interfaces:
public final class EvalTextSimilarityGraderA TextSimilarityGrader object which grades text based on similarity metrics.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classEvalTextSimilarityGrader.BuilderA builder for EvalTextSimilarityGrader.
public final classEvalTextSimilarityGrader.EvaluationMetricThe evaluation metric to use. One of
cosine,fuzzy_match,bleu,gleu,meteor,rouge_1,rouge_2,rouge_3,rouge_4,rouge_5, orrouge_l.
-
Method Summary
Modifier and Type Method Description final EvalTextSimilarityGrader.EvaluationMetricevaluationMetric()The evaluation metric to use. final Stringinput()The text being graded. final DoublepassThreshold()A float score where a value greater than or equal indicates a passing grade. final Stringreference()The text being graded against. final JsonValue_type()The type of grader. final Optional<String>name()The name of the grader. final JsonField<EvalTextSimilarityGrader.EvaluationMetric>_evaluationMetric()Returns the raw JSON value of evaluationMetric. final JsonField<String>_input()Returns the raw JSON value of input. final JsonField<Double>_passThreshold()Returns the raw JSON value of passThreshold. final JsonField<String>_reference()Returns the raw JSON value of reference. final JsonField<String>_name()Returns the raw JSON value of name. final Map<String, JsonValue>_additionalProperties()final EvalTextSimilarityGrader.BuildertoBuilder()final EvalTextSimilarityGradervalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static EvalTextSimilarityGrader.Builderbuilder()Returns a mutable builder for constructing an instance of EvalTextSimilarityGrader. -
-
Method Detail
-
evaluationMetric
final EvalTextSimilarityGrader.EvaluationMetric evaluationMetric()
The evaluation metric to use. One of
cosine,fuzzy_match,bleu,gleu,meteor,rouge_1,rouge_2,rouge_3,rouge_4,rouge_5, orrouge_l.
-
passThreshold
final Double passThreshold()
A float score where a value greater than or equal indicates a passing grade.
-
_type
final JsonValue _type()
The type of grader.
Expected to always return the following:
JsonValue.from("text_similarity")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_evaluationMetric
final JsonField<EvalTextSimilarityGrader.EvaluationMetric> _evaluationMetric()
Returns the raw JSON value of evaluationMetric.
Unlike evaluationMetric, this method doesn't throw if the JSON field has an unexpected type.
-
_input
final JsonField<String> _input()
Returns the raw JSON value of input.
Unlike input, this method doesn't throw if the JSON field has an unexpected type.
-
_passThreshold
final JsonField<Double> _passThreshold()
Returns the raw JSON value of passThreshold.
Unlike passThreshold, this method doesn't throw if the JSON field has an unexpected type.
-
_reference
final JsonField<String> _reference()
Returns the raw JSON value of reference.
Unlike reference, this method doesn't throw if the JSON field has an unexpected type.
-
_name
final JsonField<String> _name()
Returns the raw JSON value of name.
Unlike name, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final EvalTextSimilarityGrader.Builder toBuilder()
-
validate
final EvalTextSimilarityGrader validate()
-
builder
final static EvalTextSimilarityGrader.Builder builder()
Returns a mutable builder for constructing an instance of EvalTextSimilarityGrader.
The following fields are required:
.evaluationMetric() .input() .passThreshold() .reference()
-
-
-
-