Dominique Pellé <dominique.pe...@gmail.com> wrote:

> Hi
>
> I've just added new checks when running "ant check".  It now
> reports the following new errors in Russian, Chinese and Spanish
> grammar rules:

I've just improved the sanity check in "ant test" further.  It now finds
problems in grammar rules of Polish, Catalan, Dutch, Russian,
Asturian, Chinese, Slovenian, Spanish, Danish.

Example of new error found:

The Dutch rule: nr623:1 has exception regexp
[Kerstmis|Kerstman|Pinksteren] which contains disjunction part
[Pinksteren] which seems useless since it does not match the regexp of
token word [2] 
[^(Oudejaar|Oudjaar|Nieuwjaar|Allerzielen|Dierendag|Prinsjesdag|Vaderdag|Moederdag|Aswoensdag|Carnaval|Valentijns|Driekoningen|Kinderboekenweek|Boekenweek|Allerheiligen|Pinkster|Kerst|Hemelvaarts).*...].
Did you forget skip="..." or scope="previous"?


Explanation: The Dutch grammar rule nr623 contains:

<token 
regexp="yes">^(Oudejaar|Oudjaar|Nieuwjaar|Allerzielen|Dierendag|Prinsjesdag|Vaderdag|Moederdag|Aswoensdag|Carnaval|Valentijns|Driekoningen|Kinderboekenweek|Boekenweek|Allerheiligen|Pinkster|Kerst|Hemelvaarts).*...<exception
regexp="yes">Kerstmis|Kerstman|Pinksteren</exception></token>

What the error says is that the portion "Pinksteren" is useless
in the exception because it can't possibly match the regexp
of the token anyway. The regexp of the token  contains "Pinkster" which
must be followed by 3 characters "...". Since exception "Pinksteren"
has only 2 char after "Pinkster", it will never match the regexp of
the token indeed, so either that part of the exception is useless, or
something is wrong in the regexp of the token.

Have a look at other errors in the languages that you maintain.
All the error reported looks legitimate.  I don't see any false positive
but let me know if you think there are false positive.

Regards
Dominique

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel

Reply via email to