public class LanguageTranslation extends WatsonService
defaultHeaders, MESSAGE_CODE, MESSAGE_ERROR, skipAuthentication, VERSION| Constructor and Description |
|---|
LanguageTranslation()
Instantiates a new Language Translator service.
|
LanguageTranslation(String username,
String password)
Instantiates a new language translation service by username and password.
|
| Modifier and Type | Method and Description |
|---|---|
ServiceCall<TranslationModel> |
createModel(CreateModelOptions options)
Creates a translation model.
|
ServiceCall<Void> |
deleteModel(String modelId)
Deletes a translation model.
|
ServiceCall<List<IdentifiableLanguage>> |
getIdentifiableLanguages()
Gets the The identifiable languages.
|
ServiceCall<TranslationModel> |
getModel(String modelId)
Gets a translation model.
|
ServiceCall<List<TranslationModel>> |
getModels()
Gets the translation model.
|
ServiceCall<List<TranslationModel>> |
getModels(Boolean showDefault,
String source,
String target)
Retrieves the list of model.
|
ServiceCall<List<IdentifiedLanguage>> |
identify(String text)
Identify language in which text is written.
|
ServiceCall<TranslationResult> |
translate(List<String> texts,
Language source,
Language target)
Translate multiple texts using source and target languages.
|
ServiceCall<TranslationResult> |
translate(List<String> texts,
String modelId)
Translate multiple texts using a given model.
|
ServiceCall<TranslationResult> |
translate(String text,
Language source,
Language target)
Translate text using source and target languages.
|
ServiceCall<TranslationResult> |
translate(String text,
String modelId)
Translate text using a given model.
|
configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getToken, processServiceCall, setApiKey, setAuthentication, setDefaultHeaders, setEndPoint, setSkipAuthentication, setUsernameAndPassword, toStringpublic LanguageTranslation()
public ServiceCall<TranslationModel> createModel(CreateModelOptions options)
options - the create model optionspublic ServiceCall<Void> deleteModel(String modelId)
modelId - the model identifierpublic ServiceCall<List<IdentifiableLanguage>> getIdentifiableLanguages()
See {@link IdentifiableLanguage}public ServiceCall<TranslationModel> getModel(String modelId)
modelId - the model identifierTranslationModelpublic ServiceCall<List<TranslationModel>> getModels()
TranslationModelpublic ServiceCall<List<TranslationModel>> getModels(Boolean showDefault, String source, String target)
showDefault - show default modelsource - the sourcetarget - the targetTranslationModelpublic ServiceCall<List<IdentifiedLanguage>> identify(String text)
text - the text to identifypublic ServiceCall<TranslationResult> translate(String text, String modelId)
text - The submitted paragraphs to translatemodelId - the model idTranslationResultpublic ServiceCall<TranslationResult> translate(String text, Language source, Language target)
text - The paragraphs to translatesource - The source languagetarget - The target languageTranslationResultpublic ServiceCall<TranslationResult> translate(List<String> texts, String modelId)
texts - The submitted texts to translatemodelId - the model idTranslationResult with translations in the same order as the supplied texts.public ServiceCall<TranslationResult> translate(List<String> texts, Language source, Language target)
texts - The texts to translatesource - The source languagetarget - The target languageTranslationResult with translations in the same order as the supplied texts.Copyright © 2015–2016 IBM Watson. All rights reserved.