Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Spellchecker Issues
oBFusCATed:
--- Quote from: stahta01 on August 06, 2015, 10:53:00 pm ---Maybe the wrong single quote is used?
--- End quote ---
Re-read White-Tiger's post. He seems to have found the reason.
White-Tiger:
--- Quote from: oBFusCATed on August 06, 2015, 08:56:05 pm ---Hm, I've wondered why "doesn't" is detected as misspelled.
Can you post a patch with your second suggestion?
--- End quote ---
Which second suggestion exactly?
If you're talking about the wxIspunct and unification as mentioned, I've came to the conclusion that wxIspunct should be ok here. It got introduced in r10014 (spellchecker: replace hardcoded character set with unicode compatible calls, improves checking accuracy in utf8 comments) by alpha0010.
"wxIspunct" seems to handle everything that isn't a word character.. this includes ' and other characters that might be "part" of a word in some languages. So just filter those few characters out and it'll be fine
HunspellInterface.cpp:130 might be a bit troublesome to make use of wxIspunct... as it requires to rewrite the code so that we manually loop over the string and search/parse words..
I've also took a peek at Firefox's spell checker and it's also using ispunct, but the apostrophe is a special case... it is a punct if set alone or not between 2 "words",
that is " Windows' " is seen as " Windows " as there's no letter after the apostrophe. (and thus is successfully checked for spelling. "Windows'" is not part of the dictionary because it's not required if those rules are to be followed.
So something like "IsWhiteSpace()" returning 0 for non-space / word characters, 1 for space and 2 for "special". When it returns "2" we'll check if another !IsWhiteSpace follows which means it isn't a space. Otherwise it was.
Though Firefox uses ispunct() together with IsConditionalPunctuation() which returns true for ', 0x2019 /*RIGHT SINGLE QUOTATION MARK*/ and 0x00B7 /*MIDDLE DOT*/
MortenMacFly:
--- Quote from: White-Tiger on August 10, 2015, 01:44:13 pm ---...
--- End quote ---
Well I am a bit lost now. Could you please state shortly once again what changes will fix the original bug reported? Maybe you can even provide a patch? Its easy to do: Checkout from SVN, make the changes in the working copy, run this command at the root of you working copy:
svn diff > diff.patch
(...assuming you have the SVN executable in the path.)
MortenMacFly:
--- Quote from: Khram on January 29, 2016, 01:35:43 am ---The new version 16.01 spell checker also confuses words, threatening the collapse of the whole program, of course.
--- End quote ---
Well I figured out meanwhile that this is not a C::B but a hunspell issue (that's the lib we use for spellchecking). I told the Hunspell maintainers but 'I got nothing in return so far...
White-Tiger:
why do you think it's a hunspell issue?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version