Interface TranslateRpc
-
- All Superinterfaces:
com.google.cloud.ServiceRpc
- All Known Implementing Classes:
HttpTranslateRpc
public interface TranslateRpc extends com.google.cloud.ServiceRpc
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
TranslateRpc.Option
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<List<com.google.api.services.translate.model.DetectionsResourceItems>>
detect(List<String> texts)
Detects the language of the provided texts.List<com.google.api.services.translate.model.LanguagesResource>
listSupportedLanguages(Map<TranslateRpc.Option,?> optionMap)
Returns a list of the languages supported by Google Translation.List<com.google.api.services.translate.model.TranslationsResource>
translate(List<String> texts, Map<TranslateRpc.Option,?> optionMap)
Translates the provided texts.
-
-
-
Method Detail
-
listSupportedLanguages
List<com.google.api.services.translate.model.LanguagesResource> listSupportedLanguages(Map<TranslateRpc.Option,?> optionMap)
Returns a list of the languages supported by Google Translation.- Parameters:
optionMap
- options to listing language translations
-
detect
List<List<com.google.api.services.translate.model.DetectionsResourceItems>> detect(List<String> texts)
Detects the language of the provided texts.- Parameters:
texts
- the texts to translate- Returns:
- a list of lists of detections, one list of detections for each provided text, in order
-
translate
List<com.google.api.services.translate.model.TranslationsResource> translate(List<String> texts, Map<TranslateRpc.Option,?> optionMap)
Translates the provided texts.- Parameters:
texts
- the texts to translateoptionMap
- options to text translation- Returns:
- a list of resources containing translation information, in the same order of the provided texts
-
-