Interface MicrosoftMTAPI
-
public interface MicrosoftMTAPI
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetBaseURL()Gets the base URL in use, such as https://api.cognitive.microsofttranslator.com.List<net.sf.okapi.connectors.microsoft.TranslationResponse>getTranslations(String query, String srcLang, String trgLang, int maxHits, int threshold)Call the getTranslations() API method.List<List<net.sf.okapi.connectors.microsoft.TranslationResponse>>getTranslationsArray(net.sf.okapi.connectors.microsoft.GetTranslationsArrayRequest request, String srcLang, String trgLang, int maxHits, int threshold)Call the getTranslationsArray() API method.intmaxCharCount()intmaxTextCount()
-
-
-
Method Detail
-
getTranslations
List<net.sf.okapi.connectors.microsoft.TranslationResponse> getTranslations(String query, String srcLang, String trgLang, int maxHits, int threshold)
Call the getTranslations() API method.- Returns:
- API responses, or null if the API call fails
-
getTranslationsArray
List<List<net.sf.okapi.connectors.microsoft.TranslationResponse>> getTranslationsArray(net.sf.okapi.connectors.microsoft.GetTranslationsArrayRequest request, String srcLang, String trgLang, int maxHits, int threshold)
Call the getTranslationsArray() API method.- Returns:
- API responses, or null if the API call fails
-
getBaseURL
String getBaseURL()
Gets the base URL in use, such as https://api.cognitive.microsofttranslator.com.- Returns:
- String representation of the base URL of the service in use
-
maxCharCount
int maxCharCount()
- Returns:
- maximum total character count per call to
getTranslationsArray(GetTranslationsArrayRequest, String, String, int, int)
-
maxTextCount
int maxTextCount()
- Returns:
- maximum count of text per call to
getTranslationsArray(GetTranslationsArrayRequest, String, String, int, int)
-
-