Class NaturalLanguageClassifier

java.lang.Object
com.ibm.cloud.sdk.core.service.BaseService
com.ibm.watson.natural_language_classifier.v1.NaturalLanguageClassifier

public class NaturalLanguageClassifier
extends com.ibm.cloud.sdk.core.service.BaseService
IBM Watson™ Natural Language Classifier uses machine learning algorithms to return the top matching predefined classes for short text input. You create and train a classifier to connect predefined classes to example texts so that the service can apply those classes to new inputs.
Version:
v1
See Also:
Natural Language Classifier
  • Field Details

  • Constructor Details

    • NaturalLanguageClassifier

      public NaturalLanguageClassifier()
      Constructs an instance of the `NaturalLanguageClassifier` client. The default service name is used to configure the client instance.
    • NaturalLanguageClassifier

      public NaturalLanguageClassifier​(com.ibm.cloud.sdk.core.security.Authenticator authenticator)
      Constructs an instance of the `NaturalLanguageClassifier` client. The default service name and specified authenticator are used to configure the client instance.
      Parameters:
      authenticator - the Authenticator instance to be configured for this client
    • NaturalLanguageClassifier

      public NaturalLanguageClassifier​(String serviceName)
      Constructs an instance of the `NaturalLanguageClassifier` client. The specified service name is used to configure the client instance.
      Parameters:
      serviceName - the service name to be used when configuring the client instance
    • NaturalLanguageClassifier

      public NaturalLanguageClassifier​(String serviceName, com.ibm.cloud.sdk.core.security.Authenticator authenticator)
      Constructs an instance of the `NaturalLanguageClassifier` client. The specified service name and authenticator are used to configure the client instance.
      Parameters:
      serviceName - the service name to be used when configuring the client instance
      authenticator - the Authenticator instance to be configured for this client
  • Method Details

    • classify

      public com.ibm.cloud.sdk.core.http.ServiceCall<Classification> classify​(ClassifyOptions classifyOptions)
      Classify a phrase.

      Returns label information for the input. The status must be `Available` before you can use the classifier to classify text.

      Parameters:
      classifyOptions - the ClassifyOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Classification
    • classifyCollection

      public com.ibm.cloud.sdk.core.http.ServiceCall<ClassificationCollection> classifyCollection​(ClassifyCollectionOptions classifyCollectionOptions)
      Classify multiple phrases.

      Returns label information for multiple phrases. The status must be `Available` before you can use the classifier to classify text.

      Note that classifying Japanese texts is a beta feature.

      Parameters:
      classifyCollectionOptions - the ClassifyCollectionOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type ClassificationCollection
    • createClassifier

      public com.ibm.cloud.sdk.core.http.ServiceCall<Classifier> createClassifier​(CreateClassifierOptions createClassifierOptions)
      Create classifier.

      Sends data to create and train a classifier and returns information about the new classifier.

      Parameters:
      createClassifierOptions - the CreateClassifierOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Classifier
    • listClassifiers

      public com.ibm.cloud.sdk.core.http.ServiceCall<ClassifierList> listClassifiers​(ListClassifiersOptions listClassifiersOptions)
      List classifiers.

      Returns an empty array if no classifiers are available.

      Parameters:
      listClassifiersOptions - the ListClassifiersOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type ClassifierList
    • listClassifiers

      public com.ibm.cloud.sdk.core.http.ServiceCall<ClassifierList> listClassifiers()
      List classifiers.

      Returns an empty array if no classifiers are available.

      Returns:
      a ServiceCall with a result of type ClassifierList
    • getClassifier

      public com.ibm.cloud.sdk.core.http.ServiceCall<Classifier> getClassifier​(GetClassifierOptions getClassifierOptions)
      Get information about a classifier.

      Returns status and other information about a classifier.

      Parameters:
      getClassifierOptions - the GetClassifierOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Classifier
    • deleteClassifier

      public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteClassifier​(DeleteClassifierOptions deleteClassifierOptions)
      Delete classifier.
      Parameters:
      deleteClassifierOptions - the DeleteClassifierOptions containing the options for the call
      Returns:
      a ServiceCall with a void result