public class IBMWatsonTranslate extends BaseTranslate
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
PROPERTY_LOGIN |
protected static java.lang.String |
PROPERTY_MODEL |
protected static java.lang.String |
PROPERTY_PASSWORD |
protected static java.lang.String |
PROPERTY_URL |
protected static java.util.regex.Pattern |
RE_HTML |
protected static java.lang.String |
WATSON_URL |
protected static java.lang.String |
WATSON_VERSION |
enabled, glossarySupplier
Constructor and Description |
---|
IBMWatsonTranslate() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getJsonResults(java.lang.String json) |
java.lang.String |
getName()
Get machine translation engine name.
|
protected java.lang.String |
getPreferenceName() |
boolean |
isConfigurable()
Indicates that the MT provider has options that can be configured.
|
void |
showConfigurationUI(java.awt.Window parent)
Invoke the configuration UI of this MT provider.
|
protected java.lang.String |
translate(Language sLang,
Language tLang,
java.lang.String text) |
cleanSpacesAroundTags, clearCache, getCachedTranslation, getCredential, getFromCache, getTranslation, isCredentialStoredTemporarily, isEnabled, putToCache, setCredential, setEnabled, setGlossarySupplier
protected static final java.lang.String PROPERTY_LOGIN
protected static final java.lang.String PROPERTY_PASSWORD
protected static final java.lang.String PROPERTY_MODEL
protected static final java.lang.String PROPERTY_URL
protected static final java.lang.String WATSON_URL
protected static final java.lang.String WATSON_VERSION
protected static final java.util.regex.Pattern RE_HTML
protected java.lang.String getPreferenceName()
getPreferenceName
in class BaseTranslate
public java.lang.String getName()
IMachineTranslation
protected java.lang.String translate(Language sLang, Language tLang, java.lang.String text) throws java.lang.Exception
translate
in class BaseTranslate
java.lang.Exception
protected java.lang.String getJsonResults(java.lang.String json)
public boolean isConfigurable()
IMachineTranslation
true
, and implement their configuration UI by overriding
IMachineTranslation.showConfigurationUI(Window)
.public void showConfigurationUI(java.awt.Window parent)
IMachineTranslation