Hi Keith,

Keith Stribley wrote:

> I'm in the process of testing a spellchecker for Burmese. One of the 
> issues I've come across is that multidigit numbers like ၁၂ (12) show up 
> with a red underline underneath.
> 
> I've looked at the spellchecking code and it seems that spelling errors 
> are discarded if BOOL HasDigits( const String &rText ) in 
> linguistic/source/misc.cxx returns true. However, HasDigits only checks 
> for the digits 0-9 and not digits in other scripts. Would it not be 
> better to make this method return true for all characters with the 
> Unicode property Nd?
> 
> When the method is used in spellchecking it is in the context:
> (!rHelper.IsSpellWithDigits() && HasDigits( rWord ))
> (see lingucomponent/source/spellcheck/spell/sspellimp.cxx for example)
> so I assume that rHelper.IsSpellWithDigits() will correctly return true 
> for any dictionary that wants to check words with digits.
> 
> I've tried a patch that should fix this generically and tested it for 
> Burmese. Should I submit this as an issue or is there a reason that 
> HasDigits doesn't check for digits in other scripts?

A patch would always be fine.
Keep in mind thoguh that the HasDigits wil be used by spell checkers of
all languages and nothing must go wrong there.

Also you should consider the following:
The HasDigits function is used in the context of the option 'spell words
with numbers'. That is it's main purpose is to decide if words like W3C,
L10N, I18N, ...

If your concern is only about real numbers (without any alphabetic
character) then a better choice might be to tweak the spell checker so
it can recognize them.
For Example from my point of view it would be better if an English spell
checker would always take care of numbers like:
  14537 or 12.265,70
(there might be a problem with the ',' though ...) since in that case
the option 'spell words with numbers' can be set to 'on' without marking
all numbers as incorrect.


As for a patch in linguistic or lingucomponent: the 'component' field of
the issue with the patch should be set to 'word-processor' and the
'issue type' to 'PATCH'.


Regards,
Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to