Class BaseCachedTranslate

    • Constructor Detail

      • BaseCachedTranslate

        public BaseCachedTranslate()
    • Method Detail

      • getTranslation

        public final java.lang.String getTranslation​(Language sLang,
                                                     Language tLang,
                                                     java.lang.String text)
                                              throws java.lang.Exception
        Translate.
        Specified by:
        getTranslation in interface IMachineTranslation
        Overrides:
        getTranslation in class BaseTranslate
        Parameters:
        sLang - source language
        tLang - target language
        text - text for translation
        Returns:
        translated text, or null if translation impossible
        Throws:
        java.lang.Exception
      • getCachedTranslation

        public final java.lang.String getCachedTranslation​(Language sLang,
                                                           Language tLang,
                                                           java.lang.String text)
        Get cached translation. Returns null if translation not present.
        Specified by:
        getCachedTranslation in interface IMachineTranslation
        Overrides:
        getCachedTranslation in class BaseTranslate
        Parameters:
        sLang - source language
        tLang - target language
        text - text for translation
        Returns:
        translated text, or null if translation impossible