The Licensing scheme has been changed in order to prevent
license key issues. Examples included with Spellex Java
Spelling Engine SDK can now be run from the command line
without using the license key ("-k" switch).
The LicenseKey.setKey function no longer has to be called
to initalize the speller.
A new example, BackgroundDemo, demonstrates how the Spellex
engine can be used to check spelling in JTextComponents
in the background (a.k.a. "as-you-type," "on-the-fly,"
or passive spell-checking). This is a feature your users
will really appreciate, since it is used in virtually
all major word processors. Misspelled words are highlighted
by underlining with a red zigzag line (the line color
is customizable, as is the method of highlighting). Highlighting
is removed from misspelled words as soon as they are corrected,
giving the user immediate feedback when a word changes
from misspelled to correct. A popup menu can be displayed
over a misspelled word. The popup menu contains suggested
replacements for the misspelled word, plus optionally
Ignore All and Add items. Selecting a suggestion in the
popup menu replaces the misspelled word with the suggestion.
Background checking is implemented by the BackgroundChecker
class. BackgroundChecker works with any component derived
from JTextComponent, including JTextField, JTextArea,
A new example, JTextPaneInteractiveDemo, demonstrates
use of the Spellex engine with JTextPane components. Text
in JTextPanes may be formatted (different font faces,
size, attributes); the demo preserves formatting when
misspelled words are corrected. The new example uses JTextComponentWordParser,
which replaces JTextAreaWordParser, and is usable with
any class derived from JTextComponent, including JTextField,
JTextArea, and JTextPane. JTextComponentWordParser is
also used in JTextAreaInteractiveDemo, a replacement for
A set of six servlet examples is now included with Spellex
Java Spelling Engine SDK. The servlet examples demonstrate
various typical ways a spelling checker can be employed
on the server side of a web-based application. See the
Spellex programmer's guide for more information on the
The SpellingSession, PropSpellingSession, Lexicon, WordComparator,
and WordParser classes and interfaces (and any classes
which extend or implement them) now implement the java.io.Serializable
Improvements in the handling of misspelled words with
doubled letters or single letters that should be doubled
have been made in TypographicalComparator.
Examples included with Spellex Java Spelling Engine
SDK that can be run from a command line now accept the
license key on the command line. The license key is specified
following the "-k" switch, and should be entered
as a hexadecimal constant (e.g., 0x1234ABCD).
TextAreaWordParser and JTextComponentWordParser (formerly
known as JTextAreaWordParser) now strip '\r' characters
from text obtained from text components. Some text components
on some platforms represent newlines internally as a single
character ('\n') but externally (in the value returned
by getText()) as "\r\n". This throws off position
calculations, making highlighting of misspelled words
inaccurate. By stripping the '\r' character, the positions
calculated by the WordParser derivatives remain synchronized
with the contents of the text component.
LexCompressor now sorts word list files before compression,
meaning it is no longer necessary to sort them externally.
This also applies to the SqLex program.
When IGNORE_DOMAIN_NAMES_OPT is enabled, underscores
and hyphens are now included wherever alphanumerics can
be included, in accordance with the syntax rules for domain
The Spellex Java Spelling Engine SDK programmer's guide
is now included in PDF format for easier printing and
searching. JavaDoc documentation for the classes in the
Spellex class library is still included.
JavaDoc documentation for generally useful example classes,
such as JTextComponentWordParser and BackgroundChecker,
is now included.
The Spellex programmer's guide now contains information
on the examples included with Spellex Java Spelling Engine
SDK to better demonstrate how those examples provide typical
solutions for spell-checking requirements in applications.
The spelling dialog boxes included in the examples now
disable the "Ignore All" button when problems
other than misspelled words are encountered. This prevents
confusion when, for example, a word would be reported
as containing mixed case, and clicking the "Ignore
All" button would not prevent it from being reported
as having mixed case again.
A lexicon of technical and Internet-related terms such
as "blog" and "spammer" is now included
The Validate program now accepts the name of an existing
lexicon file on its command line following the "-t"
switch. When "-t filename" is specified,
Validate performs some additional tests to ensure the
existing lexicon file can be read.
PropSpellingSession and SpellingSession now implement
the Clonable interface, which facilitates creating a private
clone from a template object.
PropSpellingSession now includes new methods (getTempLexicon
and setTempLexicon) which permit the temporary lexicon
used by PropSpellingSession to be changed at run-time.
This makes it easier to create a shared, read-only PropSpellingSession
template object and create clones of it as needed, each
with private temporary lexicons.
New get/set property access methods for tempLexicon,
comparator, userLexicons, and minSuggestDepth have been
defined in PropSpellingSession. The tempLexicon, comparator,
userLexicons, and minSuggestDepth field members of PropSpellingSession
have been documented as deprecated and will likely be
changed from "public" to "protected"
in a future version.
The PropSpellingSession constructor now includes mainLexPath
and userLexPath parameters. If the file name specified
in MainLexiconN entries in the Properties collection
contains no path, PropSpellingSession will now prefix
the file name with the value of the mainLexPath parameter
(similarly for UserLexiconN and userLexPath). This
is helpful in situations where the full path to the directory
containing the lexicons is not known until run-time. If
the file name specified in the Properties collection includes
a path, then that path is used. If the mainLexPath parameter
is set to an empty string, the lexicons will be opened
in the current directory.
The PropSpellingSession constructor now includes a prefix
parameter. The prefix is prepended to property names accessed
in the Properties collection. This allows, for example,
spelling-related properties to be stored with general
application properties (prefixed with "Spelling."),
or properties for a number of users to be stored in a
the same properties collection (prefixed with the user's
name). For example, if the prefix is "Spelling.",
PropSpellingSession will search for properties name "Spelling.MainLexicon1"
PropSpellingSession now supports a new access method,
"stream". The "stream" access method
can be used to open lexicons as files via FileInputStream.
Lexicons opened as streams may be safely shared among
threads (provided the lexicon is not modified at run-time).
The "stream" access method is therefore useful
in multi-threaded applications such as servlets.
Examples included with Spellex Java Spelling Engine
SDK are now better organized by purpose, and some existing
examples have been renamed for clarity. Examples are now
included under directories applet (demonstrating use of
the spelling engine in an applet), background (demonstrating
background, as-you-type, or on-the-fly spell-checking),
interactive (demonstrating spelling checks where the user
interacts with a dialog box to dispose of spelling errors),
and servlet (demonstrating use of the spelling engine
The toString() member in SuggestionSet now returns a
simple comma-separated list of words.
The language id specified in the build file entered
on the SqLex command line can now be specified in either
decimal or hexadecimal (previously it was always hexadecimal).
If it is specified in hexadecimal, it must be preceded
by "0x", as in "0xa1b2".
AWTDemoApplet did not call LicenseKey.setKey when the
"Check Spelling (TextArea)" menu item was selected.
This problem has been corrected.
When the "Check Spelling (String)" menu items
were selected in various examples, hyphenated terms were
incorrectly reported as misspelled, even if they were
contained in a dictionary. This problem has been corrected.
HTMLStringWordParser no longer treats an ampersand (&)
appearing in a markup (<...>) as a character entity.
For example, if the URL in the "HREF" part of
an <A> tag contained an ampersand, HTMLStringWordParser
would treat it like a character entity, and ignore all
text until a semicolon (;) was encountered. HTMLStringWordParser
now ignores ampersands contained within markups.
A problem where HTMLStringWordParser would incorrectly
report words as doubled has been corrected.
HTMLStringWordParser now stops ignoring text in a character
entity when whitespace is encountered. If the text being
checked incorrectly contains an ampersand that does not
mark the beginning of an HTML character entity, HTMLStringWordParser
will no longer skip over vast amounts of text until the
next semicolon is encountered.
StreamTextLexicon and FileTextLexicon will no longer
words to be added with actions other than IGNORE_ACTION
if the lexicon is in "external" format (i.e.,
a format other than the one used by the Spellex engine).
Also, these classes validate words added to ensure they
do not contain characters that could corrupt the lexicon
A problem where the "s" in a possessive initialism
such as "D.A.'s" would be incorrectly reported
as a misspelled word has been corrected.
A problem where unusual suggestions for capitalized
words would be offered when IGNORE_MIXED_CASE_WORD_OPT
was enabled (e.g., POtimization would be suggested for
Optimization) has been corrected.
WordCatcher, ContainsWordCatcher, and SuggestWordCatcher,
which were used only by CompressedLexicon, have now been
made sub-classes of that class rather than separate classes.
For lexicons specified using the "file" access
method, PropSpellingSession will now use the lexicon format
specifier if one is provided (even if the one provided
is incorrect), and will attempt to determine the format
of the lexicon from its contents only if a format specifier
is not provided.
Documentation for the example dialog boxes used in AWTDemo
and SwingDemo has been added to the readme.html file in
each example's directory.
A getLanguage method has been added to the CompressedLexicon
URLs and e-mail addresses are now ignored when the IGNORE_DOMAIN_NAMES_OPT
option is enabled.
Performance of the check method has been improved when
the SPLIT_WORDS_OPT option is enabled.
A "Frequently Asked Questions" section has
been added to the programmer's guide.
The HTMLStringWordParser class now considers HTML character
entity references for alphabetic characters (e.g., å)to
be part of a word. In addition, HTMLStringWordParser now
includes convenience methods which convert Strings containing
character entity references to text, and vice versa.
A new example which measures the performance of the
Spellex engine in words checked per minute is now included
The PropSpellingSession class now writes an error message
to System.err when a lexicon cannot be opened. The error
message should aid in diagnosing run-time configuration
Examples demonstrating techniques outlined in the Spellex
programmer's guide are now included in a separate directory.
Each example is compilable and runnable.
A problem where the suggestion set produced by the suggest
method would sometimes contain duplicate words has been
A problem where EOFException was raised in SqLex when
compressing a small word list has been corrected.
A problem where ArrayIndexOutOfBounds was raised in
SwingDemo has been corrected.
A problem where a word beginning with an apostrophe
was incorrectly reported as a doubled word has been corrected.
A new class, HTMLStringWordParser, has been added to
the Spellex class library. This class works like StringWordParser,
but will ignore any HTML markups (such as <FONT> and ©) contained within the string.
A new example has been added showing how to use the
Spellex engine in a Java servlet.
Problems with suggestions for words with plural possessives
(e.g., workers') were corrected.
The example programs will now replace words marked as
"Change All" with consistent case. Previously,
if the replacement word contained mixed case (such as foobar replaced with Foo Bar), the case
pattern of the first replacement would be different than
that of the subsequent replacements.
A StringIndexOutOfBounds exception raised when the REPORT_UNCAPPED_OPT
option was set has been corrected.
StringWordParser will no longer accept a trailing period
in a word terminated by a single quote (unless the word
is an initialism).
StringWordParser will no longer accept a trailing period
in a word containing embedded periods and three or more
consecutive alpha-numeric characters. For example, StringWordParser
will include the trailing periods in "U.S.A."
and "Ph.D." but not in "spellex.com."
The mechanism used to handle misspelled sub-words in
compound words (e.g., hyphenated terms) has been improved.
The SpellingSession class now includes two new methods:
getMisspelledWord and getMisspelledWordOffset. If the
SPLIT_HYPHENATED_WORDS_OPT or SPLIT_CONTRACTED_WORDS_OPT
options are true, and part of a hyphenated or contracted
term is misspelled, these new methods can be used to access
the misspelled parts. For example, if the compound word bright-bluex was checked, the check method would
return MISSPELLED_WORD_RSLT, getMisspelledWord would return bluex, and getMisspelledWordOffset would return
The TextAreaWordParser and JTextAreaWordParser classes
in AWTDemo and SwingDemo now extend from class StringWordParser.
This means that changes and improvements made to StringWordParser
will automatically be reflected in the example programs,
and that the example programs can easily be modified to
use classes which extend StringWordParser, such as the
new HTMLStringWordParser class.
The save method in StreamTextLexicon is now declared
public rather than protected.
References to the Swing package in SwingDemo have been
changed from the old "com.sun.java.swing" to
the more current "javax.swing".
Problems with compilation of the Spellex source code
resulting from a conflict with com.wintertree.util.Comparable
and java.lang.Comparable in JDK 2 have been corrected.
A problem where an exception would sometimes be raised
when AWTDemoApplet was run under Internet Explorer has
A problem were words were incorrectly reported as misspelled
when ALLOW_ACCENTED_CAPS_OPT was false has been corrected.
StringWordParser will no longer throw StringIndexOutOfBounds
exception when it encounters a word ending in a hyphen.
When IGNORE_NON_ALPHA_WORDS_OPT is true, the same string
of digits appearing twice in a row will no longer be reported
as a doubled word.