@Generated(value="OracleSDKGenerator", comments="API Version: 20221001") public interface AIServiceLanguageAsync extends AutoCloseable
OCI Language Service solutions can help enterprise customers integrate AI into their products immediately using our proven, pre-trained and custom models or containers, without a need to set up an house team of AI and ML experts. This allows enterprises to focus on business drivers and development work rather than AI and ML operations, which shortens the time to market.
close
void refreshClient()
Rebuilds the client from scratch. Useful to refresh certificates.
void setEndpoint(String endpoint)
Sets the endpoint to call (ex, https://www.example.com).
endpoint
- The endpoint of the serice.String getEndpoint()
Gets the set endpoint for REST call (ex, https://www.example.com)
void setRegion(Region region)
Sets the region to call (ex, Region.US_PHOENIX_1).
Note, this will call setEndpoint
after resolving the
endpoint. If the service is not available in this region, however, an
IllegalArgumentException will be raised.
region
- The region of the service.void setRegion(String regionId)
Sets the region to call (ex, ‘us-phoenix-1’).
Note, this will first try to map the region ID to a known Region and call setRegion
.
If no known Region could be determined, it will create an endpoint based on the default
endpoint format (Region.formatDefaultRegionEndpoint(Service, String)
and then call setEndpoint
.
regionId
- The public region ID.void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled)
Determines whether realm specific endpoint should be used or not. Set realmSpecificEndpointTemplateEnabled to “true” if the user wants to enable use of realm specific endpoint template, otherwise set it to “false”
realmSpecificEndpointTemplateEnabled
- flag to enable the use of realm specific endpoint
templateFuture<BatchDetectDominantLanguageResponse> batchDetectDominantLanguage(BatchDetectDominantLanguageRequest request, AsyncHandler<BatchDetectDominantLanguageRequest,BatchDetectDominantLanguageResponse> handler)
The API returns the detected language and a related confidence score (between 0 and 1). It supports passing a batch of records.
[List of supported languages.](https://docs.cloud.oracle.com/iaas/language/using/pretrain-models.htm#lang-detect)
Limitations: - A batch may have up to 100 records. - A record may be up to 5000 characters long. - The total of characters to process in a request can be up to 20,000 characters.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<BatchDetectLanguageEntitiesResponse> batchDetectLanguageEntities(BatchDetectLanguageEntitiesRequest request, AsyncHandler<BatchDetectLanguageEntitiesRequest,BatchDetectLanguageEntitiesResponse> handler)
The API extracts entities in text records. For each entity, its type/subtype and confidence score (between 0 and 1) is returned. It supports passing a batch of records.
[List of supported entities.](https://docs.cloud.oracle.com/iaas/language/using/pretrain-models.htm#ner__sup-ner-entity)
Limitations: - A batch may have up to 100 records. - A record may be up to 5000 characters long. - The total of characters to process in a request can be up to 20,000 characters.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<BatchDetectLanguageKeyPhrasesResponse> batchDetectLanguageKeyPhrases(BatchDetectLanguageKeyPhrasesRequest request, AsyncHandler<BatchDetectLanguageKeyPhrasesRequest,BatchDetectLanguageKeyPhrasesResponse> handler)
The API extracts key-phrases in text records. For each key-phrase, a score (between 0 and 1) is returned that highlights the importance of the key-phrase in the context of the text. It supports passing a batch of records.
Limitations: - A batch may have up to 100 records. - A record may be up to 5000 characters long. - The total of characters to process in a request can be up to 20,000 characters.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<BatchDetectLanguagePiiEntitiesResponse> batchDetectLanguagePiiEntities(BatchDetectLanguagePiiEntitiesRequest request, AsyncHandler<BatchDetectLanguagePiiEntitiesRequest,BatchDetectLanguagePiiEntitiesResponse> handler)
The API extracts pii entities in text records. For each entity, its type and confidence score (between 0 and 1) is returned. It supports passing a batch of records.
Limitations: - A batch may have up to 100 records. - A record may be up to 5000 characters long. - The total of characters to process in a request can be up to 20,000 characters.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<BatchDetectLanguageSentimentsResponse> batchDetectLanguageSentiments(BatchDetectLanguageSentimentsRequest request, AsyncHandler<BatchDetectLanguageSentimentsRequest,BatchDetectLanguageSentimentsResponse> handler)
The API extracts aspect-based and sentence level sentiment in text records.
For aspect-based sentiment analysis, a set of aspects and their respective sentiment is returned for each record. Similarly, for sentence-level sentiment analysis, the sentiment is returned at the sentence level.
For sentiment analysis, confidence scores are provided for each of the classes (positive, negative, neutral and mixed).
Learn more about sentiment analysis [here](https://docs.cloud.oracle.com/iaas/language/using/pretrain-models.htm#sentiment).
Limitations: - A batch may have up to 100 records. - A record may be up to 5000 characters long. - The total of characters to process in a request can be up to 20,000 characters.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<BatchDetectLanguageTextClassificationResponse> batchDetectLanguageTextClassification(BatchDetectLanguageTextClassificationRequest request, AsyncHandler<BatchDetectLanguageTextClassificationRequest,BatchDetectLanguageTextClassificationResponse> handler)
The API automatically classifies text into a set of pre-determined classes and sub-classes. A single class/subclass is returned for each record classified.
It supports passing a batch of records.
Learn more about text classification [here](https://docs.cloud.oracle.com/iaas/language/using/pretrain-models.htm#text-class).
Limitations: - A batch may have up to 100 records. - A record may be up to 5000 characters long. - The total of characters to process in a request can be up to 20,000 characters.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<BatchLanguageTranslationResponse> batchLanguageTranslation(BatchLanguageTranslationRequest request, AsyncHandler<BatchLanguageTranslationRequest,BatchLanguageTranslationResponse> handler)
Translate text to other language over pre-deployed model. Use state of the art neural machine translation to translate text between more than 15 languages. Limitations: - A batch may have up to 100 records. - A record may be up to 5000 characters long. - The total of characters to process in a request can be up to 20,000 characters.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ChangeEndpointCompartmentResponse> changeEndpointCompartment(ChangeEndpointCompartmentRequest request, AsyncHandler<ChangeEndpointCompartmentRequest,ChangeEndpointCompartmentResponse> handler)
Moves a Endpoint into a different compartment. When provided, If-Match is checked against ETag values of the resource.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ChangeModelCompartmentResponse> changeModelCompartment(ChangeModelCompartmentRequest request, AsyncHandler<ChangeModelCompartmentRequest,ChangeModelCompartmentResponse> handler)
Moves a Model into a different compartment. When provided, If-Match is checked against ETag values of the resource.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ChangeProjectCompartmentResponse> changeProjectCompartment(ChangeProjectCompartmentRequest request, AsyncHandler<ChangeProjectCompartmentRequest,ChangeProjectCompartmentResponse> handler)
Moves a Project into a different compartment. When provided, If-Match is checked against ETag values of the resource.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<CreateEndpointResponse> createEndpoint(CreateEndpointRequest request, AsyncHandler<CreateEndpointRequest,CreateEndpointResponse> handler)
Creates a new endpoint and deploy the trained model
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<CreateModelResponse> createModel(CreateModelRequest request, AsyncHandler<CreateModelRequest,CreateModelResponse> handler)
Creates a new model for training and train the model with date provided.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<CreateProjectResponse> createProject(CreateProjectRequest request, AsyncHandler<CreateProjectRequest,CreateProjectResponse> handler)
Creates a new Project.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<DeleteEndpointResponse> deleteEndpoint(DeleteEndpointRequest request, AsyncHandler<DeleteEndpointRequest,DeleteEndpointResponse> handler)
Deletes a provisioned endpoint resource by identifier. This operation fails with a 409 error unless all associated resources are in a DELETED state. You must delete all associated resources before deleting a model.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<DeleteModelResponse> deleteModel(DeleteModelRequest request, AsyncHandler<DeleteModelRequest,DeleteModelResponse> handler)
Deletes a provisioned model resource by identifier. This operation fails with a 409 error unless all associated resources are in a DELETED state. You must delete all associated resources before deleting a model.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<DeleteProjectResponse> deleteProject(DeleteProjectRequest request, AsyncHandler<DeleteProjectRequest,DeleteProjectResponse> handler)
Deletes a Project resource by identifier. This operation fails with a 409 error unless all associated resources (models deployments or data assets) are in a DELETED state. You must delete all associated resources before deleting a project.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<DetectDominantLanguageResponse> detectDominantLanguage(DetectDominantLanguageRequest request, AsyncHandler<DetectDominantLanguageRequest,DetectDominantLanguageResponse> handler)
This API will be retired on Monday, 10 Oct 2023 00:00:00 GMT The API returns the detected language and a related confidence score (between 0 and 1).
[List of supported languages.](https://docs.cloud.oracle.com/iaas/language/using/pretrain-models.htm#lang-detect)
Limitations: - A record may be up to 1000 characters long.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<DetectLanguageEntitiesResponse> detectLanguageEntities(DetectLanguageEntitiesRequest request, AsyncHandler<DetectLanguageEntitiesRequest,DetectLanguageEntitiesResponse> handler)
This API will be retired on Monday, 10 Oct 2023 00:00:00 GMT The API extracts entities in text records. For each entity, its type and confidence score (between 0 and 1) is returned.
Limitations: - A text may be up to 1000 characters long.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<DetectLanguageKeyPhrasesResponse> detectLanguageKeyPhrases(DetectLanguageKeyPhrasesRequest request, AsyncHandler<DetectLanguageKeyPhrasesRequest,DetectLanguageKeyPhrasesResponse> handler)
This API will be retired on Monday, 10 Oct 2023 00:00:00 GMT The API extracts key-phrases in text records. For each key-phrase, a score (between 0 and 1) is returned that highlights the importance of the key-phrase in the context of the text.
Limitations: - A record may be up to 1000 characters long.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<DetectLanguageSentimentsResponse> detectLanguageSentiments(DetectLanguageSentimentsRequest request, AsyncHandler<DetectLanguageSentimentsRequest,DetectLanguageSentimentsResponse> handler)
This API will be retired on Monday, 10 Oct 2023 00:00:00 GMT The API extracts aspect-based in text records.
For aspect-based sentiment analysis, a set of aspects and their respective sentiment is returned.
For sentiment analysis, confidence scores are provided for each of the classes (positive, negative, neutral).
Learn more about sentiment analysis [here](https://docs.cloud.oracle.com/iaas/language/using/pretrain-models.htm#sentiment).
Limitations: - A record may be up to 1000 characters long.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<DetectLanguageTextClassificationResponse> detectLanguageTextClassification(DetectLanguageTextClassificationRequest request, AsyncHandler<DetectLanguageTextClassificationRequest,DetectLanguageTextClassificationResponse> handler)
This API will be retired on Monday, 10 Oct 2023 00:00:00 GMT The API automatically classifies text into a set of pre-determined classes and sub-classes. A single class/subclass is returned for each record classified.
Learn more about text classification [here](https://docs.cloud.oracle.com/iaas/language/using/pretrain-models.htm#text-class).
Limitations: - A record may be up to 1000 characters long.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<GetEndpointResponse> getEndpoint(GetEndpointRequest request, AsyncHandler<GetEndpointRequest,GetEndpointResponse> handler)
Gets an endpoint by identifier
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<GetModelResponse> getModel(GetModelRequest request, AsyncHandler<GetModelRequest,GetModelResponse> handler)
Gets a model by identifier
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<GetProjectResponse> getProject(GetProjectRequest request, AsyncHandler<GetProjectRequest,GetProjectResponse> handler)
Gets a Project by identifier
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<GetWorkRequestResponse> getWorkRequest(GetWorkRequestRequest request, AsyncHandler<GetWorkRequestRequest,GetWorkRequestResponse> handler)
Gets the status of the work request with the given ID.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ListEndpointsResponse> listEndpoints(ListEndpointsRequest request, AsyncHandler<ListEndpointsRequest,ListEndpointsResponse> handler)
Returns a list of Endpoints.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ListEvaluationResultsResponse> listEvaluationResults(ListEvaluationResultsRequest request, AsyncHandler<ListEvaluationResultsRequest,ListEvaluationResultsResponse> handler)
Get a (paginated) list of evaluation results for a given model.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ListModelsResponse> listModels(ListModelsRequest request, AsyncHandler<ListModelsRequest,ListModelsResponse> handler)
Returns a list of models.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ListProjectsResponse> listProjects(ListProjectsRequest request, AsyncHandler<ListProjectsRequest,ListProjectsResponse> handler)
Returns a list of Projects.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ListWorkRequestErrorsResponse> listWorkRequestErrors(ListWorkRequestErrorsRequest request, AsyncHandler<ListWorkRequestErrorsRequest,ListWorkRequestErrorsResponse> handler)
Return a (paginated) list of errors for a given work request.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ListWorkRequestLogsResponse> listWorkRequestLogs(ListWorkRequestLogsRequest request, AsyncHandler<ListWorkRequestLogsRequest,ListWorkRequestLogsResponse> handler)
Return a (paginated) list of logs for a given work request.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<ListWorkRequestsResponse> listWorkRequests(ListWorkRequestsRequest request, AsyncHandler<ListWorkRequestsRequest,ListWorkRequestsResponse> handler)
Lists the work requests in a compartment.
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<UpdateEndpointResponse> updateEndpoint(UpdateEndpointRequest request, AsyncHandler<UpdateEndpointRequest,UpdateEndpointResponse> handler)
Update the Endpoint identified by the id
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<UpdateModelResponse> updateModel(UpdateModelRequest request, AsyncHandler<UpdateModelRequest,UpdateModelResponse> handler)
Updates the model
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Future<UpdateProjectResponse> updateProject(UpdateProjectRequest request, AsyncHandler<UpdateProjectRequest,UpdateProjectResponse> handler)
Updates the Project
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.Copyright © 2016–2023. All rights reserved.