Package opennlp.tools.langdetect
Class LanguageDetectorConfig
java.lang.Object
opennlp.tools.langdetect.LanguageDetectorConfig
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final LanguageDetectorConfigstatic final intstatic final intstatic final double
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintAfter processing a chunk of this size, the probing detection will compute probabilities and determine if there is enough confidence to stop.intintIf this value equals0, probing detection will rely solely ongetMinDiff()doubleIf this value equals0, probing detection will rely solely ongetMinConsecImprovements()voidsetChunkSize(int chunkSize) voidsetMaxLength(int maxLength) voidsetMinConsecImprovements(int minConsecImprovements) voidsetMinDiff(double minDiff) 
- 
Field Details- 
DEFAULT_MAX_LENGTHpublic static final int DEFAULT_MAX_LENGTH- See Also:
 
- 
DEFAULT_CHUNK_SIZEpublic static final int DEFAULT_CHUNK_SIZE- See Also:
 
- 
DEFAULT_MIN_CONSEC_IMPROVEMENTSpublic static final int DEFAULT_MIN_CONSEC_IMPROVEMENTS- See Also:
 
- 
DEFAULT_MIN_DIFFpublic static final double DEFAULT_MIN_DIFF- See Also:
 
- 
DEFAULT_LANGUAGE_DETECTOR_CONFIG
 
- 
- 
Constructor Details- 
LanguageDetectorConfigpublic LanguageDetectorConfig()
 
- 
- 
Method Details- 
getMaxLengthpublic int getMaxLength()- Returns:
- The maximum length in codepoints of text to process.
 
- 
setMaxLengthpublic void setMaxLength(int maxLength) 
- 
getChunkSizepublic int getChunkSize()After processing a chunk of this size, the probing detection will compute probabilities and determine if there is enough confidence to stop.- Returns:
- The size in codepoints of chunk to process at each step for the probing detection.
 
- 
setChunkSizepublic void setChunkSize(int chunkSize) 
- 
getMinConsecImprovementspublic int getMinConsecImprovements()If this value equals0, probing detection will rely solely ongetMinDiff()- Returns:
- The minimum number of consecutive increased probabilities for the top language required in probing detection to stop early.
 
- 
setMinConsecImprovementspublic void setMinConsecImprovements(int minConsecImprovements) 
- 
getMinDiffpublic double getMinDiff()If this value equals0, probing detection will rely solely ongetMinConsecImprovements()- Returns:
- The minimum difference in confidence between the top predicted language and the next most likely language.
 
- 
setMinDiffpublic void setMinDiff(double minDiff) 
 
-