@@ -0,0 +1,1839 @@
+/* LanguageTool, a natural language style checker %0A * Copyright (C) 2021 Daniel Naber (http://www.danielnaber.de)%0A * %0A * This library is free software; you can redistribute it and/or%0A * modify it under the terms of the GNU Lesser General Public%0A * License as published by the Free Software Foundation; either%0A * version 2.1 of the License, or (at your option) any later version.%0A *%0A * This library is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU%0A * Lesser General Public License for more details.%0A *%0A * You should have received a copy of the GNU Lesser General Public%0A * License along with this library; if not, write to the Free Software%0A * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301%0A * USA%0A */%0Apackage org.languagetool.rules.en;%0A%0Aimport java.io.IOException;%0A%0Aimport org.languagetool.JLanguageTool;%0Aimport org.languagetool.rules.AbstractFindSuggestionsFilter;%0Aimport org.languagetool.rules.spelling.morfologik.MorfologikSpeller;%0Aimport org.languagetool.tagging.Tagger;%0Aimport org.languagetool.tagging.en.EnglishTagger;%0A%0Apublic class FindSuggestionsFilter extends AbstractFindSuggestionsFilter %7B%0A%0A  private static final String DICT_FILENAME = %22/en/english.dict%22;%0A  private static MorfologikSpeller speller;%0A  private static final EnglishTagger tagger = new EnglishTagger();%0A%0A  public FindSuggestionsFilter() throws IOException %7B%0A    // lazy init%0A    if (speller == null) %7B%0A      if (JLanguageTool.getDataBroker().resourceExists(DICT_FILENAME)) %7B%0A        speller = new MorfologikSpeller(DICT_FILENAME);%0A      %7D%0A    %7D%0A  %7D%0A%0A  @Override%0A  protected Tagger getTagger() %7B%0A    return tagger;%0A  %7D%0A%0A  @Override%0A  protected MorfologikSpeller getSpeller() %7B%0A    return speller;%0A  %7D%0A%0A%7D%0A

add FindSuggestionsFilter