Daniel Naber <daniel.na...@languagetool.org> wrote:

On 2014-08-29 21:50, Dominique Pellé wrote:
>
> > Message: The date 31 September 2014 is not a Monday, but a Wednesday.
> > Monday, 31 September 2014
>
> I've now made date parsing more strict, but the rule won't complain
> about these dates and just ignore them. So to catch them, you need other
> rules. See for example the rulegroup with id 'UNGUELTIGES_DATUM' in
> de/grammar.xml.
>


Thanks.  That's a rule that can be useful in most languages.
I've just added it for French. I improved it to detect incorrect
dates such as "29 février 2014" (=29 February 2014)
since 2014 is not a leap year, so it has only 28 days.
See French rule "DATE". I had fun detecting leap years
using regexp :-)

By the way, it would be good to list somewhere those XML
grammar rules that can be useful in all or most languages.

Those French rules could be reused in most languages
with some localization:

NOM_MAL_EPELE  (Linux Torvalds -> Linus Torvalds, and many more)
UBUNTU  (Ubuntu-12.4 -> Ubuntu-12.04, etc.)
SQLITE   (SQLlite -> SQLite, etc.)
WINDOWS  (Window Vista -> Windows Vista, etc.)
X_WINDOW  (X Windows -> X Window)
NOEUDS_PAR_HEURE
HZ_PAR_SECONDE
kWh  (kW/h -> kWh)
KELVIN  (°K -> K, etc.)
DATE_JOUR
DATE

Regards
Dominique
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel

Reply via email to