public class NaturalLanguageUnderstanding extends WatsonService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
VERSION_DATE_2017_02_27
The Constant VERSION_DATE_2017_02_27.
|
defaultHeaders, MESSAGE_CODE, MESSAGE_ERROR, skipAuthentication, VERSION
Constructor and Description |
---|
NaturalLanguageUnderstanding(java.lang.String versionDate)
Instantiates a new `NaturalLanguageUnderstanding`.
|
NaturalLanguageUnderstanding(java.lang.String versionDate,
java.lang.String username,
java.lang.String password)
Instantiates a new `NaturalLanguageUnderstanding` with username and password.
|
Modifier and Type | Method and Description |
---|---|
ServiceCall<AnalysisResults> |
analyze(AnalyzeOptions parameters)
Analyzes text, HTML, or a public webpage with one or more text analysis features.
|
ServiceCall<java.lang.Void> |
deleteModel(java.lang.String modelId)
Delete model.
|
ServiceCall<ListModelsResults> |
getModels()
List models.
|
configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getToken, processServiceCall, setApiKey, setAuthentication, setDefaultHeaders, setEndPoint, setSkipAuthentication, setUsernameAndPassword, toString
public static final java.lang.String VERSION_DATE_2017_02_27
public NaturalLanguageUnderstanding(java.lang.String versionDate)
versionDate
- The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
calls from failing when the service introduces breaking changes.public NaturalLanguageUnderstanding(java.lang.String versionDate, java.lang.String username, java.lang.String password)
versionDate
- The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
calls from failing when the service introduces breaking changes.username
- the usernamepassword
- the passwordpublic ServiceCall<AnalysisResults> analyze(AnalyzeOptions parameters)
parameters:
- An object containing request parameters. The `features` object and one of the `text`, `html`, or
`url` attributes are required.AnalysisResults
with the responsepublic ServiceCall<java.lang.Void> deleteModel(java.lang.String modelId)
modelId
- the model idpublic ServiceCall<ListModelsResults> getModels()
ListModelsResults
with the response