badperson
badperson

Reputation: 1614

jazzy spell check showing correctly spelled words as misspelled

I have implemented the jazzy spell checker in my project, and it's working but I am getting way to many false negatives; words that are spelled correctly showing as misspelled.

I build my dictionary object as follows:

public SpellDictionaryHashMap getTempDictMap(){
        //String sDictionaryPath =     "C:/jason/code/libraries/jazzy/dictionary/eng_com.dic";
        String sDictionaryPath =     "C:/jason/code/libraries/jazzy/dictionary/English (USA).dic";
        String sPhoneticPath = "C:/jason/code/libraries/jazzy/dictionary/phonet.en";

    SpellDictionaryHashMap dictionary = null;
    try {
        dictionary = new SpellDictionaryHashMap(new File(sDictionaryPath), new File(sPhoneticPath));
    } catch (FileNotFoundException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

    return dictionary;
}

I have hunted around for different dictionaries, I gather jazzy likes the one word per line format. I have tried eng_com.dic that came with the jazzy download, and hunted around for some others.

It also appears that some of the supposedly misspelled words are in the dictionary...Not sure what the issue is.

Some examples of words that should not be listed as misspelled are:

INFO  SpellCheckProcess - word : determination
INFO  SpellCheckProcess - word : graduate
INFO  SpellCheckProcess - word : based
INFO  SpellCheckProcess - word : completed

Is it simply a matter of finding a good dictionary? Or getting several and then adding the words after initially creating the object?

I also have a bunch of dictionaries where the words run-in together. I think those are the aspell dictionaries? (downloaded this stuff awhile ago) And those will not work with jazzy?

anyone run across this issue before and have a good way to deal with it?

thanks, bp

Upvotes: 0

Views: 984

Answers (2)

badperson
badperson

Reputation: 1614

was not an issue with the spell checker. As per comments above, chars in words such as:

graduates”

are tripping up the spell checker

Upvotes: 0

david
david

Reputation: 1016

From the article http://coldfusion.sys-con.com/node/42120 ,

A dictionary file is a one word per line, case-sensitive alphabetical listing of correctly spelled words that you want the spell checker to validate against. In case-sensitive alphabetical order, all words beginning with a capital letter come before those beginning with a lowercase (Zimbabwe would come before aardvark).

Looking at the eng_com.dic file, it's not in order... it's sorted first in increasing order by length of word. Also note that, per the file english.txt, you need to combine several files to get a complete dictionary (although the words you list are all in eng_com.dic).

Upvotes: 1

Related Questions