Package fr.neatmonster.nocheatplus.checks.chat.analysis.engine.processors.FlatWords

Examples of fr.neatmonster.nocheatplus.checks.chat.analysis.engine.processors.FlatWords.FlatWordsSettings


 
  public LetterEngine(ConfigFile config){
    // Add word processors.
    // NOTE: These settings should be compared to the per player settings done in the EnginePlayerConfig constructor.
    if (config.getBoolean(ConfPaths.CHAT_TEXT_GL_WORDS_CHECK, false)){
      FlatWordsSettings settings = new FlatWordsSettings();
      settings.maxSize = 1000;
      settings.applyConfig(config, ConfPaths.CHAT_TEXT_GL_WORDS);
      processors.add(new FlatWords("glWords",settings));
    }
    if (config.getBoolean(ConfPaths.CHAT_TEXT_GL_PREFIXES_CHECK , false)){
      WordPrefixesSettings settings = new WordPrefixesSettings();
      settings.maxAdd = 2000;
      settings.applyConfig(config, ConfPaths.CHAT_TEXT_GL_PREFIXES);
      processors.add(new WordPrefixes("glPrefixes", settings));
    }
    if (config.getBoolean(ConfPaths.CHAT_TEXT_GL_SIMILARITY_CHECK , false)){
      SimilarWordsBKLSettings settings = new SimilarWordsBKLSettings();
      settings.maxSize = 1000;
      settings.applyConfig(config, ConfPaths.CHAT_TEXT_GL_SIMILARITY);
      processors.add(new SimilarWordsBKL("glSimilarity", settings));
    }
    // TODO: At least expiration duration configurable? (Entries expire after 10 minutes.)
    dataMap = new EnginePlayerDataMap(600000L, 100, 0.75f);
  }
View Full Code Here


 
  public EnginePlayerConfig(final ConfigFile config){
    // NOTE: These settings should be compared to the global settings done in the LetterEngine constructor.
    ppWordsCheck = config.getBoolean(ConfPaths.CHAT_TEXT_PP_WORDS_CHECK, false);
    if (ppWordsCheck){
      ppWordsSettings = new FlatWordsSettings();
      ppWordsSettings.maxSize = 150; // Adapt to smaller size.
      ppWordsSettings.applyConfig(config, ConfPaths.CHAT_TEXT_PP_WORDS);
    }
    else ppWordsSettings = null; // spare some memory.
    ppPrefixesCheck = config.getBoolean(ConfPaths.CHAT_TEXT_PP_PREFIXES_CHECK, false);
View Full Code Here

TOP

Related Classes of fr.neatmonster.nocheatplus.checks.chat.analysis.engine.processors.FlatWords.FlatWordsSettings

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.