languagetool-org / languagetool

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

[en][es][fr] Ordinal numbers abbreviation problem detection #1449

Open edlongman opened 5 years ago

edlongman commented 5 years ago

Problem and example

It is common to write the ordinal numbers in abbreviated form:

E.g. Fourth -> 4th, One Hundredth -> 100th It could fix problems like I'd like to invite you to the 64rd annual conference of ....

However Language tool does not check to see if the correct suffix has been used.

Language variations

Here is a discussion of how some different languages go about writing ordinal numbers: http://www.typophile.com/node/42577

German is the simple cases of just a dot after the number. French is the next simplest. A Special case for 1st (1er/1re) then suffix of (3e)

Dutch puts an e after the number with special rules for up to 20 and for multiples of 10 (Needs clarification from a dutch expert)

The English suffix is determined by special rules under 20 and then the least significant number from 20 onwards {0,4,5,6,7,8,9}->th, 1->st, 2->nd, 3->rd

Spanish suffixes are case and gender specific making them much more complex (Again, needs an expert opinion)

TiagoSantos81 commented 5 years ago

Spanish suffixes are case and gender specific making them much more complex (Again, needs an expert opinion)

Spanish, Portuguese and Galician abbreviations are only gender inflected, and that only depends on context. Neologisms are forming, bringing the English standard to those languages, but they are still not standard, so, for now, from a grammar checker point of view, should be considered as common typos.

Check, for example: https://www.metro.pr/pr/blogs/2016/05/01/se-abrevia-1ero-o-1-o.html