Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

French contractions not always recognized #12

Closed
dbolton opened this issue May 3, 2011 · 4 comments
Closed

French contractions not always recognized #12

dbolton opened this issue May 3, 2011 · 4 comments

Comments

@dbolton
Copy link

dbolton commented May 3, 2011

var dictionary = new Typo("fr", affData, dicData);
var is_spelled_correctly = dictionary.check("j'espère") //should be true, but returns false
// (The word "j'espère" is a form of the verb "j'espèrer" as explained here: http://www.wordreference.com/fren/j%E2%80%99esp%C3%A8re )
var is_spelled_correctly = dictionary.check("C'est") //should be true, but returns false
// (The word "C'est" is a contraction meaning "It is", see http://www.wordreference.com/fren/c%27est )

I used the French dictionary and affix files installed by default with OpenOffice.org (en). You can obtain the files directly from: http://hg.services.openoffice.org/OOO330/file/b70298db35e1/dictionaries/fr_FR

The dictionary line reads: espérer/c2a+()
est/L'D'Q'

@cfinke
Copy link
Owner

cfinke commented May 3, 2011

For C'est, the only affix rules specified in the dictionary for the "est" root are for generating l'est, d'est, qu'est, quoiqu'est, puisqu'est, and lorsqu'est. C'est could be added by also specifying the c' rule, so that one is a bug in the dictionary.

For j'espère, it looks like the affix file specifies a kind of combination prefix+suffix rule that I'm not yet handling properly.

@cfinke
Copy link
Owner

cfinke commented May 3, 2011

As of commit e1ee921, words like j'espère are properly recognized, and several forms of espérer have been added as testcases.

@cfinke cfinke closed this as completed May 3, 2011
@dbolton
Copy link
Author

dbolton commented May 4, 2011

Wonderful.

It looks like what ever you did also fixed "C'est".

@cfinke
Copy link
Owner

cfinke commented May 4, 2011

Yeah, this fix did also cover c'est - it wasn't an omission like I thought, since I didn't fully understand continuation cases in the affix file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants