public interface IMachineTranslation
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCachedTranslation(Language sLang,
Language tLang,
java.lang.String text)
Get cached translation.
|
java.lang.String |
getName()
Get machine translation engine name.
|
java.lang.String |
getTranslation(Language sLang,
Language tLang,
java.lang.String text)
Translate.
|
default boolean |
isConfigurable()
Indicates that the MT provider has options that can be configured.
|
boolean |
isEnabled()
Determine whether or not the MT provider has been enabled by the user.
|
default void |
setEnabled(boolean enabled)
Turn the MT provider on or off
|
default void |
setGlossarySupplier(IMTGlossarySupplier glossarySupplier)
Set a glossary supplier to provide relevant glossary terms if desired.
|
default void |
showConfigurationUI(java.awt.Window parent)
Invoke the configuration UI of this MT provider.
|
java.lang.String getName()
boolean isEnabled()
default void setEnabled(boolean enabled)
default void setGlossarySupplier(IMTGlossarySupplier glossarySupplier)
glossarySupplier
- java.lang.String getTranslation(Language sLang, Language tLang, java.lang.String text) throws java.lang.Exception
sLang
- source languagetLang
- target languagetext
- text for translationjava.lang.Exception
java.lang.String getCachedTranslation(Language sLang, Language tLang, java.lang.String text)
sLang
- source languagetLang
- target languagetext
- text for translationdefault boolean isConfigurable()
true
, and implement their configuration UI by overriding
showConfigurationUI(Window)
.default void showConfigurationUI(java.awt.Window parent)