Looking for Java spell checker library [closed]
Asked Answered
W

8

55

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?

Whenever answered 18/2, 2009 at 1:34 Comment(1)
If a local dictionary is not required a cloud endpoint that works is Sapling: (sapling.ai/docs/api/spellcheck). Additionally, French, German, and Spanish support grammar checking.Scission
H
24

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.

Heartbreak answered 18/2, 2009 at 1:38 Comment(4)
@Heartbreak Jazzy looks like the best candidate. For dictionaries, the OpenOffice project has a number of them (wiki.services.openoffice.org/wiki/Dictionaries) and they can be converted to the Jazzy word list format with JazzyDicts (sourceforge.net/projects/jazzydicts).Whenever
You can also download a longer English dictionary list of words for Aspell using this nice script: app.aspell.net/create to use it in Jazzy.Sovran
There are also the WinEdt dictionaries here: winedt.org/DictSovran
Good tutorial on how to use Jazzy: moderntone.blogspot.com/2013/02/…Electroacoustics
M
38

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.

Monied answered 3/7, 2012 at 1:4 Comment(2)
This library's Java API direct link: wiki.languagetool.org/java-apiRooster
This has a ton of dependencies and is powered by hunspell, which is mentioned in another answer.Choric
H
24

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.

Heartbreak answered 18/2, 2009 at 1:38 Comment(4)
@Heartbreak Jazzy looks like the best candidate. For dictionaries, the OpenOffice project has a number of them (wiki.services.openoffice.org/wiki/Dictionaries) and they can be converted to the Jazzy word list format with JazzyDicts (sourceforge.net/projects/jazzydicts).Whenever
You can also download a longer English dictionary list of words for Aspell using this nice script: app.aspell.net/create to use it in Jazzy.Sovran
There are also the WinEdt dictionaries here: winedt.org/DictSovran
Good tutorial on how to use Jazzy: moderntone.blogspot.com/2013/02/…Electroacoustics
D
4

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

Deutschland answered 9/5, 2010 at 15:27 Comment(0)
A
4

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.

Anthropo answered 8/2, 2011 at 0:40 Comment(0)
O
3

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.

Otes answered 18/2, 2009 at 3:29 Comment(1)
Good suggestion. Using a C++ library from Java will just add too much complexity for me, as I'd need to compile it for a number of different platform. But that definitely looks like a well-rounded library.Whenever
M
2

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.

Matchmaker answered 13/12, 2009 at 20:42 Comment(0)
O
2

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.

Oud answered 23/9, 2011 at 7:52 Comment(4)
This service is not working any more. Seems like Google shut it down.Yogini
I am voting down since this service doesn't work anymoreIncorporeal
-1 because not working anymoreVizard
It looks, Google spell checker doesn't work anymore. When you open the link, It is written on web page that "This project will soon be migrated to Github" - not sure when.Coursing
C
1

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

Cumbrance answered 4/12, 2012 at 21:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.