java.lang.Object
org.teamapps.application.server.system.machinetranslation.MachineTranslation
All Implemented Interfaces:
TranslationService

public class MachineTranslation
extends java.lang.Object
implements TranslationService
  • Constructor Summary

    Constructors
    Constructor Description
    MachineTranslation()  
  • Method Summary

    Modifier and Type Method Description
    boolean canTranslate​(java.lang.String sourceLanguage, java.lang.String targetLanguage)  
    java.util.Set<java.lang.String> getSupportedLanguages()  
    long getTranslatedCharacters()  
    void setDeepLKey​(java.lang.String deepLKey, boolean freeApi)  
    void setGoogleTranslationKey​(java.lang.String googleKey)  
    java.lang.String translate​(java.lang.String text, java.lang.String sourceLanguage, java.lang.String targetLanguage)  
    boolean translationServiceAvailable()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MachineTranslation

      public MachineTranslation()
  • Method Details

    • setGoogleTranslationKey

      public void setGoogleTranslationKey​(java.lang.String googleKey)
    • setDeepLKey

      public void setDeepLKey​(java.lang.String deepLKey, boolean freeApi)
    • translationServiceAvailable

      public boolean translationServiceAvailable()
    • getSupportedLanguages

      public java.util.Set<java.lang.String> getSupportedLanguages()
      Specified by:
      getSupportedLanguages in interface TranslationService
    • translate

      public java.lang.String translate​(java.lang.String text, java.lang.String sourceLanguage, java.lang.String targetLanguage)
      Specified by:
      translate in interface TranslationService
    • getTranslatedCharacters

      public long getTranslatedCharacters()
      Specified by:
      getTranslatedCharacters in interface TranslationService
    • canTranslate

      public boolean canTranslate​(java.lang.String sourceLanguage, java.lang.String targetLanguage)
      Specified by:
      canTranslate in interface TranslationService