public class NaturalLanguageClassifier extends WatsonService
defaultHeaders, MESSAGE_CODE, MESSAGE_ERROR, skipAuthentication, VERSION
Constructor and Description |
---|
NaturalLanguageClassifier()
Instantiates a new Natural Language Classifier service.
|
NaturalLanguageClassifier(String username,
String password)
Instantiates a new natural language service by username and password.
|
Modifier and Type | Method and Description |
---|---|
ServiceCall<Classification> |
classify(String classifierId,
String text)
Returns classification information for a classifier on a phrase.
|
ServiceCall<Classifier> |
createClassifier(String name,
String language,
File trainingData)
Sends data to create and train a classifier, and returns information about the new classifier.
|
ServiceCall<Void> |
deleteClassifier(String classifierId)
Deletes a classifier.
|
ServiceCall<Classifier> |
getClassifier(String classifierId)
Retrieves a classifier.
|
ServiceCall<Classifiers> |
getClassifiers()
Retrieves the list of classifiers for the user.
|
configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getToken, processServiceCall, setApiKey, setAuthentication, setDefaultHeaders, setEndPoint, setSkipAuthentication, setUsernameAndPassword, toString
public NaturalLanguageClassifier()
public ServiceCall<Classification> classify(String classifierId, String text)
classifierId
- The classifier idtext
- The submitted phrase to classifypublic ServiceCall<Classifier> createClassifier(String name, String language, File trainingData)
name
- the classifier namelanguage
- IETF primary language for the classifier. for example: 'en'trainingData
- The set of questions and their "keys" used to adapt a system to a domain (the ground truth)Classifier
public ServiceCall<Void> deleteClassifier(String classifierId)
classifierId
- the classifier IDClassifier
public ServiceCall<Classifier> getClassifier(String classifierId)
classifierId
- the classifier IDClassifier
public ServiceCall<Classifiers> getClassifiers()
Classifier
Copyright © 2015–2016 IBM Watson. All rights reserved.