Version 5 (modified by boyan, 15 years ago) (diff) |
---|
Analysis
Overview
Support for spell-checking needs to be added to Sophie. After this task is completed, spell-checking capabilities should be available. At the first revision of this task the expected end-user functionality is defined and research is performed to find an appropriate third-party library for spell-checking that will be integrated in Sophie. Preliminary design for integration should be available. At next revisions, actual implementation takes place.
Task requirements
- Perform a research to find an appropriate library for spell-checking. Spell check in Sophie will be implemented initially the following way:
- The Tools tab will contain a spell-check palette. It will contain the following elements:
- Spell-check button - will run a spell check on the text within the currently selected chain.
- Toggle underline button - will turn on/off underlining of misspelled words (they will be underlined with a dotted line as in Trac).
- Replace/Ignore buttons - will replace/ignore the currently selected misspelled word.
- A list of misspelled words - it will contain the currently found misspelled words.
- Clicking on a misspelled word will highlight it (select it) in the text (and go to the page it is on if necessary).
- A list of suggestions for correction - it will contain possible corrections for the selected misspelled word.
- Double-clicking on a suggestion will replace the misspelled word.
- When a word is replaced/ignored, the next misspelled word is selected.
- Initially up to two languages in a book should be selectable (that is, spell-check should be performed against two dictionaries).
- UI for language selection is not defined yet.
- NOTE: These requirements are subject to refinement in the next revision of the task. They are listed here to serve as general guidelines for the research.
- The Tools tab will contain a spell-check palette. It will contain the following elements:
- Describe the research findings in the Design section of this page. Include the following information about each library:
- Name and website;
- Licensing information
- Provided features (incl. supported languages or dictionary format);
- Ease of integration;
- In the Implementation section, suggest the library that is most appropriate for use in Sophie. Provide preliminary design of how to integrate it in Sophie. Required spell-check functionality can be redefined here based on the library chosen.
Task result
This wiki page (containing research findings and preliminary design for integration).
Implementation idea
Jazzy and Suggester are two possible candidates. Suggester provides search suggestions as well.
Related
How to demo
Show the research findings and how the library will be integrated.
Design
Here is a list of the libraries reviewed:
Jazzy
- Websites: http://jazzy.sourceforge.net/, http://sourceforge.net/projects/jazzy
- Licence and code: LGPL, open-source
- Features:
- Based on Aspell algorithms (actually was a port of Aspell initially).
- Dictionaries specified as wordlists (can easily generate them from Aspell dictionaries).
- Comes with an English dictionary only but can get any of about 90 Aspell dictionaries to work.
- Can be used on Strings or in a JTextComponent.
- Documentation:
- No online docs or support forums (except few threads with no answers on SourceFourge).
- Relatively good JavaDoc and in-code comments.
- Internal:
- Uses event-driven approach (each spelling error is an event containing the misspelled word and a list of suggestions; listeners can be attached to handle the error).
- Words are passed as a WordTokenizer object constructed from a String.
no documentation provides swing ui?
Suggester Spellcheck - http://www.softcorporation.com/products/spellcheck/, free
Can provide search suggestions (commercial) Fast, low-memory Written in Java 1.2 Better suggestions than jazzy documentation for advanced (commercial) version only seems easy to use supports 9 languages uses latex/tex indices single language at a time
JOrtho - open source Supports text in JTextPane only
drugi?
Implementation
Describe and link the implementation results here (from the wiki or the repository).
Testing
Place the testing results here.
Comments
Write comments for this or later revisions here.