Re: Rule to check common mistakes in URL

2015-10-24 Thread Dominique Pellé
Purodha Blissenbach  wrote:

> Hi,
>
>>http:/www.google.com (there should be 2 slashes after
>> protocole)
>
> This is valid, at least protocolwise. I refers to a directory
> /www.google.com on the current server. Good warning, of course, if there
> is at least a dot in there.
>
> Purodha


I don't think that 1 slash only after http: is correct.
Or do you have a link which explains what you say?

For documents on local hosts, you need to write something
like http://localhost/foo.html or http://127.0.0.1/foo.html

For file: protocol, it localhost can be omitted so
you can have 3 slashes as in file:///foo.txt

Regards
Dominique

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


Re: Rule to check common mistakes in URL

2015-10-24 Thread Purodha Blissenbach
On 24.10.2015 11:29, Dominique Pellé wrote:
> Purodha Blissenbach  wrote:
>
>> Hi,
>>
>>>http:/www.google.com (there should be 2 slashes after
>>> protocole)
>>
>> This is valid, at least protocolwise. I refers to a directory
>> /www.google.com on the current server. Good warning, of course, if 
>> there
>> is at least a dot in there.
>>
>> Purodha
>
>
> I don't think that 1 slash only after http: is correct.
> Or do you have a link which explains what you say?
>
> For documents on local hosts, you need to write something
> like http://localhost/foo.html or http://127.0.0.1/foo.html
>
> For file: protocol, it localhost can be omitted so
> you can have 3 slashes as in file:///foo.txt

It is unusual in texts, of course, but specifying the scheme (e.g. 
http) and omitting the host name asks the already known host via a 
(possibly different) scheme for the path, which then begins after the 
colon. One slash instructs the server to look for the path beginning 
from its document root. If there is no slash after the colon, the 
current directory is used. As said: this is all pretty unusual in normal 
text.

Purodha


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


SV: Rule to check common mistakes in URL

2015-10-24 Thread Esben Aaberg
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)
  .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 
to work somehow with . 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


Rule to check common mistakes in URL

2015-10-23 Thread Dominique Pellé
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)
   .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 
to work somehow with . 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


Re: Rule to check common mistakes in URL

2015-10-23 Thread Purodha Blissenbach
Hi,

>http:/www.google.com (there should be 2 slashes after 
> protocole)

This is valid, at least protocolwise. I refers to a directory 
/www.google.com on the current server. Good warning, of course, if there 
is at least a dot in there.

Purodha


On 24.10.2015 05:31, Dominique Pellé wrote:
> 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)
>.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 
> to work somehow with . 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


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