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.
API Version: 1.0 See: https://cloud.ibm.com/docs/natural-language-understanding
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_SERVICE_NAME |
static String |
DEFAULT_SERVICE_URL |
Constructor and Description |
---|
NaturalLanguageUnderstanding(String version)
Constructs an instance of the `NaturalLanguageUnderstanding` client.
|
NaturalLanguageUnderstanding(String version,
com.ibm.cloud.sdk.core.security.Authenticator authenticator)
Constructs an instance of the `NaturalLanguageUnderstanding` client.
|
NaturalLanguageUnderstanding(String version,
String serviceName)
Constructs an instance of the `NaturalLanguageUnderstanding` client.
|
NaturalLanguageUnderstanding(String version,
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<CategoriesModel> |
createCategoriesModel(CreateCategoriesModelOptions createCategoriesModelOptions)
Create categories model.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ClassificationsModel> |
createClassificationsModel(CreateClassificationsModelOptions createClassificationsModelOptions)
Create classifications model.
|
com.ibm.cloud.sdk.core.http.ServiceCall<SentimentModel> |
createSentimentModel(CreateSentimentModelOptions createSentimentModelOptions)
Create sentiment model.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DeleteModelResults> |
deleteCategoriesModel(DeleteCategoriesModelOptions deleteCategoriesModelOptions)
Delete categories model.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DeleteModelResults> |
deleteClassificationsModel(DeleteClassificationsModelOptions deleteClassificationsModelOptions)
Delete classifications model.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DeleteModelResults> |
deleteModel(DeleteModelOptions deleteModelOptions)
Delete model.
|
com.ibm.cloud.sdk.core.http.ServiceCall<DeleteModelResults> |
deleteSentimentModel(DeleteSentimentModelOptions deleteSentimentModelOptions)
Delete sentiment model.
|
com.ibm.cloud.sdk.core.http.ServiceCall<CategoriesModel> |
getCategoriesModel(GetCategoriesModelOptions getCategoriesModelOptions)
Get categories model details.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ClassificationsModel> |
getClassificationsModel(GetClassificationsModelOptions getClassificationsModelOptions)
Get classifications model details.
|
com.ibm.cloud.sdk.core.http.ServiceCall<SentimentModel> |
getSentimentModel(GetSentimentModelOptions getSentimentModelOptions)
Get sentiment model details.
|
String |
getVersion()
Gets the version.
|
com.ibm.cloud.sdk.core.http.ServiceCall<CategoriesModelList> |
listCategoriesModels()
List categories models.
|
com.ibm.cloud.sdk.core.http.ServiceCall<CategoriesModelList> |
listCategoriesModels(ListCategoriesModelsOptions listCategoriesModelsOptions)
List categories models.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ClassificationsModelList> |
listClassificationsModels()
List classifications models.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ClassificationsModelList> |
listClassificationsModels(ListClassificationsModelsOptions listClassificationsModelsOptions)
List classifications models.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ListModelsResults> |
listModels()
List models.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ListModelsResults> |
listModels(ListModelsOptions listModelsOptions)
List models.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ListSentimentModelsResponse> |
listSentimentModels()
List sentiment models.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ListSentimentModelsResponse> |
listSentimentModels(ListSentimentModelsOptions listSentimentModelsOptions)
List sentiment models.
|
void |
setVersion(String version)
Sets the version.
|
com.ibm.cloud.sdk.core.http.ServiceCall<CategoriesModel> |
updateCategoriesModel(UpdateCategoriesModelOptions updateCategoriesModelOptions)
Update categories model.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ClassificationsModel> |
updateClassificationsModel(UpdateClassificationsModelOptions updateClassificationsModelOptions)
Update classifications model.
|
com.ibm.cloud.sdk.core.http.ServiceCall<SentimentModel> |
updateSentimentModel(UpdateSentimentModelOptions updateSentimentModelOptions)
Update sentiment model.
|
configureClient, configureService, constructServiceUrl, constructServiceURL, disableRetries, enableGzipCompression, enableRetries, getAuthenticator, getClient, getDefaultHeaders, getEndPoint, getName, getServiceUrl, isJsonMimeType, isJsonPatchMimeType, setClient, setDefaultHeaders, setEndPoint, setServiceUrl, toString
public static final String DEFAULT_SERVICE_NAME
public static final String DEFAULT_SERVICE_URL
public NaturalLanguageUnderstanding(String version)
version
- Release date of the API version you want to use. Specify dates in YYYY-MM-DD
format. The current version is `2022-04-07`.public NaturalLanguageUnderstanding(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 `2022-04-07`.authenticator
- the Authenticator
instance to be configured for this clientpublic NaturalLanguageUnderstanding(String version, String serviceName)
version
- Release date of the API version you want to use. Specify dates in YYYY-MM-DD
format. The current version is `2022-04-07`.serviceName
- the service name to be used when configuring the client instancepublic NaturalLanguageUnderstanding(String version, 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 `2022-04-07`.serviceName
- the service name to be used when configuring the client instanceauthenticator
- the Authenticator
instance to be configured for this clientpublic String getVersion()
Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. The current version is `2022-04-07`.
public void setVersion(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 - Classifications - 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
public com.ibm.cloud.sdk.core.http.ServiceCall<SentimentModel> createSentimentModel(CreateSentimentModelOptions createSentimentModelOptions)
(Beta) Creates a custom sentiment model by uploading training data and associated metadata. The model begins the training and deploying process and is ready to use when the `status` is `available`.
createSentimentModelOptions
- the CreateSentimentModelOptions
containing the
options for the callServiceCall
with a result of type SentimentModel
public com.ibm.cloud.sdk.core.http.ServiceCall<ListSentimentModelsResponse> listSentimentModels(ListSentimentModelsOptions listSentimentModelsOptions)
(Beta) Returns all custom sentiment models associated with this service instance.
listSentimentModelsOptions
- the ListSentimentModelsOptions
containing the options
for the callServiceCall
with a result of type ListSentimentModelsResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<ListSentimentModelsResponse> listSentimentModels()
(Beta) Returns all custom sentiment models associated with this service instance.
ServiceCall
with a result of type ListSentimentModelsResponse
public com.ibm.cloud.sdk.core.http.ServiceCall<SentimentModel> getSentimentModel(GetSentimentModelOptions getSentimentModelOptions)
(Beta) Returns the status of the sentiment model with the given model ID.
getSentimentModelOptions
- the GetSentimentModelOptions
containing the options for
the callServiceCall
with a result of type SentimentModel
public com.ibm.cloud.sdk.core.http.ServiceCall<SentimentModel> updateSentimentModel(UpdateSentimentModelOptions updateSentimentModelOptions)
(Beta) Overwrites the training data associated with this custom sentiment model and retrains the model. The new model replaces the current deployment.
updateSentimentModelOptions
- the UpdateSentimentModelOptions
containing the
options for the callServiceCall
with a result of type SentimentModel
public com.ibm.cloud.sdk.core.http.ServiceCall<DeleteModelResults> deleteSentimentModel(DeleteSentimentModelOptions deleteSentimentModelOptions)
(Beta) Un-deploys the custom sentiment model with the given model ID and deletes all associated customer data, including any training data or binary artifacts.
deleteSentimentModelOptions
- the DeleteSentimentModelOptions
containing the
options for the callServiceCall
with a result of type DeleteModelResults
public com.ibm.cloud.sdk.core.http.ServiceCall<CategoriesModel> createCategoriesModel(CreateCategoriesModelOptions createCategoriesModelOptions)
(Beta) Creates a custom categories model by uploading training data and associated metadata. The model begins the training and deploying process and is ready to use when the `status` is `available`.
createCategoriesModelOptions
- the CreateCategoriesModelOptions
containing the
options for the callServiceCall
with a result of type CategoriesModel
public com.ibm.cloud.sdk.core.http.ServiceCall<CategoriesModelList> listCategoriesModels(ListCategoriesModelsOptions listCategoriesModelsOptions)
(Beta) Returns all custom categories models associated with this service instance.
listCategoriesModelsOptions
- the ListCategoriesModelsOptions
containing the
options for the callServiceCall
with a result of type CategoriesModelList
public com.ibm.cloud.sdk.core.http.ServiceCall<CategoriesModelList> listCategoriesModels()
(Beta) Returns all custom categories models associated with this service instance.
ServiceCall
with a result of type CategoriesModelList
public com.ibm.cloud.sdk.core.http.ServiceCall<CategoriesModel> getCategoriesModel(GetCategoriesModelOptions getCategoriesModelOptions)
(Beta) Returns the status of the categories model with the given model ID.
getCategoriesModelOptions
- the GetCategoriesModelOptions
containing the options
for the callServiceCall
with a result of type CategoriesModel
public com.ibm.cloud.sdk.core.http.ServiceCall<CategoriesModel> updateCategoriesModel(UpdateCategoriesModelOptions updateCategoriesModelOptions)
(Beta) Overwrites the training data associated with this custom categories model and retrains the model. The new model replaces the current deployment.
updateCategoriesModelOptions
- the UpdateCategoriesModelOptions
containing the
options for the callServiceCall
with a result of type CategoriesModel
public com.ibm.cloud.sdk.core.http.ServiceCall<DeleteModelResults> deleteCategoriesModel(DeleteCategoriesModelOptions deleteCategoriesModelOptions)
(Beta) Un-deploys the custom categories model with the given model ID and deletes all associated customer data, including any training data or binary artifacts.
deleteCategoriesModelOptions
- the DeleteCategoriesModelOptions
containing the
options for the callServiceCall
with a result of type DeleteModelResults
public com.ibm.cloud.sdk.core.http.ServiceCall<ClassificationsModel> createClassificationsModel(CreateClassificationsModelOptions createClassificationsModelOptions)
Creates a custom classifications model by uploading training data and associated metadata. The model begins the training and deploying process and is ready to use when the `status` is `available`.
createClassificationsModelOptions
- the CreateClassificationsModelOptions
containing the options for the callServiceCall
with a result of type ClassificationsModel
public com.ibm.cloud.sdk.core.http.ServiceCall<ClassificationsModelList> listClassificationsModels(ListClassificationsModelsOptions listClassificationsModelsOptions)
Returns all custom classifications models associated with this service instance.
listClassificationsModelsOptions
- the ListClassificationsModelsOptions
containing
the options for the callServiceCall
with a result of type ClassificationsModelList
public com.ibm.cloud.sdk.core.http.ServiceCall<ClassificationsModelList> listClassificationsModels()
Returns all custom classifications models associated with this service instance.
ServiceCall
with a result of type ClassificationsModelList
public com.ibm.cloud.sdk.core.http.ServiceCall<ClassificationsModel> getClassificationsModel(GetClassificationsModelOptions getClassificationsModelOptions)
Returns the status of the classifications model with the given model ID.
getClassificationsModelOptions
- the GetClassificationsModelOptions
containing the
options for the callServiceCall
with a result of type ClassificationsModel
public com.ibm.cloud.sdk.core.http.ServiceCall<ClassificationsModel> updateClassificationsModel(UpdateClassificationsModelOptions updateClassificationsModelOptions)
Overwrites the training data associated with this custom classifications model and retrains the model. The new model replaces the current deployment.
updateClassificationsModelOptions
- the UpdateClassificationsModelOptions
containing the options for the callServiceCall
with a result of type ClassificationsModel
public com.ibm.cloud.sdk.core.http.ServiceCall<DeleteModelResults> deleteClassificationsModel(DeleteClassificationsModelOptions deleteClassificationsModelOptions)
Un-deploys the custom classifications model with the given model ID and deletes all associated customer data, including any training data or binary artifacts.
deleteClassificationsModelOptions
- the DeleteClassificationsModelOptions
containing the options for the callServiceCall
with a result of type DeleteModelResults
Copyright © 2022 IBM Cloud. All rights reserved.