A UK-English (enGB) dictionary has been added to misspelled. No more complaining about `colour` being flagged as misspelled for you folks across the pond.
A new version of Misspelled has been released that includes a Spanish (esES) dictionary, along with German and US English dictionaries. There is an options interface page where you can manually select what dictionary to load.
UTF8 O-my, o-my!
Support has been added throughout for UTF8 multi-byte encodings. From this point on It should be very easy now to add additional International dictionaries.
Maybe it isn't the best for in game use... I used print while I was developing the dictionary lookup and suggestion code offline. print() did the job in the Lua compiler & SciTE development env., and didn't fail when used in game.
As far as I can tell, screen space is the only limit on the # of items that'll fit in a drop down menu.
An idea to test: Increase the maximum suggestions that'll show; but only show suggestions with an edit distance <= 3, from the misspelled word.
I'll have to test it and see if this tends to push phonetic based suggestions off the list.
Here again is an area where HunSpell, for example, first calculates an ideal max edit distance per word, based on all kinds of contextual and statistical info.
As for the timer idea, I wasn't suggesting replacing the existing events that trigger spell-checking. Rather augment with an additional check after a period of no keyboard input. I personally just hit a period or space at the end of a word to trigger the spell-check.
First issue: The suggestions ranking algorithm could use some work on ranking suggestions for both short words, and words that are capitalized. Edit distance (# of inserts, deletes, or character changes needed to change the source into the dest) is used to rank suggestions. With short words, many suggestions come back with the same edit distance, 1. Returning the top 8, ranked by edit distance, means I could easily skip over the best suggestion. More advanced spell-checkers look at more than just the current word, to come up with better suggestions. The good news here, is our good old human brains can quickly correct 3 letter spelling mistakes, mostly without the need for suggestions. Simply flagging the typos gets the job done. Anyway... I'm sure there's something I can come up, to help improve the suggestions, without needlessly adding many more if statements.
Second issue: If the cursor is at the end of the line, I don't spell check the line, until I see a word terminator ([ .,!:"]). Most spellcheckers do something similar to save on needless checks as you type a word. "Feature not a Bug" :). So how could we improve on this. I've been thinking that maybe a timer could watch the time between typing characters. If it appears you've stopped typing, maybe two seconds, then trigger a spellcheck. Does this feel like a reasonable solution?
I just disabled the AddOn - this revision creates a frame with what appears to be a dropdown-selection button on it. The frame is located in the upper left-hand corner of the screen and cannot be moved. Clicking on the button simply highlights and un-highlights it.
Weird, I did see that happen once during my testing on an earlier versions. It's not currently happening on either of my test setups. Let me dig around and see what I can uncover.
Just released an update with support for a German dictionary. Keeping my fingers crossed it works. Anyone out there using the German client, that can give it a test?
In r18 I cut memory usage needed to store the dictionary in half. I was using a subtable to store two elements for every base word, the affix keys and phonetic code. Changing this to a "/" delimited string value helped, big time. Even though I'm now storing an extra "/" character for each baseWord, it still saved over 5mb.
Apparently there's quite a bit of overhead for using tables. Lesson learned.
r16 - http://www.wowace.com/projects/misspelled/files/30-r16/
Maximum suggestions increased to 10
Fixed an error where words in all CAPS, or words that contained numbers were sometimes throwing a Lua error.
Fixed the chat edit cursor position so it moves naturally as you perform edits in and around misspelled highlighted words. Wow this was a lot of work. Did you know you can crash Wow, with an invalid cursor position!
Fixed a problem where the spell checking routine was firing twice, if it found a misspelled word.
Ideally I would like to flag a word as the start of a sentence, to offer proper caplitization in the suggestions. Long term I'll see what I can come up with here.
Your idea could be a stepping stone... For all capitalized words, offer both proper-case and lowercase versions of the suggestions. I'm currently only offering the top 6 suggestions, so that might push some valid choices off the list, if I just offer two versions for each of the top 3. Maybe more than 6 suggestion choices are needed, humm... I'll whip up a test implementation today, and see how it feels.
Very nice AddOn. Might I suggest, though, that in the list of probable replacements you also include a variation which respects original case? For example, I tested the AddOn by starting a line with "Theis is a test." and only saw "this" as the correct replacement. I'd like to see both "this" and "This" - but only if my incorrect word is actually capitalized. That way, if I somehow accidentally capped it, I could still select "this" from the list.
0
Thanks
0
-Nate
0
http://www.wowace.com/addons/misspelled
-Nate
0
UTF8 O-my, o-my!
Support has been added throughout for UTF8 multi-byte encodings. From this point on It should be very easy now to add additional International dictionaries.
-Nate
0
0
An idea to test: Increase the maximum suggestions that'll show; but only show suggestions with an edit distance <= 3, from the misspelled word.
I'll have to test it and see if this tends to push phonetic based suggestions off the list.
Here again is an area where HunSpell, for example, first calculates an ideal max edit distance per word, based on all kinds of contextual and statistical info.
As for the timer idea, I wasn't suggesting replacing the existing events that trigger spell-checking. Rather augment with an additional check after a period of no keyboard input. I personally just hit a period or space at the end of a word to trigger the spell-check.
0
First issue: The suggestions ranking algorithm could use some work on ranking suggestions for both short words, and words that are capitalized. Edit distance (# of inserts, deletes, or character changes needed to change the source into the dest) is used to rank suggestions. With short words, many suggestions come back with the same edit distance, 1. Returning the top 8, ranked by edit distance, means I could easily skip over the best suggestion. More advanced spell-checkers look at more than just the current word, to come up with better suggestions. The good news here, is our good old human brains can quickly correct 3 letter spelling mistakes, mostly without the need for suggestions. Simply flagging the typos gets the job done. Anyway... I'm sure there's something I can come up, to help improve the suggestions, without needlessly adding many more if statements.
Second issue: If the cursor is at the end of the line, I don't spell check the line, until I see a word terminator ([ .,!:"]). Most spellcheckers do something similar to save on needless checks as you type a word. "Feature not a Bug" :). So how could we improve on this. I've been thinking that maybe a timer could watch the time between typing characters. If it appears you've stopped typing, maybe two seconds, then trigger a spellcheck. Does this feel like a reasonable solution?
-Nate
0
r23 has the fix.
-Nate
0
0
Thanks
0
0
http://www.wowace.com/projects/misspelled/files/38-r20
0
Apparently there's quite a bit of overhead for using tables. Lesson learned.
-Nate
0
Maximum suggestions increased to 10
Fixed an error where words in all CAPS, or words that contained numbers were sometimes throwing a Lua error.
Fixed the chat edit cursor position so it moves naturally as you perform edits in and around misspelled highlighted words. Wow this was a lot of work. Did you know you can crash Wow, with an invalid cursor position!
Fixed a problem where the spell checking routine was firing twice, if it found a misspelled word.
Please report any bugs you find.
Thanks
-Nate
0
Your idea could be a stepping stone... For all capitalized words, offer both proper-case and lowercase versions of the suggestions. I'm currently only offering the top 6 suggestions, so that might push some valid choices off the list, if I just offer two versions for each of the top 3. Maybe more than 6 suggestion choices are needed, humm... I'll whip up a test implementation today, and see how it feels.
Thanks