Looking for Java spell checker library

JavaNlpSpell CheckingLanguagetool

Java Problem Overview


I am looking for an open source Java spell checking library which has dictionaries for at least the following languages: French, German, Spanish, and Czech. Any suggestion?

Java Solutions


Solution 1 - Java

Another good library is JLanguageTool http://www.languagetool.org/usage/ It has a pretty simple api and does both spelling and grammar checking/suggestions.

JLanguageTool langTool = new JLanguageTool(Language.AMERICAN_ENGLISH);
langTool.activateDefaultPatternRules();

List<RuleMatch> matches = langTool.check("Hitchhiker's Guide tot he Galaxy");
for (RuleMatch match : matches) {
    System.out.println("Potential error at line " +
        match.getEndLine() + ", column " +
        match.getColumn() + ": " + match.getMessage());
    System.out.println("Suggested correction: " +
        match.getSuggestedReplacements());
}

You can also use it to host your own spelling and grammar web service.

Solution 2 - Java

You should check out Jazzy its used in some high profile Java applications. Two problems with it:

  1. It has not been updated since 2005.
  2. There is only English dictionary on their SourceForge page.

There are some third party dictionaries floating around. I had one for French, last time I used jazzy.

Solution 3 - Java

Check out JSpell by Page Scholar, http://www.jspell.com.

Solution 4 - Java

Another possible alternative is JOrtho http://jortho.sourceforge.net

I haven't used it yet, but I'm evaluating the current Java Open Source spellcheckers to figure out which one to use.

Solution 5 - Java

Hunspell looks like it could be of use. It is written in C++ but a java interface according to the home page. Tri-licensed under GPL, LGPL and MPL so you shouldn't have a problem with it.

Solution 6 - Java

Have a look at JaSpell. It comes with an internal spell checking engine or you can use aspell. Since the source is available, you can also attach aspell-like engines easily (like Hunspell).

It comes with filters for TeX and XML and it has support for suggestion engines like keyboard distance, common misspellings (where you can define words and their replacements for common typos), Levenshtein distance, and phonetic distance.

Solution 7 - Java

Look at this: http://code.google.com/p/google-api-spelling-java/

This is a simple Java API that makes it very easy to call Google's spell checker service from Java applications.

I tried it and it works very well.

Solution 8 - Java

You can try Suggester. It is open source, free, and supports all of the above listed languages.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionavernetView Question on Stackoverflow
Solution 1 - JavapfranzaView Answer on Stackoverflow
Solution 2 - JavaInfamyView Answer on Stackoverflow
Solution 3 - JavaBig Red DogView Answer on Stackoverflow
Solution 4 - JavaMikeView Answer on Stackoverflow
Solution 5 - JavaEvanView Answer on Stackoverflow
Solution 6 - JavaAaron DigullaView Answer on Stackoverflow
Solution 7 - Javaxdevel2000View Answer on Stackoverflow
Solution 8 - JavaVadimView Answer on Stackoverflow