Real-time Spell checking API's for use in applet.

D

Daniel Pitts

I'd like to emulate the Firefox/thunderbird real-time spell-checking
feature in a (signed) Java applet. Right now, the user is entering data
in a JTextArea, but I'm willing to replace that, as long as the
replacement has word-wrap.

If there are good libraries available that don't have UI integration,
that's fine too, I can probably handle that part myself. Grammar
suggestion is a nice-to-have. I only need, and will probably only ever
need English correction.

To be specific, The goal is to provide red-underlined text for
misspelled words, and allow easy correction from a pop up/context menu.
 
J

Jim Janney

Daniel Pitts said:
I'd like to emulate the Firefox/thunderbird real-time spell-checking
feature in a (signed) Java applet. Right now, the user is entering
data in a JTextArea, but I'm willing to replace that, as long as the
replacement has word-wrap.

If there are good libraries available that don't have UI integration,
that's fine too, I can probably handle that part myself. Grammar
suggestion is a nice-to-have. I only need, and will probably only
ever need English correction.

To be specific, The goal is to provide red-underlined text for
misspelled words, and allow easy correction from a pop up/context
menu.

This one does all of that.

http://www.wintertree-software.com/dev/ssce/javasdk.html
 
J

Joshua Cranmer

I'd like to emulate the Firefox/thunderbird real-time spell-checking
feature in a (signed) Java applet. Right now, the user is entering data
in a JTextArea, but I'm willing to replace that, as long as the
replacement has word-wrap.

If there are good libraries available that don't have UI integration,
that's fine too, I can probably handle that part myself. Grammar
suggestion is a nice-to-have. I only need, and will probably only ever
need English correction.

Hunspell is what Mozilla code is currently using, and Google suggests
that there exists Java bindings: <http://dren.dk/hunspell.html>. That
only gets whether or not a word is misspelled as well as suggestions for
the word.

The UI should be fairly simple. You can use the Highlighter class
(DefaultHighlighter is probably sufficient to use), as well as text
modification listener to figure out when words are being added, to tell
the text to only highlight a portion of the text. I'm not sure if
highlighters shift their ranges in response to text modification, though...
 
A

Arne Vajhøj

Hunspell is what Mozilla code is currently using, and Google suggests
that there exists Java bindings: <http://dren.dk/hunspell.html>. That
only gets whether or not a word is misspelled as well as suggestions for
the word.

The UI should be fairly simple. You can use the Highlighter class
(DefaultHighlighter is probably sufficient to use), as well as text
modification listener to figure out when words are being added, to tell
the text to only highlight a portion of the text. I'm not sure if
highlighters shift their ranges in response to text modification, though...

Native code could be a problem in a Java applet.

Arne
 
J

Joshua Cranmer

[ ... ]
Native code could be a problem in a Java applet.

I forgot to mention, the library includes Win x86, Linux x86/x86-64 and
Mac x86/x86-64/PPC. The only important missing environment is Win
x86-64; perhaps Linux ARM (i.e., mobile) may be useful. Hunspell should
build on most major platforms, so it's more a question of gaining access
to such a build environment.
 
A

Arne Vajhøj

[ ... ]
Native code could be a problem in a Java applet.

I forgot to mention, the library includes Win x86, Linux x86/x86-64 and
Mac x86/x86-64/PPC. The only important missing environment is Win
x86-64; perhaps Linux ARM (i.e., mobile) may be useful. Hunspell should
build on most major platforms, so it's more a question of gaining access
to such a build environment.

But what about the deployment.

JNI used to be a big no no in applets.

Better with Java Web Start ?

Arne
 
J

Jeff Higgins

Thanks.
I did forget to mention that free is very important, and open-source is
a big nice-to-have.

I'm guessing that you're asking for recommendations from users of Java
spell-check libraries rather than references to the same.

I don't have recommendations, but a web search reveals a seeming
abundance of FOS Java spell-check libraries. One that caught my eye, in
fact the first hit for java+spell+check was Jazzy.

Are there some FOS Java spell-check libraries that you are certain you
will not use?
 
D

Daniel Pitts

I'm guessing that you're asking for recommendations from users of Java
spell-check libraries rather than references to the same.
Correct. GIMF. I found a few references, but I have never utilized such
a library, so I'm not sure which features might be useful or which APIs
are mature.
I don't have recommendations, but a web search reveals a seeming
abundance of FOS Java spell-check libraries. One that caught my eye, in
fact the first hit for java+spell+check was Jazzy.

Are there some FOS Java spell-check libraries that you are certain you
will not use?
Any one that is broken beyond my ability to repair it ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top