Hi

I've added a rule in French grammar.xml to check for common mistakes in URLs
in this checkin:

https://github.com/languagetool-org/languagetool/commit/4bd2109242ad02f2d50e1f597580764a1dd45d97

Some examples of mistakes detected:

   http//www.google.com     (missing colon)
   http:/www.google.com     (there should be 2 slashes after protocole)
   mailto://john.doe.com    (no // in mailto: or news: protocoles)
   wwww.google.com          (there should probably be 3 w, not 4)
   https://ww.google.com   (there should probably be 3 w, not 2)

The rule could be re-used in other languages.
The rule does not use suggestions yet. I could not get <suggestion>
to work somehow with <regexp>. Maybe someone can help.
If you can think of other common mistakes in URL not yet detected,
let me also know.

Dominique

------------------------------------------------------------------------------
_______________________________________________
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel

Reply via email to