Skip to content

Latest commit

 

History

History
 
 

natural-language-classifier

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Natural Language Classifier

Installation

Maven
<dependency>
	<groupId>com.ibm.watson.developer_cloud</groupId>
	<artifactId>natural-language-classifier</artifactId>
	<version>3.5.3</version>
</dependency>
Gradle
'com.ibm.watson.developer_cloud:natural-language-classifier:3.5.3'

Usage

Use Natural Language Classifier service to create a classifier instance by providing a set of representative strings and a set of one or more correct classes for each as training. Then use the trained classifier to classify your new question for best matching answers or to retrieve next actions for your application.

NaturalLanguageClassifier service = new NaturalLanguageClassifier();
service.setUsernameAndPassword("<username>", "<password>");

Classification classification = service.classify("<classifier-id>", "Is it sunny?").execute();
System.out.println(classification);

Note: You will need to create and train a classifier in order to be able to classify phrases.