public class NaturalLanguageClassifier extends WatsonService
defaultHeaders, MESSAGE_CODE, MESSAGE_ERROR, skipAuthentication, VERSION
Constructor and Description |
---|
NaturalLanguageClassifier()
Instantiates a new Natural Language Classifier service.
|
NaturalLanguageClassifier(java.lang.String username,
java.lang.String password)
Instantiates a new natural language service by username and password.
|
Modifier and Type | Method and Description |
---|---|
ServiceCall<Classification> |
classify(java.lang.String classifierId,
java.lang.String text)
Returns classification information for a classifier on a phrase.
|
ServiceCall<Classifier> |
createClassifier(java.lang.String name,
java.lang.String language,
java.io.File trainingData)
Sends data to create and train a classifier, and returns information about the new classifier.
|
ServiceCall<java.lang.Void> |
deleteClassifier(java.lang.String classifierId)
Deletes a classifier.
|
ServiceCall<Classifier> |
getClassifier(java.lang.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, setDefaultHeaders, setEndPoint, setSkipAuthentication, setUsernameAndPassword, toString
public NaturalLanguageClassifier()
public NaturalLanguageClassifier(java.lang.String username, java.lang.String password)
username
- the usernamepassword
- the passwordpublic ServiceCall<Classification> classify(java.lang.String classifierId, java.lang.String text)
classifierId
- The classifier idtext
- The submitted phrase to classifypublic ServiceCall<Classifier> createClassifier(java.lang.String name, java.lang.String language, java.io.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<java.lang.Void> deleteClassifier(java.lang.String classifierId)
classifierId
- the classifier IDClassifier
public ServiceCall<Classifier> getClassifier(java.lang.String classifierId)
classifierId
- the classifier IDClassifier
public ServiceCall<Classifiers> getClassifiers()
Classifier