Class LanguageDetectorConfig

  • public class LanguageDetectorConfig
    extends Object
    • Constructor Detail

      • LanguageDetectorConfig

        public LanguageDetectorConfig()
    • Method Detail

      • getMaxLength

        public int getMaxLength()
        Maximum length in codepoints of text to process.
      • setMaxLength

        public void setMaxLength​(int maxLength)
      • getChunkSize

        public int getChunkSize()
        Size in codepoints of chunk to process at each step for the probing detection.

        After processing a chunk of this size, the probing detection will compute probabilities and determine if there is enough confidence to stop.

      • setChunkSize

        public void setChunkSize​(int chunkSize)
      • getMinConsecImprovements

        public int getMinConsecImprovements()
        Minimum number of consecutive increased probabilities for the top language required in probing detection to stop early.

        If this value equals 0, probing detection will rely solely on getMinDiff()

        minimum consecutive improvements
      • setMinConsecImprovements

        public void setMinConsecImprovements​(int minConsecImprovements)
      • getMinDiff

        public double getMinDiff()
        Minimum difference in confidence between the top predicted language and the next most likely language.

        If this value equals 0, probing detection will rely solely on getMinConsecImprovements()

      • setMinDiff

        public void setMinDiff​(double minDiff)