public class GoogleMTAPIImpl extends Object implements GoogleMTAPI
| Constructor and Description |
|---|
GoogleMTAPIImpl(String baseUrl,
GoogleMTv2Parameters params) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getLanguages() |
<T> List<TranslationResponse> |
translate(GoogleQueryBuilder<T> qb)
Make a single call to Google to translate the provided list of source texts.
|
<T> TranslationResponse |
translateSingleSegment(GoogleQueryBuilder<T> qb,
String sourceText)
Perform translation of oversized (> 2048 characters) segments.
|
public GoogleMTAPIImpl(String baseUrl, GoogleMTv2Parameters params)
public List<String> getLanguages() throws IOException, org.json.simple.parser.ParseException
getLanguages in interface GoogleMTAPIIOExceptionorg.json.simple.parser.ParseExceptionpublic <T> List<TranslationResponse> translate(GoogleQueryBuilder<T> qb) throws IOException, org.json.simple.parser.ParseException
GoogleMTAPItranslate in interface GoogleMTAPIIOExceptionorg.json.simple.parser.ParseExceptionpublic <T> TranslationResponse translateSingleSegment(GoogleQueryBuilder<T> qb, String sourceText) throws IOException, org.json.simple.parser.ParseException
GoogleMTAPItranslateSingleSegment in interface GoogleMTAPIIOExceptionorg.json.simple.parser.ParseExceptionCopyright © 2022. All rights reserved.