
Spellex SDK for JavaTM - Technical Support
Problem: Spellex does not report certain words as misspelled, even when you know them to be misspelled. This happens when you call SpellingSession's check method.
Causes: This problem can be caused by various conditions:
- If the unreported words are capitalized, make sure the
IGNORE_CAPPED_WORD_OPT option is disabled. When this option
is enabled, the check method automatically skips over capitalized
words (e.g., America) without checking them, so they will
not be reported as misspellings. Similarly, if the words
are in all-caps (e.g., AMERICA), make sure IGNORE_ALL_CAPS_WORDS_OPT
is disabled, and if they contain mixed upper and lower case
(e.g., TallHouse) make sure IGNORE_MIXED_DIGITS_OPT is disabled.
(Alternatively, you can leave these options enabled, but
be aware that they may cause misspelled words to be missed.)
- Unless you are checking German or Finnish text using Spellex's
German or Finnish dictionary, make sure SPLIT_WORDS_OPT
is disabled. If this option is enabled, the check method
will consider a word valid if it consists of two or more
valid sub-words concatenated (e.g., winterhamster).
- Make sure you have main dictionary files in only one language
open. For example, don't open the American English and French
dictionaries at the same time in the same SpellingSession
object. If dictionaries for more than one language are open,
misspelled words in one language that happen to match words
in the other language will not be reported as misspellings.
- If only one misspelled word goes unreported, but most misspelled words are reported, the word may exist in an open dictionary. Try closing dictionaries one by one until the suspect word is reported to identify the dictionary containing the word.
Solution: The solution is to edit the String returned by the component's getText() method so it matches the component's internal representation of the text by replacing "\r\n" with "\n" (i.e., by deleting "\r"). The following Java code does this:
String text = theComponent.getText();
StringBuffer dst = new StringBuffer();
for (int i = 0; i < text.length(); ++i) {
if (text.charAt(i) == '\r' &&
i < text.length() - 1 && text.charAt(i + 1) == '\n') {
// Skip \r
++i;
}
dst.append(text.charAt(i));
}
text = dst.toString();


Home | Order Now | Products | Upgrades | Free Trial | Partners | About Spellex | Contact Us | Site Map | Privacy Policy
Spellex Corporation © 2008. All rights reserved












