Hi Dominique
A common mistake, I often see, is that dot is replaced by 
comma.http://www.google,com
/Esben Aaberg

     Fra: Dominique Pellé <dominique.pe...@gmail.com>
 Til: languagetool-devel <languagetool-devel@lists.sourceforge.net> 
 Sendt: 5:31 lørdag den 24. oktober 2015
 Emne: Rule to check common mistakes in URL
   
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