Package ai.djl.modality.nlp.translator
Class ZeroShotClassificationOutput
java.lang.Object
ai.djl.modality.nlp.translator.ZeroShotClassificationOutput
A class that represents a
ZeroShotClassificationOutput object.-
Constructor Summary
ConstructorsConstructorDescriptionZeroShotClassificationOutput(String sequence, String[] labels, double[] scores) Constructs a newZeroShotClassificationOutputinstance. -
Method Summary
Modifier and TypeMethodDescriptionString[]Returns the labels in sorted order.double[]Returns the scores of the labels.Returns the input text.
-
Constructor Details
-
ZeroShotClassificationOutput
Constructs a newZeroShotClassificationOutputinstance.- Parameters:
sequence- the input textlabels- the labelsscores- the scores of the labels
-
-
Method Details
-
getSequence
Returns the input text.- Returns:
- the input text
-
getLabels
Returns the labels in sorted order.- Returns:
- the labels in sorted order
-
getScores
public double[] getScores()Returns the scores of the labels.- Returns:
- the scores of the labels
-