Narrow down search of Lilypond documentation to English

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Narrow down search of Lilypond documentation to English

Colin Tennyson
For Lilypond the reference documentation is the one in english. Besides that translated versions of the documenation are available (in various states of completeness).

The Lilypond website uses a naming system:
Example:
English version:
http://lilypond.org/doc/v2.18/Documentation/notation/lilypond-command-index.html
German version:
http://lilypond.org/doc/v2.18/Documentation/notation/lilypond-command-index.de.html
Italian version:
http://lilypond.org/doc/v2.18/Documentation/notation/lilypond-command-index.it.html


As we know, this has huge consequences for the searchability of the site:
To search the Lilypond 2.18 documentation for entries with the string "barnumbercheck" I enter in the Google search field:

barnumbercheck site:/lilypond.org/doc/v2.18/Documentation

Google then gives me search results from ALL the languages. For example, for "barnumbercheck" the second search result is in Japanese.


Feature request:
Restructure the Lilypond documentation in such a way that it becomes possible for Google to narrow down searches to a single language, in my case english.


Out of sheer curiosity: how did it come about that the language versions of the documenation are distinguished only by adding at the very end of the URL the two-letter land code?

My best guess is that for many years a policy was in place to keep everyting Lilypond in english only. After all, the Lilypond source code is in english, so anyone who wants to create Lilypond files has to master english anyway. Subsequent guess: at some point that policy was reverted, but by then it was too late to accomodate different language versions in the Lilypond website directory structure.
I'm eager to learn whether my guesses are correct.

Colin Tennyson

Reply | Threaded
Open this post in threaded view
|

Re: Narrow down search of Lilypond documentation to English

Federico Bruni
2015-03-21 15:38 GMT+01:00 Colin Tennyson <[hidden email]>:
As we know, this has huge consequences for the searchability of the site:
To search the Lilypond 2.18 documentation for entries with the string
"barnumbercheck" I enter in the Google search field:

barnumbercheck site:/lilypond.org/doc/v2.18/Documentation

Google then gives me search results from ALL the languages. For example, for
"barnumbercheck" the second search result is in Japanese.


If you click on "Search tools", just below the search bar of google, a dropdown menu appears where you can choose to display only pages in your language.
Is this what you need?
 

Feature request:
Restructure the Lilypond documentation in such a way that it becomes
possible for Google to narrow down searches to a single language, in my case
english.


Out of sheer curiosity: how did it come about that the language versions of
the documenation are distinguished only by adding at the very end of the URL
the two-letter land code?


It's because of the automatic language selection.
An URL without extension will serve a different page depending on the language settings of the user browser: name.it.html if italian, name.html if english and so on.
 
My best guess is that for many years a policy was in place to keep everyting
Lilypond in english only. After all, the Lilypond source code is in english,
so anyone who wants to create Lilypond files has to master english anyway.
Subsequent guess: at some point that policy was reverted, but by then it was
too late to accomodate different language versions in the Lilypond website
directory structure.
I'm eager to learn whether my guesses are correct.

I don't think they are :-)


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Narrow down search of Lilypond documentation to English

Colin Tennyson
> If you click on "Search tools", just below the search bar of google, a
> dropdown menu appears where you can choose to display only pages in your
> language.

Here's an odd thing: it seems that Google displays differently to different users.
In my case Google offers me three (drop down menu) Search Tools:
- Anytime (the dropdown offers choices of time frame)
- All results (the dropdown menu offers: 'all results',  'reading level', 'verbatim')
- Location (the city I live in)

So in my case , visiting Google using Firefox, the search tools do not offer language selection.
But I understand from you that you *do* get a language selection option.

(Of course, there are also the Google preferences, where you can set things like 'Safe search filters' and 'results per page' and so on. I those preferences there is a language selection option and  I have set Google to serve me pages in english only. (Now, as far as I know Google doesn't enforce that preference rigidly. If I type in a non-english word I also get search results in the language that that word is from. My impression is that the Google engineers choose to cast a wide net.))



> It's because of the automatic language selection.
> An URL without extension will serve a different page depending on the
> language settings of the user browser: name.it.html if italian, name.html
> if english and so on.

That is new to me. I consider myself to be a heavy internet browsing user, a heavy Google user; I have not come across this before.
Can you possibly direct me to more information about this?

Colin Tennyson


Reply | Threaded
Open this post in threaded view
|

Re: Narrow down search of Lilypond documentation to English

Phil Holmes
----- Original Message -----
From: "Colin Tennyson" <[hidden email]>
To: <[hidden email]>
Sent: Saturday, March 21, 2015 3:39 PM
Subject: Re: Narrow down search of Lilypond documentation to English

> That is new to me. I consider myself to be a heavy internet browsing user,
> a
> heavy Google user; I have not come across this before.
> Can you possibly direct me to more information about this?

At the bottom of _all_ the LilyPond manual pages, there's a link explaining
automatic language selection.

--
Phil Holmes


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Narrow down search of Lilypond documentation to English

Federico Bruni
In reply to this post by Colin Tennyson
Il giorno sab 21 mar 2015 alle 16:39, Colin Tennyson
<[hidden email]> ha scritto:

>>  If you click on "Search tools", just below the search bar of
>> google, a
>>  dropdown menu appears where you can choose to display only pages in
>> your
>>  language.
>
> Here's an odd thing: it seems that Google displays differently to
> different
> users.
> In my case Google offers me three (drop down menu) Search Tools:
> - Anytime (the dropdown offers choices of time frame)
> - All results (the dropdown menu offers: 'all results',  'reading
> level',
> 'verbatim')
> - Location (the city I live in)
>
> So in my case , visiting Google using Firefox, the search tools do
> not offer
> language selection.
> But I understand from you that you *do* get a language selection
> option.
>
> (Of course, there are also the Google preferences, where you can set
> things
> like 'Safe search filters' and 'results per page' and so on. I those
> preferences there is a language selection option and  I have set
> Google to
> serve me pages in english only. (Now, as far as I know Google doesn't
> enforce that preference rigidly. If I type in a non-english word I
> also get
> search results in the language that that word is from. My impression
> is that
> the Google engineers choose to cast a wide net.))
>

You should be able to set the language here:
http://www.google.com/advanced_search

Unfortunately, there's no language: operator to use directly in the
main search.


>
>
>>  It's because of the automatic language selection.
>>  An URL without extension will serve a different page depending on
>> the
>>  language settings of the user browser: name.it.html if italian,
>> name.html
>>  if english and so on.
>
> That is new to me. I consider myself to be a heavy internet browsing
> user, a
> heavy Google user; I have not come across this before.
> Can you possibly direct me to more information about this?
>

I don't know the details of how it works.
I think that you should google "language negotiation apache" :-)




_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Narrow down search of Lilypond documentation to English

Colin Tennyson
> You should be able to set the language here:
> http://www.google.com/advanced_search

> Unfortunately, there's no language: operator to use directly in the
> main search.

Indeed there isn't.


But here's the rub:
http://googlewebmastercentral.blogspot.nl/2010/03/working-with-multilingual-websites.html
from the above page:
[quote]
"Keep in mind that Google ignores all code-level language information, from “lang” attributes to Document Type Definitions (DTD). Some web editing programs create these attributes automatically, and therefore they aren’t very reliable when trying to determine the language of a webpage."
[end quote]

So, Google tries to infer the language of a page from its *content*. Google looks exclusively at the content. They encountered wrong declarations inserted by WYSIWYG editors so often that now all such directions are ignored.


Hence my feature request:
Make it so that the user *can* narrow down the search to the pages of a particular language repository.

I suggest that the directories are restuctured so that the URLs read as follows:

German version:
http://lilypond.org/doc/v2.18/de/Documentation/notation/lilypond-command-index.html
Italian version:
http://lilypond.org/doc/v2.18/it/Documentation/notation/lilypond-command-index.html

That way if someone wants to search the German language repository:

barnumbercheck  site:lilypond.org/doc/v2.18/de/Documentation



Colin Tennyson



 

Reply | Threaded
Open this post in threaded view
|

Re: Narrow down search of Lilypond documentation to English

Colin Tennyson
In reply to this post by Phil Holmes
Subject: Re: Narrow down search of Lilypond documentation to English

Phil Holmes wrote:
> At the bottom of _all_ the LilyPond manual pages, there's a link explaining
> automatic language selection.


err.. Phil,

I think you have overlooked something essential: the subject of this thread.

This page:
http://www.lilypond.org/website/misc/browser-language
is about *browser* language selection.
(Which in my case is of course set to english (enlish(en-US) and english in descending order))

But that is not the subject of this thread.
My question is: when I search the Lilypond documentation with Google, how can I narrow down the search results to pages in english?


I think it would be very worthwhile to make it so that users can in fact narrow down the search to pages from a particular language repository
Reply | Threaded
Open this post in threaded view
|

Re: Narrow down search of Lilypond documentation to English

Phil Holmes
----- Original Message -----
From: "Colin Tennyson" <[hidden email]>
To: <[hidden email]>
Sent: Saturday, March 21, 2015 5:38 PM
Subject: Re: Narrow down search of Lilypond documentation to English


> Subject: Re: Narrow down search of Lilypond documentation to English
>
> Phil Holmes wrote:
>> At the bottom of _all_ the LilyPond manual pages, there's a link
>> explaining
>> automatic language selection.
>
>
> err.. Phil,
>
> I think you have overlooked something essential: the subject of this
> thread.

Well - no I didn't.  You asked for more information about automatic language
selection which I pointed you to.  The title of a thread does not always
pertain to the information requested in a specific post.

--
Phil Holmes


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Narrow down search of Lilypond documentation to English

Colin Tennyson
In reply to this post by Federico Bruni
Colin Tennyson wrote:
> > Can you possibly direct me to more information about this?
 
Frederico Bruni wrote:
> I think that you should google "language negotiation apache" :-)


http://httpd.apache.org/docs/2.2/content-negotiation.html

So now I know why the Lilypond website appends the two-letter country codes to the ends of the URLs: as per HTTP 1.1 specification Apache content negotiation also has a language negotiation feature.

Interestingly, the Apache website does *not* use language negotiation:

http://httpd.apache.org/docs/2.2/en/content-negotiation.html
http://httpd.apache.org/docs/2.2/fr/content-negotiation.html
http://httpd.apache.org/docs/2.2/ja/content-negotiation.html
http://httpd.apache.org/docs/2.2/ko/content-negotiation.html
http://httpd.apache.org/docs/2.2/tr/content-negotiation.html


Colin Tennyson
Reply | Threaded
Open this post in threaded view
|

Re: Narrow down search of Lilypond documentation to English

Robin Bannister
In reply to this post by Colin Tennyson
Colin Tennyson wrote:

 > Feature request:
 > Restructure the Lilypond documentation in such a way that it becomes
 > possible for Google to narrow down searches to a single language,
 > in my case english.


But you can include the inurl: operator in your search terms.
e.g. to get just french, use inurl:fr.
This works for any of the translated sets.


No "en" code is provided in the URLs for the untranslated docs,
so to narrow down to just english, you have to exclude translations:
    -inurl:de. -inurl:fr. -inurl:es. -inurl:it. -inurl:nl. -inurl:ja.

This is a pretty unwieldy spell, but not too difficult to automate.
The attachment demonstrates one method.


 > I'm eager to learn whether my guesses are correct.

Well, in previous URLs the code wasn't in the filename,
but rather between slashes - on its own level.

At first sight it seems a pity that no "en" code is provided,
but see my comment after proposal J in
http://lists.gnu.org/archive/html/lilypond-user/2008-10/msg00627.html

My search_218.html is an minimally updated version of the old
inurl-testrig. It may be a bit outdated
e.g. re robot permissions or browser versions.


Cheers,
Robin


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user

search_218.zip (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Narrow down search of Lilypond documentation to English

Colin Tennyson
This post was updated on .
Robin Bannister wrote:
> you can include the inurl: operator in your search terms.
> e.g. to get just french, use inurl:fr.
> This works for any of the translated sets.

> No "en" code is provided in the URLs for the untranslated docs,
> so to narrow down to just english, you have to exclude translations:
> -inurl:de. -inurl:fr. -inurl:es. -inurl:it. -inurl:nl. -inurl:ja.

Thank you Robin, the workaround that you have suggested is effective.
The following string of operators narrows the search results down to pages from the english repository.

barnumbercheck -inurl:.it. -inurl:.es. -inurl:.de. -inurl:.ja. -inurl:.fr. site:lilypond.org/doc/v2.18/Documentation/

(Well, I guess using just "it." "es." would be enough, but it for good measure I include both periods.)



> Colin Tennyson wrote:
> > I'm eager to learn whether my guesses are correct.

Robin Bannister wrote:
> Well, in previous URLs the code wasn't in the filename,
> but rather between slashes - on its own level.

The repositories for the translated documentation used to be in a level of their own? (as in v2.18/it/ and v1.18/es/)
That raises the question: why has the Lilypond documentation been changed away from that? for the sake of language negotiation?

From what I've read my understanding is that the http 1.1 spec doesn't require user agents to support language negotiation. It's my understanding that the specification *allows* for extensions that support language negotiation.

Work is underway for a http/2 specification (more efficient protocols and better encryption negotiation).
Will language negotiation be in the http/2 specification? It's not clear.


Colin Tennyson
Reply | Threaded
Open this post in threaded view
|

Re: Narrow down search of Lilypond documentation to English

Colin Tennyson
Colin Tennyson wrote:
> The following string of operators narrows the search results down to pages from the english repository.
> barnumbercheck -inurl:.it. -inurl:.es. -inurl:.de. -inurl:.ja. -inurl:.fr. site:lilypond.org/doc/v2.18/Documentation/

Oh, I forgot to mention:
I save a page with the following search string in the Search Box as a bookmark:
-inurl:.it. -inurl:.es. -inurl:.de. -inurl:.ja. -inurl:.fr. site:lilypond.org/doc/v2.18/Documentation/

So I don't have to type it or copy/paste it every time.


Colin Tennyson
Reply | Threaded
Open this post in threaded view
|

Re: Narrow down search of Lilypond documentation to English

Simon Albrecht-2
In reply to this post by Colin Tennyson
Am 21.03.2015 um 15:38 schrieb Colin Tennyson:

> For Lilypond the reference documentation is the one in english. Besides that
> translated versions of the documenation are available (in various states of
> completeness).
>
> The Lilypond website uses a naming system:
> Example:
> English version:
> http://lilypond.org/doc/v2.18/Documentation/notation/lilypond-command-index.html
> German version:
> http://lilypond.org/doc/v2.18/Documentation/notation/lilypond-command-index.de.html
> Italian version:
> http://lilypond.org/doc/v2.18/Documentation/notation/lilypond-command-index.it.html
>
>
> As we know, this has huge consequences for the searchability of the site:
> To search the Lilypond 2.18 documentation for entries with the string
> "barnumbercheck" I enter in the Google search field:
>
> barnumbercheck site:/lilypond.org/doc/v2.18/Documentation
>
> Google then gives me search results from ALL the languages. For example, for
> "barnumbercheck" the second search result is in Japanese.
>
>
> Feature request:
> Restructure the Lilypond documentation in such a way that it becomes
> possible for Google to narrow down searches to a single language, in my case
> english.
>
>
> Out of sheer curiosity: how did it come about that the language versions of
> the documenation are distinguished only by adding at the very end of the URL
> the two-letter land code?
>
> My best guess is that for many years a policy was in place to keep everyting
> Lilypond in english only. After all, the Lilypond source code is in english,
> so anyone who wants to create Lilypond files has to master english anyway.
Definitely not. You have to learn the English command names, indeed, but
it’s by no means necessary to read the source code for creating any
score with Lilypond.

Yours, Simon

> Subsequent guess: at some point that policy was reverted, but by then it was
> too late to accomodate different language versions in the Lilypond website
> directory structure.
> I'm eager to learn whether my guesses are correct.
>
> Colin Tennyson
>
>
>
>
>
> --
> View this message in context: http://lilypond.1069038.n5.nabble.com/Narrow-down-search-of-Lilypond-documentation-to-English-tp173423.html
> Sent from the User mailing list archive at Nabble.com.
>
> _______________________________________________
> lilypond-user mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/lilypond-user


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Narrow down search of Lilypond documentation to English

Colin Tennyson
> Colin Tennyson wrote:
> > so anyone who wants to create Lilypond files has to master english anyway.

Simon Albrecht wrote:
> You have to learn the English command names, indeed, but
> it’s by no means necessary to read the source code for creating any
> score with Lilypond.

Erm, surely it was clear that I was referring to creating Lilypond files, to be rendered to scores, by the Lilypond engine.

For comparison: SVG. The source for an SVG image is in english, all the commands are english words.
So if I say: "SVG source code is in english so anyone who wants to create SVG files has to master english anyway" then surely the assumption must be that I'm referring to creating source for an SVG image, not referring to writing source code that compiles to an SVG *rendering engine*.


But yeah, there's an ambiguity.
In Lilypond files you declare variables and the Lilypond parser resolves those variables, like declaring variables in code. So yeah, I referred to writing the source for a score as writing 'Lilypond source code'.
Point taken, in the future I will refer to Lilypond source as 'Lilypond source', reserving the expression 'Lilypond source code' for source-code-for-the-Lilypond-rendering-engine.


Colin Tennyson
Reply | Threaded
Open this post in threaded view
|

Re: Narrow down search of Lilypond documentation to English

Simon Albrecht-2
Am 23.03.2015 um 02:10 schrieb Colin Tennyson:
>> Colin Tennyson wrote:
>>> so anyone who wants to create Lilypond files has to master english
>> anyway.
> Simon Albrecht wrote:
>> You have to learn the English command names, indeed, but
>> it’s by no means necessary to read the source code for creating any
>> score with Lilypond.
> Erm, surely it was clear that I was referring to creating Lilypond files, to
> be rendered to scores, by the Lilypond engine.
Sorry for the misconception.
- Simon

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user