Class Label

java.lang.Object
com.basistech.rosette.apimodel.Label

public final class Label extends Object
Sentiment Analysis and Categorization return labels. A label is a category name, a confidence value, that contributed to the determination. For Sentiment, the label strings are items like 'pos' or 'neg'; for Categorization, 'sports' or 'news'.
  • Method Details

    • builder

      public static Label.LabelBuilder builder()
    • getLabel

      public String getLabel()
      Returns:
      the label.
    • getConfidence

      public Double getConfidence()
      Returns:
      the confidence score (0.0-1.0)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object