I’m trying to develop a small text editor with spelling, this is my course project. But knocks error " Exception in thread “main” java.lang.AbstractMethodError: org.languagetool.Language.getRelevantRules(Ljava/util/ResourceBundle;)Ljava/util/List;" tell me what I’m doing wrong.
Here are the program code:
class pom.xml
4.0.0
org.languagetool
language-all
3.5
class Main
import java.util.;
import org.languagetool.;
import org.languagetool.rules.;
import org.languagetool.tokenizers.;
import org.languagetool.language.*;
public class Main {
private final JLanguageTool langTool = new JLanguageTool(new Ukrainian());
private void check(String text) throws Exception {
List matches = langTool.check(text);
for (RuleMatch match : matches) {
System.out.println("Possible error: " +
match.getLine() + ", column " +
match.getColumn() + ": " + match.getMessage());
System.out.println("Suggestions: " + match.getSuggestedReplacements());
}
}
public static void main(String[] args) throws Exception {
System.out.println(“Running simple client program”);
new Main().check(“This this is a test sentence.”);
}
}indent preformatted text by 4 spaces> indent preformatted text by 4 spaces