Class ZeroShotClassificationOutput

java.lang.Object
ai.djl.modality.nlp.translator.ZeroShotClassificationOutput

public class ZeroShotClassificationOutput extends Object
A class that represents a ZeroShotClassificationOutput object.
  • Constructor Details

    • ZeroShotClassificationOutput

      public ZeroShotClassificationOutput(String sequence, String[] labels, double[] scores)
      Constructs a new ZeroShotClassificationOutput instance.
      Parameters:
      sequence - the input text
      labels - the labels
      scores - the scores of the labels
  • Method Details

    • getSequence

      public String getSequence()
      Returns the input text.
      Returns:
      the input text
    • getLabels

      public String[] 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