JOrtho - a Java spell-checking library
JOrtho (Java Orthography) is a Open Source spell-checker entirely written in Java. Its
dictionaries are based on the free
Wiktionary project and
can therefore be updated for virtually any language. The library
works with any JTextComponent from the Swing framework. This
includes JTextPane, JEditorPane and JTextArea.
Table of Contents
What does the library do when it is bound to a JTextComponent?
- highlight the potentially wrongly spelled word
- offer a context menu with suggestions for a correct form
of the word
- context menu with options to change the checking language
- dialog (when pressing F7 key) to continuously spell check
the text
- user-defined dictionary for words that are not in the
global one (this is an option that appears inside the
continuous checking dialog)
- translated spell checker GUI so users will see buttons
and labels in the language of the current locale
- standalone
API, no server is required but applets are possible,
see the sample.
- detects capitalization errors
- enable or disable each feature separately
JOrtho has the following requirements to run smoothly:
- Java 5 or higher
- 2 - 5 MB free memory in the JavaVM (depending on the
dictionary)
There is a small live sample applet of
JOrtho where you can test the spelling of a text. You can
freely modify this text to get an impression of JOrtho in
action.
The free tool and the dictionaries can be downloaded at
.
The API is available
here. You may also
view a live sample.
JOrtho is published under the
GNU General Public License (GPL) for inclusion in programs published under a compatible open-source license.
If you want to use JOrtho in a commercial product then you can order it in our shop.
If you have further questions on licensing, please contact:
Sales@inetsoftware.de
Which languages are supported by JOrtho?
Please have look at the download area at
SourceForge.
JOrtho does not support my language. How can I add
a language?
- Have a look at the
Wiktionary project for
your language. There should be at minimum 50.000 entries.
- Translate the resource file of JOrtho into your
language and send
it to us.
- Help us on parsing the Wiktionary for your language.
We will have some questions to the language dependent
format of the flexion (i.e. the various grammatical
forms of words).
Where can I get support for this tool?
- For the GPL license, support is available on
.
- For the commercial license, support is available via
e-mail.
- For any other questions, please
contact us.
Some important words are missing in the dictionary. How can I add
them?
Look in the
Wiktionary
for your
language. If the word is missing, then add it. If the word
exists, then look at how recent the entry was added/created. We will
be creating new dictionaries
periodically. It could also be that JOrtho is incorrectly
parsing the entry. In this case, please let us know.
Who is responsible for JOrtho?
JOrtho is an Open Source project of
i-net software
File Format
The dictionaries files are a list of words. Every word is saved in a separate line. The word list is saved in UTF8 encoding. The resulting file is compressed with gzip.
Generate dictionaries from Wiktionary
The dictionaries are based on the Wiktionary dictionaries. This is a step by step description how you can generate a new dictionary version.
- Download the data from Wiktionary. The file for the English language is http://download.wikimedia.org/enwiktionary/latest/enwiktionary-latest-pages-articles.xml.bz2
Replace the red part with your language. Some languages also require the data of the English Wiktionary (currently Polish and Arabic)
- Extract the XML file from the archive
- Download or check out the sources of JOrtho and compile it.
- Execute the command
java -Xmx256M com.inet.jorthodictionaries.BookGenerator
en
<wiktionary folder>
Replace the red part with your language.
Changes in Version 0.1 (2007-12-13)
- This was the initial public version.
Changes in Version 0.2 (2008-01-02)
- Threading problems fixed.
- Single characters are ignored.
- The extension for the dictionaries can be set now. This
fixes a problem with unknown extensions and IIS.
- Added support for a configuration file.
- Added support for formatted text.
- Improved suggestion list.
- Added a reference implementation for
UserDictionaryProvider.
- Added an editor for the user dictionary.
Changes in Version 0.3 (2008-03-11)
- Use mouse position and not cursor position in text for
suggestions.
- Added support for Escape key.
- Added alphabetical sort order in the user dictionary editor.
- Added support for setting an application name.
- Added some improvements to the user dictionary editor.
- Application sample added.
- The method SpellChecker.showSpellCheckerDialog(
JTextComponent ) was added.
- Italian, Spanish, French and Russian translation added.
- Dictionaries for Italian, Spanish and French added.
- Support of capitalization improved.
- The class SpellCheckerOption added and add as optional
parameter to many methods.
- A JPopupMenu with suggestion was added.
Changes in Version 0.4 (2008-12-05)
- Added an Icon for the dialogs. This only works with Java 6.
- Add the polish translation.
- The pressing of the ENTER key in text and creating a new
paragraph has not handle correctly the highlight. The effect
can be doubled underling.
- Email addresses and web addresses will be ignored.
- Added the options IgnoreCapitalization, IgnoreAllCapsWords and IgnoreWordsWithNumbers.
- Translations for Czech und Slovak are added.
- A memory leak in SpellChecker.createLanguagesMenu() was fixed.
- The spell checker dialog position is set relative to the
visible rectangle and not the bounds rectangle.
- A possible IllegalArgumentException which could occur with the context
menu if the mouse pointer was not on a valid position was
fixed.
Changes in Version 0.5 (2010-06-10)
- Add the Croatian translation.
- Add the interface CustomDictionaryProvider.
- Translation for Dutch added.
- After a change in the spell checker dialog the search has continue from the wrong position if it was not the first sentence in the current paragraph.
Changes in Version 1.0 (2013-03-11)
- The method SpellChecker.isDictionaryLoaded() was added.
- The dictionary is now reloaded after deleting a word from the custom dictionary.
- Reduced the temporary memory usage on loading a dictionary. For example for the current English dictionary memory usage reduced from 47 MB to 30 MB.
- Fix a bug in the suggestion list where there are shorter words that start with the same characters.
- Translation for Danish added.
- Words ending with a period such as "etc." are checked now.
- Handle a colon like a period: the next word can start in upper case.
- Add a tool for converting a plain txt file with words to a dictionary.
- Dictionaries are searched in the classpath if there is no base URL.
- Translations for Portuguese added.
- Handle words with curly apostrophe (’) for the French wiktionary.
- Added an "about" dialog.
- Improved the parser for the Spanish dictionary.