0

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

badperson
  • 1,554
  • 3
  • 19
  • 41
  • I'm not entirely clear, from your sentence _"It also appears that some of the supposedly misspelled words are in the dictionary"_, do you mean that the words **are** in the dictionary file? As in, you've seen them there, and perhaps even copy-and-pasted them into your application to be certain there are no transcription errors? Or you just think they should be in the dictionary? – DaveyDaveDave Jan 11 '16 at 16:48
  • 1
    @DaveyDaveDave: I did some more testing, and some of the offending words are instances such as : graduates” Should have looked closer at the data I was working with before posting. – badperson Jan 11 '16 at 18:39

2 Answers2

1

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).

david
  • 997
  • 6
  • 15
0

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

graduates”

are tripping up the spell checker

badperson
  • 1,554
  • 3
  • 19
  • 41