Back to LanguageTool Homepage - Privacy - Imprint

Any typing errors, I can not understand what


(Вадим Грищенко) #1

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
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
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


(Daniel Naber) #2

Please use the </> button to properly format your code so we can read it easier.


(Вадим Грищенко) #3

So, you can help me?