java.lang.Object
com.ibm.cloud.sdk.core.service.model.GenericModel
com.ibm.watson.natural_language_classifier.v1.model.CollectionItem
All Implemented Interfaces:
com.ibm.cloud.sdk.core.service.model.ObjectModel

public class CollectionItem
extends com.ibm.cloud.sdk.core.service.model.GenericModel
Response from the classifier for a phrase in a collection.
  • Constructor Details

    • CollectionItem

      public CollectionItem()
  • Method Details

    • getText

      public String getText()
      Gets the text.

      The submitted phrase. The maximum length is 2048 characters.

      Returns:
      the text
    • getTopClass

      public String getTopClass()
      Gets the topClass.

      The class with the highest confidence.

      Returns:
      the topClass
    • getClasses

      public List<ClassifiedClass> getClasses()
      Gets the classes.

      An array of up to ten class-confidence pairs sorted in descending order of confidence.

      Returns:
      the classes