Class LanguageHelper


  • public class LanguageHelper
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.apache.tika.language.detect.LanguageDetector detector  
      protected java.lang.String[] langFields  
      protected int maxTextLength  
      protected java.lang.String[] supportedLanguages  
    • Constructor Summary

      Constructors 
      Constructor Description
      LanguageHelper()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String detectLanguage​(java.lang.String text)  
      protected java.lang.String getDetectText​(java.lang.String text)  
      protected java.lang.String getSupportedLanguage​(java.lang.String lang)  
      void init()  
      void setDetector​(org.apache.tika.language.detect.LanguageDetector detector)  
      void updateDocument​(java.util.Map<java.lang.String,​java.lang.Object> doc)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • langFields

        protected java.lang.String[] langFields
      • supportedLanguages

        protected java.lang.String[] supportedLanguages
      • detector

        protected org.apache.tika.language.detect.LanguageDetector detector
      • maxTextLength

        protected int maxTextLength
    • Constructor Detail

      • LanguageHelper

        public LanguageHelper()
    • Method Detail

      • init

        @PostConstruct
        public void init()
      • updateDocument

        public void updateDocument​(java.util.Map<java.lang.String,​java.lang.Object> doc)
      • detectLanguage

        protected java.lang.String detectLanguage​(java.lang.String text)
      • getDetectText

        protected java.lang.String getDetectText​(java.lang.String text)
      • getSupportedLanguage

        protected java.lang.String getSupportedLanguage​(java.lang.String lang)
      • setDetector

        public void setDetector​(org.apache.tika.language.detect.LanguageDetector detector)