public class NaturalLanguageUnderstanding
extends com.ibm.cloud.sdk.core.service.BaseService
You can create [custom models](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) with Watson Knowledge Studio to detect custom entities and relations in Natural Language Understanding.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_SERVICE_NAME |
static java.lang.String |
DEFAULT_SERVICE_URL |
Constructor and Description |
---|
NaturalLanguageUnderstanding(java.lang.String version)
Constructs an instance of the `NaturalLanguageUnderstanding` client.
|
NaturalLanguageUnderstanding(java.lang.String version,
com.ibm.cloud.sdk.core.security.Authenticator authenticator)
Constructs an instance of the `NaturalLanguageUnderstanding` client.
|
NaturalLanguageUnderstanding(java.lang.String version,
java.lang.String serviceName)
Constructs an instance of the `NaturalLanguageUnderstanding` client.
|
NaturalLanguageUnderstanding(java.lang.String version,
java.lang.String serviceName,
com.ibm.cloud.sdk.core.security.Authenticator authenticator)
Constructs an instance of the `NaturalLanguageUnderstanding` client.
|
Modifier and Type | Method and Description |
---|---|
com.ibm.cloud.sdk.core.http.ServiceCall<AnalysisResults> |
analyze(AnalyzeOptions analyzeOptions)
Analyze text.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DeleteModelResults> |
deleteModel(DeleteModelOptions deleteModelOptions)
Delete model.
|
java.lang.String |
getVersion()
Gets the version.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ListModelsResults> |
listModels()
List models.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ListModelsResults> |
listModels(ListModelsOptions listModelsOptions)
List models.
|
void |
setVersion(java.lang.String version)
Sets the version.
|
configureClient, configureHttpClient, configureService, createServiceCall, enableGzipCompression, getAuthenticator, getClient, getEndPoint, getName, getServiceUrl, isJsonMimeType, isJsonPatchMimeType, processServiceCall, setAuthentication, setClient, setDefaultHeaders, setDefaultHeaders, setEndPoint, setServiceUrl, toString
public static final java.lang.String DEFAULT_SERVICE_NAME
public static final java.lang.String DEFAULT_SERVICE_URL
public NaturalLanguageUnderstanding(java.lang.String version)
version
- Release date of the API version you want to use. Specify dates in YYYY-MM-DD
format. The current version is `2020-08-01`.public NaturalLanguageUnderstanding(java.lang.String version, com.ibm.cloud.sdk.core.security.Authenticator authenticator)
version
- Release date of the API version you want to use. Specify dates in YYYY-MM-DD
format. The current version is `2020-08-01`.authenticator
- the Authenticator
instance to be configured for this clientpublic NaturalLanguageUnderstanding(java.lang.String version, java.lang.String serviceName)
version
- Release date of the API version you want to use. Specify dates in YYYY-MM-DD
format. The current version is `2020-08-01`.serviceName
- the service name to be used when configuring the client instancepublic NaturalLanguageUnderstanding(java.lang.String version, java.lang.String serviceName, com.ibm.cloud.sdk.core.security.Authenticator authenticator)
version
- Release date of the API version you want to use. Specify dates in YYYY-MM-DD
format. The current version is `2020-08-01`.serviceName
- the service name to be used when configuring the client instanceauthenticator
- the Authenticator
instance to be configured for this clientpublic java.lang.String getVersion()
Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. The current version is `2020-08-01`.
public void setVersion(java.lang.String version)
version
- the new versionpublic com.ibm.cloud.sdk.core.http.ServiceCall<AnalysisResults> analyze(AnalyzeOptions analyzeOptions)
Analyzes text, HTML, or a public webpage for the following features: - Categories - Concepts - Emotion - Entities - Keywords - Metadata - Relations - Semantic roles - Sentiment - Syntax - Summarization (Experimental)
If a language for the input text is not specified with the `language` parameter, the service [automatically detects the language](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-detectable-languages).
analyzeOptions
- the AnalyzeOptions
containing the options for the callServiceCall
with a result of type AnalysisResults
public com.ibm.cloud.sdk.core.http.ServiceCall<ListModelsResults> listModels(ListModelsOptions listModelsOptions)
Lists Watson Knowledge Studio [custom entities and relations models](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) that are deployed to your Natural Language Understanding service.
listModelsOptions
- the ListModelsOptions
containing the options for the callServiceCall
with a result of type ListModelsResults
public com.ibm.cloud.sdk.core.http.ServiceCall<ListModelsResults> listModels()
Lists Watson Knowledge Studio [custom entities and relations models](https://cloud.ibm.com/docs/natural-language-understanding?topic=natural-language-understanding-customizing) that are deployed to your Natural Language Understanding service.
ServiceCall
with a result of type ListModelsResults
public com.ibm.cloud.sdk.core.http.ServiceCall<DeleteModelResults> deleteModel(DeleteModelOptions deleteModelOptions)
Deletes a custom model.
deleteModelOptions
- the DeleteModelOptions
containing the options for the callServiceCall
with a result of type DeleteModelResults