languagetool-org / languagetool

Style and Grammar Checker for 25+ Languages
https://languagetool.org
GNU Lesser General Public License v2.1
12.43k stars 1.4k forks source link

Create a Java rule to check for incorrect dates #116

Closed dpelle closed 10 years ago

dpelle commented 10 years ago

LanguageTool could have a Java rule to check for dates and report an error when the day of the week is inconsistent with the date.

For example, the following dates are all incorrect since the day (Tuesday) is inconsistent with the date (Apr 21st, 2014 is a Monday!)

We could also check for other incorrect dates such as:

The rule could obviously be adapted to other languages.

danielnaber commented 10 years ago

I like this idea a lot. How could it be done? I see two approaches:

Are there other approaches?

dpelle commented 10 years ago

Just seing that Grammalecte-0.4.1 French grammar checker used the idea of date checking, and implemented it. See discussion in French: http://www.dicollecte.org/thread.php?prj=fr&t=404

The discussion there says that apparently the French grammar checker Antidote also already does date checking, but MS-Word does not (I have neither of them).

danielnaber commented 10 years ago

This has now been implemented for German, see https://github.com/languagetool-org/languagetool/blob/master/languagetool-standalone/CHANGES.txt#L89. I'll try to add it for English, too.

danielnaber commented 10 years ago

Added for several other languages now, too.