hengfengli / Spelling-Correction

Some algorithms for Spelling Correction
MIT License
6 stars 1 forks source link

ArrayIndexOutOfBoundsException #2

Closed Xentinel2 closed 7 years ago

Xentinel2 commented 7 years ago

I have just one word in words.txt and I want to print the distance of the Editex method so I write in the console a word and then I got this.

error

hengfengli commented 7 years ago

I guess this is because it includes non-alpha characters, so that's why lettersInfo[char1-'a'] fails in Editex.isSameGroup() function. I just modified the code, please check it again.