public final class Detect extends MicrosoftTranslatorAPI<TextArrayRequest,DetectResult>
Provides an interface to the Microsoft Translator Detect service method
Uses the AJAX Interface V2 - see: http://msdn.microsoft.com/en-us/library/ff512396.aspx
apiKey, ENCODING, HTTP_GET, HTTP_POST, PARAM_APP_ID, PARAM_FROM_LANG, PARAM_LANGUAGE_CODES, PARAM_LOCALE, PARAM_SCOPE, PARAM_SENTENCES_LANGUAGE, PARAM_SPOKEN_LANGUAGE, PARAM_TEXT_ARRAY, PARAM_TEXT_SINGLE, PARAM_TO_LANG, protocol, PROTOCOL_HTTP, PROTOCOL_HTTPS| Modifier and Type | Method and Description |
|---|---|
static Language |
execute(java.lang.String text)
Detects the language of a supplied String.
|
static java.lang.String[] |
execute(java.lang.String[] texts)
Detects the language of all supplied Strings in array.
|
static DetectResult |
retrieveResult(java.lang.String... texts) |
buildStringArrayParam, getProtocol, getToken, isUsingSSL, resetToken, retrieveIntArray, retrieveResponseV3, retrieveResponseV3, retrieveString, retrieveStringArr, retrieveStringArr, setContentType, setHttpReferrer, setKey, setSubscriptionKey, setUsingSSL, toJsonString, validateServiceStatepublic static Language execute(java.lang.String text) throws java.lang.Exception
text - The String to detect the language of.java.lang.Exception - on error.public static java.lang.String[] execute(java.lang.String[] texts)
throws java.lang.Exception
java.lang.Exception - on error.public static DetectResult retrieveResult(java.lang.String... texts) throws java.lang.Exception
java.lang.Exception