Interface GoogleMTAPI

  • All Known Implementing Classes:
    GoogleMTAPIImpl

    public interface GoogleMTAPI
    • Method Detail

      • translate

        <T> List<TranslationResponse> translate​(GoogleQueryBuilder<T> qb)
                                         throws IOException,
                                                org.json.simple.parser.ParseException
        Make a single call to Google to translate the provided list of source texts. The source texts must obey Google protocol limits of <= 2048 total characters per request.
        Throws:
        IOException
        org.json.simple.parser.ParseException
      • translateSingleSegment

        <T> TranslationResponse translateSingleSegment​(GoogleQueryBuilder<T> qb,
                                                       String sourceText)
                                                throws IOException,
                                                       org.json.simple.parser.ParseException
        Perform translation of oversized (> 2048 characters) segments.
        Returns:
        the translation response
        Throws:
        IOException
        org.json.simple.parser.ParseException