public class LanguageTranslator extends WatsonService
defaultHeaders, MESSAGE_CODE, MESSAGE_ERROR, skipAuthentication, VERSION| Constructor and Description |
|---|
LanguageTranslator()
Instantiates a new `LanguageTranslator`.
|
LanguageTranslator(java.lang.String username,
java.lang.String password)
Instantiates a new `LanguageTranslator` with username and password.
|
| Modifier and Type | Method and Description |
|---|---|
ServiceCall<TranslationModel> |
createModel(CreateModelOptions createModelOptions)
Uploads a TMX glossary file on top of a domain to customize a translation model.
|
ServiceCall<java.lang.Void> |
deleteModel(DeleteModelOptions deleteModelOptions)
Deletes a custom translation model.
|
ServiceCall<TranslationModel> |
getModel(GetModelOptions getModelOptions)
Get information about the given translation model, including training status.
|
ServiceCall<IdentifiedLanguages> |
identify(IdentifyOptions identifyOptions)
Identifies the language of the input text.
|
ServiceCall<IdentifiableLanguages> |
listIdentifiableLanguages()
Lists all languages that can be identified by the API.
|
ServiceCall<TranslationModels> |
listModels(ListModelsOptions listModelsOptions)
Lists available standard and custom models by source or target language.
|
ServiceCall<TranslationResult> |
translate(TranslateOptions translateOptions)
Translates the input text from the source language to the target language.
|
configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getToken, processServiceCall, setApiKey, setAuthentication, setDefaultHeaders, setDefaultHeaders, setEndPoint, setSkipAuthentication, setUsernameAndPassword, toStringpublic LanguageTranslator()
public LanguageTranslator(java.lang.String username,
java.lang.String password)
username - the usernamepassword - the passwordpublic ServiceCall<IdentifiedLanguages> identify(IdentifyOptions identifyOptions)
identifyOptions - the IdentifyOptions containing the options for the callIdentifiedLanguages with the responsepublic ServiceCall<IdentifiableLanguages> listIdentifiableLanguages()
IdentifiableLanguages with the responsepublic ServiceCall<TranslationModel> createModel(CreateModelOptions createModelOptions)
createModelOptions - the CreateModelOptions containing the options for the callTranslationModel with the responsepublic ServiceCall<java.lang.Void> deleteModel(DeleteModelOptions deleteModelOptions)
deleteModelOptions - the DeleteModelOptions containing the options for the callpublic ServiceCall<TranslationModel> getModel(GetModelOptions getModelOptions)
getModelOptions - the GetModelOptions containing the options for the callTranslationModel with the responsepublic ServiceCall<TranslationModels> listModels(ListModelsOptions listModelsOptions)
listModelsOptions - the ListModelsOptions containing the options for the callTranslationModels with the responsepublic ServiceCall<TranslationResult> translate(TranslateOptions translateOptions)
translateOptions - the TranslateOptions containing the options for the callTranslationResult with the response