class MorfologikRussianYOSpellerRule extends MorfologikSpellerRule {

  public static final String RULE_ID = "MORFOLOGIK_RULE_RU_RU_YO";

  private static final String RESOURCE_FILENAME = "/ru/hunspell/ru_RU_yo.dict";
  private static final Pattern RUSSIAN_LETTERS = Pattern.compile("[-а-яёо́а́е́у́и́ы́э́ю́я́о̀а̀ѐу̀ѝы̀э̀ю̀я̀ʼА-ЯЁ]*");
  private static final int DEFAULT_MIN_RU_VALUE = 0;

  private int conf_ru_Value = DEFAULT_MIN_RU_VALUE;
  
  private final static Set <String> lcDoNotSuggestWords = new HashSet <> (Arrays.asList(
    // words with 'NOSUGGEST' flag:
    "блоггер",
    "елка",
    "дрочим", "анальный", "орочем"      
 ));

  public MorfologikRussianYOSpellerRule(ResourceBundle messages, Language language, UserConfig userConfig, List<Language> altLanguages) throws IOException {
    super(messages, language, userConfig, altLanguages);
    setDefaultOff(); 
    addExamplePair(Example.wrong("Все счастливые семьи похожи друг на друга, <marker>каждя</marker> несчастливая семья несчастлива по-своему."),
                   Example.fixed("Все счастливые семьи похожи друг на друга, <marker>каждая</marker> несчастливая семья несчастлива по-своему."));

    if (userConfig != null) {
      int confValue = userConfig.getConfigValueByID(getId());
      if(confValue >= 0) {
        this.conf_ru_Value = confValue;
      }
    }
  }

  @Override
  public String getFileName() {
    return RESOURCE_FILENAME;
  }

  @Override
  public String getId() {
    return RULE_ID;
  }
  
  
 @Override
  protected List<SuggestedReplacement> filterNoSuggestWords(List<SuggestedReplacement> l) {
    return l.stream().filter(k -> !lcDoNotSuggestWords.contains(k.getReplacement().toLowerCase())).collect(Collectors.toList());
  }


  @Override
  protected boolean ignoreToken(AnalyzedTokenReadings[] tokens, int idx) throws IOException {<FILL_FUNCTION_BODY>}
 
  @Override
  public String getDescription() {
    return "Проверка орфографии. Только «Ё» (экспериментальное правило).";
  }
  
  @Override
  protected boolean isLatinScript() {
    return false;
  }
  
  @Override
  public int getDefaultValue() {
    return DEFAULT_MIN_RU_VALUE;
  }

  @Override
  public boolean hasConfigurableValue() {
    return true;
  }

  @Override
  public int getMinConfigurableValue() {
    return 0;
  }

  @Override
  public int getMaxConfigurableValue() {
    return 1;
  }
  
  @Override
  public String getConfigureText() {
    return  "Проверять слова на латинице, только термины (0/1)";
  }
  
}

    String word = tokens[idx].getToken();  
    // don't check words that don't have  letters
    if ((conf_ru_Value != 1) && !RUSSIAN_LETTERS.matcher(word).matches()) {
      return true;
    }
      
    List<String> words = new ArrayList<>();
    for (AnalyzedTokenReadings token : tokens) {
      words.add(token.getToken());
    }
    
    return ignoreWord(words, idx);
  
<methods>public void <init>(java.util.ResourceBundle, org.languagetool.Language) throws java.io.IOException,public void <init>(java.util.ResourceBundle, org.languagetool.Language, org.languagetool.UserConfig) throws java.io.IOException,public void <init>(java.util.ResourceBundle, org.languagetool.Language, org.languagetool.UserConfig, List<org.languagetool.Language>) throws java.io.IOException,public void <init>(java.util.ResourceBundle, org.languagetool.Language, org.languagetool.GlobalConfig, org.languagetool.UserConfig, List<org.languagetool.Language>, org.languagetool.languagemodel.LanguageModel, org.languagetool.Language) throws java.io.IOException,public java.lang.String getDescription() ,public abstract java.lang.String getFileName() ,public abstract java.lang.String getId() ,public List<java.lang.String> getSpellingSuggestions(java.lang.String) throws java.io.IOException,public boolean isMisspelled(java.lang.String) throws java.io.IOException,public org.languagetool.rules.RuleMatch[] match(org.languagetool.AnalyzedSentence) throws java.io.IOException,public void setIgnoreTaggedWords() ,public void setLocale(java.util.Locale) ,public java.util.regex.Pattern tokenizingPattern() <variables>static final int MAX_FREQUENCY_FOR_SPLITTING,private boolean checkCompound,private java.util.regex.Pattern compoundRegex,protected java.util.Locale conversionLocale,protected final non-sealed org.languagetool.GlobalConfig globalConfig,private boolean ignoreTaggedWords,private static final Logger logger,protected final non-sealed org.languagetool.Language motherTongue,private static final java.util.regex.Pattern pStartsWithNumbersBullets,private static final java.util.regex.Pattern pStartsWithNumbersBulletsExceptions,protected org.languagetool.rules.spelling.morfologik.MorfologikMultiSpeller speller1,protected org.languagetool.rules.spelling.morfologik.MorfologikMultiSpeller speller2,protected org.languagetool.rules.spelling.morfologik.MorfologikMultiSpeller speller3,private final non-sealed org.languagetool.UserConfig userConfig