Pages: 1
Print
Author Topic: Spell Checker does not behave as expected for certain words  (Read 3541 times)
MrPaul
Member

Posts: 29


« on: June 05, 2014, 01:00:36 PM »

Hi,

We have discovered that certain words are getting picked up by the spell checker when they shouldn't be. For example, using the English Canadian (EN-CE) dictionary, the word "program" and "programs" gets picked up.

Quote
For example, he would not be able to investigate any surveillance program that he had helped develop or had approved.
However, there is a risk that lengthening the discretionary period between reviews for those serving shorter sentences may inadvertently remove incentives for offenders to participate in rehabilitation programs.

In addition, there are other issues using the French Canadian dictionary (FR-CF). Certain words containing quotes (but not all?!) get picked up.

Quote
J'ai aujourd'hui l'honneur d'accueillir des athlètes et des entraîneurs des équipes canadiennes qui ont participé aux Jeux olympiques et paralympiques d'hiver de 2014 à Sotchi.
Les anciens combattants peuvent compter sur le NPD, qui continuera à lutter pour qu'on leur procure, à eux et à leur famille, l'aide et le soutien dont ils ont besoin et qu'ils méritent.

Both examples above work well with the English (Canada) and French (Canada) dictionaries in Microsoft Word, for example.

I was able to reproduce this in XMAX v7 and Author v6 (I haven't tested Author v7 or any other version). I'd like to know if this is still a bug in the latest XMAX version(s) and whether or not there's a workaround.

Thanks for your time.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #1 on: June 05, 2014, 07:12:54 PM »

From what I can tell the files for EN-CE simply define these words as being misspelled (no entry for them). Most likely that is due to the fact that at the time they were created (sometime in the 1990s) someone chose to treat "programme" and "programmes" as Canadian and specifically treat "program" and "programs" as being American (only). The history on that would be long lost, nor would I have access to it, but it could be because Corel was based in Ottawa and (at least at the time this stuff was originally being created) Canadian gov't documents may have preferred the "me" spellings (many still do I believe). It might have just been more common then (I certainly remember being told to use the "me" spellings when I was in high school in the 1980s). I'd agree most people in Canada now use "program" so it might be nice if we updated this.

This would affect all versions of the software starting with version 3 (when we first incorporated this spell checking engine while we were still part of Corel around 2002) and it would affect all versions up to and including 9 as nobody has raised this issue until now.

The quickest solution for this particular issue would be to add these words to the user word list.
« Last Edit: June 05, 2014, 07:17:05 PM by Derek Read » Logged
MrPaul
Member

Posts: 29


« Reply #2 on: June 06, 2014, 06:52:27 AM »

Thanks for the response. It helps to know that this is due to that word not being in your dictionary and not some kind of other obscure bug. We will add it to the user defined list.
Any thoughts about the quote problem when using Canadian French? Not sure how to work around that one, since it doesn't pick up the entirety of the contraction, and only the first part...
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #3 on: June 06, 2014, 04:55:19 PM »

I don't have an answer for the French issues. I can log these as defects and if you have any more examples perhaps you could submit them via XMetaL Support so that they can be tracked properly.

The fact that we no longer actively make improvements to the spell checker dictionaries themselves (the Main Word List files) is one of the reasons we added support for Hunspell, as outlined here:
http://forums.xmetal.com/index.php/topic,3011

The Hunspell file format is openly documented and there are various tools available (not from us) that allow you to create them and modify them.

Perhaps that is an option for you.

That other post discusses its use in the context of XMetaL Author, but since it is Writing Tools that was updated to support those files it should be possible to use Hunspell files with newer versions of XMAX as well. One main issue however, is that though I can find France French files I can't seem to find any Canadian French files.
« Last Edit: June 06, 2014, 05:21:03 PM by Derek Read » Logged
MrPaul
Member

Posts: 29


« Reply #4 on: June 27, 2014, 12:04:42 PM »

Hi,

I'm trying to code around the french quote problem described in my first post. I managed to keep a safe list of prefixes that should be ignored, like "qu'", but I still need to check the 2nd part of the word to see if it's valid.

In our custom Spell Checker class, we set the range selection to the current word and call mXmax.Document.IsSpellingCorrect() to see if it's spelled correctly or not. When I manipulate this range selection to ignore the prefix from my safe list, IsSpellingCorrect() still picks up the 2nd part even though it's a valid word on its own. I have a feeling it's because it isn't surrounded by spaces, so it still thinks it's part of the prefix I'm trying to ignore.

I can't seem to find any documentation about how this works, and there were no results for IsSpellingCorrect in the documentation:
http://xmetal.com/webhelp/en/xmetaldeveloper/pg/7.0/pg.html

Ideally, I'd like to be able to check the spelling of a particular word; in my example above I'd like to call something like IsSpellingCorrect("on") and if it returns true, I continue on, otherwise I'd show the list of suggestions.

Is this possible?

Logged
Pages: 1
Print
Jump to: