Re: [OSM-talk] Collapsed names

2008-07-27 Thread Igor Brejc
David Earl wrote:
 In principle it ought to be 
 possible to determine the country an object is in, even though it is 
 quite hard at present. I think a lot of things would benefit from this 
 ability: nationally-styled rendering rules, deciding which way 
 roundabouts go, name renderings, validation, improved searching context etc.

 David

   
I think it is not as easy as it looks. Some countries (Slovenia, for 
example) still do not have the whole border drawn in OSM (lack of free 
data), so you cannot use this to determine what belongs to what country 
- never mind the purely technical difficulties of doing so. And anyway, 
even this does not help for multilingual countries like Belgium or Spain.

It is probably more logical to use multilingual place names which should 
have an ISO language ID, like name:ca so that we can match them with 
appropriate language mappings like Name finder:Abbreviations. But this 
multilingual tagging is not used universally in the OSM community.
There is also an is_in tag, but again, it's not widely used (at least 
to my knowledge, I could be wrong).

BTW: it would be good to add ISO language IDs to the Name 
finder:Abbreviations page so that the mappings can be computer-matched 
more easily.

Igor

-- 
http://igorbrejc.net


___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] Collapsed names

2008-07-27 Thread David Earl
On 27/07/2008 11:00, Igor Brejc wrote:
 David Earl wrote:
 In principle it ought to be possible to determine the country an 
 object is in, even though it is quite hard at present. I think a lot 
 of things would benefit from this ability: nationally-styled rendering 
 rules, deciding which way roundabouts go, name renderings, validation, 
 improved searching context etc.

 David

   
 I think it is not as easy as it looks. Some countries (Slovenia, for 
 example) still do not have the whole border drawn in OSM (lack of free 
 data), so you cannot use this to determine what belongs to what country 
 - never mind the purely technical difficulties of doing so. 

Well, depends on the application. And like all our applications, they 
fail with incomplete data, but that will be rectified over time. Even an 
approximate boundary will catch most of the area of a country.

 And anyway, 
 even this does not help for multilingual countries like Belgium or Spain.

Well, depends on the application - choosing a national rendering would 
be OK. Bilingual countries should be using name:lang widely as you say 
below, and it may be that the country it is in could define the default 
language for the unadorned name= tag (so are places in Catalunya tagged 
in Spanish by default, with name:ca for Catalan; if not, how does one 
know what language name= refers to).

 It is probably more logical to use multilingual place names which should 
 have an ISO language ID, like name:ca so that we can match them with 
 appropriate language mappings like Name finder:Abbreviations. But this 
 multilingual tagging is not used universally in the OSM community.

name:lang does seem to be quite widely used. What you're suggesting 
would be quite a good idea except that I don't have any way of knowing 
what the language is of the simple name= - I can deal with the 
alternates, but not the principal name. And with millions of names now 
in there, these ain't going to get manually qualified (and that would 
have to be by a new tag or duplication because of the way name is used 
now for rendering), so unfortunately it is not likely to be practical.

 There is also an is_in tag, but again, it's not widely used (at least 
 to my knowledge, I could be wrong).

It's widely used in the UK. It would be better IMO if it was categorised 
(is_in:country=Engl;and, is_in:county=Cambridgeshire for example) or had 
some hierarchical structure (but that's difficult to maintain), but as 
it is so ingrained, again it isn't likely to change any time soon.

 
 BTW: it would be good to add ISO language IDs to the Name 
 finder:Abbreviations page so that the mappings can be computer-matched 
 more easily.

Feel free. I'm not parsing this list automatically anywhere at present, 
I'm just using it as a manual reference for a table in the name finder.

David

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


[OSM-talk] Collapsed names

2008-07-25 Thread Edoardo Marascalchi
in the italian mailing list we are facing new (and some old) users 
arguing should be better to enter in the name tag the collapsed form of 
the name.

I'm trying to persuade this people this is the wrong way 'cause don't 
exist any way to explode names collapsed.

I'm proposing to add 2 extension to the name tag to mark which part of 
the name could be collapsed or hidden
in the same moment you could give a priority

e.g.

exploded form: Viale don Luigi Sturzo
first: V.le don Luigi Sturzo
2nd: V.le Luigi Sturzo
3rd: V.le L. Sturzo

so
name=Viale don Luigi Sturzo
name:collapsable=1;3
name=hide=2

so...
you are adding tips usefull to renderes about which part of the name 
collapse or hide but it's not a mandatory collapsation
If you are the coder of a renderer you can chose to hide befor collapse 
or collapse before hide..

Let me know it make sense or not..

Edoardo

-- 
Edoardo Marascalchi
ICT Consultant

Tel +39.347.008.00.02
website: http://www.edoardomarascalchi.it
skype: My status skype:asca_edom?call 


___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] Collapsed names

2008-07-25 Thread David Earl
On 25/07/2008 10:56, Edoardo Marascalchi wrote:
 in the italian mailing list we are facing new (and some old) users 
 arguing should be better to enter in the name tag the collapsed form of 
 the name.
 
 I'm trying to persuade this people this is the wrong way 'cause don't 
 exist any way to explode names collapsed.
 
 I'm proposing to add 2 extension to the name tag to mark which part of 
 the name could be collapsed or hidden
 in the same moment you could give a priority
 
 e.g.
 
 exploded form: Viale don Luigi Sturzo
 first: V.le don Luigi Sturzo
 2nd: V.le Luigi Sturzo
 3rd: V.le L. Sturzo
 
 so
 name=Viale don Luigi Sturzo
 name:collapsable=1;3
 name=hide=2
 
 so...
 you are adding tips usefull to renderes about which part of the name 
 collapse or hide but it's not a mandatory collapsation
 If you are the coder of a renderer you can chose to hide befor collapse 
 or collapse before hide..
 
 Let me know it make sense or not..


Edoardo

I'm collecting a list of contractions and abbreviations, at 
http://wiki.openstreetmap.org/index.php/Name_finder:Abbreviations

If you can add a section for Italian, that would be great. In due 
course, these will be used in the name finder so that when someone 
searches for e.g. V.le Luigi Sturzo they will find Viale don Luigi 
Sturzo even though it isn't spelled like that anywhere in the tags. 
This already works for lots of contractions in English, American(!), 
German, French and a few others, but there's no Italian input so far.

If this list were available as XML or some such, I guess renderers could 
use it to shorten the names if necessary to fit on the map or simply for 
stylistic reasons.

I think manually adding variations would then largely be unnecessary.

Where there is a radically different form (let's say hypothetically 
Viale don Luigi Sturzo could also be expressed as Plaza Sturzo, so 
it's not really a contraction), you can already use alt_name=Plaza 
Sturzo and name finder will pick it up.

David

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] Collapsed names

2008-07-25 Thread Frederik Ramm
EdoM,

 I'm proposing to add 2 extension to the name tag to mark which part of
 the name could be collapsed or hidden
 in the same moment you could give a priority

Your idea of referecing parts of the name tag with numbers is error- 
prone because (a) people will not always agree on how names are split  
in parts (is Baah blaah-blah blah a three-part name or a four-part  
name?), and (b) people will change the name and forget to change the  
extra attributes because they're not clear about what they mean.

If you want to have shortened names in the database, then I would put  
them in there explicitly, like so:

name=Viale don Luigi Sturzo
name_short_1=V.le don Luigi Storzo
name_short_2=V.le Luigi Sturzo
name_short_3=V.le L.Sturzo

But generally I believe the renderer should just have proper rules  
about shortening and use them - so you would only employ above scheme  
for exceptions that the renderer cannot derive automatically.

In my eyes it would be a great idea to develop some not-too-complex  
XML document where such rules can be formalized. We could then have  
our renderers read that document and use it, and host it on the Wiki  
so everyone can put in their collapsation rules for their local  
language.

Bye
Frederik

-- 
Frederik Ramm  ##  eMail [EMAIL PROTECTED]  ##  N49°00'09 E008°23'33




___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] Collapsed names

2008-07-25 Thread 80n
Perhaps this would work:
name=Viale don Luigi Sturzo
short_name=V.le don Luigi Sturzo
very_short_name=V.le L. Sturzo

If short_name and very_short_name are present then use them, otherwise the
renderers can use whatever automated algorithm they like.

This would handle with all the corner cases that will never be fully
abbreviated automatically.  For example:
name='s-Hertogenbosch
short_name=Den Bosch

80n

On Fri, Jul 25, 2008 at 10:56 AM, Edoardo Marascalchi 
[EMAIL PROTECTED] wrote:

 in the italian mailing list we are facing new (and some old) users
 arguing should be better to enter in the name tag the collapsed form of
 the name.

 I'm trying to persuade this people this is the wrong way 'cause don't
 exist any way to explode names collapsed.

 I'm proposing to add 2 extension to the name tag to mark which part of
 the name could be collapsed or hidden
 in the same moment you could give a priority

 e.g.

 exploded form: Viale don Luigi Sturzo
 first: V.le don Luigi Sturzo
 2nd: V.le Luigi Sturzo
 3rd: V.le L. Sturzo

 so
 name=Viale don Luigi Sturzo
 name:collapsable=1;3
 name=hide=2

 so...
 you are adding tips usefull to renderes about which part of the name
 collapse or hide but it's not a mandatory collapsation
 If you are the coder of a renderer you can chose to hide befor collapse
 or collapse before hide..

 Let me know it make sense or not..

 Edoardo

 --
 Edoardo Marascalchi
 ICT Consultant

 Tel +39.347.008.00.02
 website: http://www.edoardomarascalchi.it
 skype: My status skype:asca_edom?call


 ___
 talk mailing list
 talk@openstreetmap.org
 http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] Collapsed names

2008-07-25 Thread David Earl
On 25/07/2008 11:11, Frederik Ramm wrote:
 In my eyes it would be a great idea to develop some not-too-complex  
 XML document where such rules can be formalized. We could then have  
 our renderers read that document and use it, and host it on the Wiki  
 so everyone can put in their collapsation rules for their local  
 language.

GMTA

It would be nice if an XML file were easily editable and could be 
displayed nicely in the wiki... funny, I seem to have deja vu here re 
Map Features.

David


___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] Collapsed names

2008-07-25 Thread Martin Hoffmann
Frederik Ramm wrote:
 
 If you want to have shortened names in the database, then I would put  
 them in there explicitly, like so:
 
 name=Viale don Luigi Sturzo
 name_short_1=V.le don Luigi Storzo
 name_short_2=V.le Luigi Sturzo
 name_short_3=V.le L.Sturzo
 
 But generally I believe the renderer should just have proper rules  
 about shortening and use them - so you would only employ above scheme  
 for exceptions that the renderer cannot derive automatically.

Not sure whether you can find an algorithm that actually manages to find
the correct short versions for all possible languages and places. You
can't just shorten, say, Viale to V.le on a general basis as it may
appear as a main part of a name. The shortening is only possibly if (a)
you are in Italy or the Italian part of Switzerland and (b) it appears
as the first word. It gets even trickier, if you want to shorten or even
leave out first or middle names like Luigi in the above example. Is the
first of two names a first name or rather the first part of a double
name?

An alternative approach would be some sort of name expression. Something
like

   name_expr=(Viale|V.le) [don] [(Luigi|L[.])] Sturzo

This also covers odd cases like my own street which is either a Via or a
Viale, depending on whom you ask. Instead of having lots of alternative
or shorter names, it becomes simply

   name_expre=(Via|Viale) [Battista] Foletti

(I haven't seen viale shortened to V.le just yet).

The drawback is that these expressions tend to get out of hand and that
you will have to escape brackets, parentheses and vertical bars. But if
the parens are replaced by braces, this should be reasonably safe. And I
don't think, this needs anything more complex than just alternatives and
optionality.

If a canonical name exists, it can go into the name tag just like
today.
 
Regards,
Martin

___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] Collapsed names

2008-07-25 Thread David Earl
On 25/07/2008 22:11, Martin Hoffmann wrote:
 Frederik Ramm wrote:
 If you want to have shortened names in the database, then I would put  
 them in there explicitly, like so:

 name=Viale don Luigi Sturzo
 name_short_1=V.le don Luigi Storzo
 name_short_2=V.le Luigi Sturzo
 name_short_3=V.le L.Sturzo

 But generally I believe the renderer should just have proper rules  
 about shortening and use them - so you would only employ above scheme  
 for exceptions that the renderer cannot derive automatically.
 
 Not sure whether you can find an algorithm that actually manages to find
 the correct short versions for all possible languages and places. You
 can't just shorten, say, Viale to V.le on a general basis as it may
 appear as a main part of a name. The shortening is only possibly if (a)
 you are in Italy or the Italian part of Switzerland and (b) it appears
 as the first word. It gets even trickier, if you want to shorten or even
 leave out first or middle names like Luigi in the above example. Is the
 first of two names a first name or rather the first part of a double
 name?
[snip]

There's two separate cases

(1) recognizing that variations are equivalent so that searching works. 
I think I've demonstrated that that can work pretty well, without 
needing to know the language - because 9a) it doesn't matter if you get 
the odd extra hit on occasion, (bn) searches can be context sensitive, 
and (c) you don't get to see and people don't search for the silly 
variations that the database sometimes holds because of different languages.

(2) Drawing shorter variants when rendering. You only really need one 
variation there, probably the shortest one. In principle it ought to be 
possible to determine the country an object is in, even though it is 
quite hard at present. I think a lot of things would benefit from this 
ability: nationally-styled rendering rules, deciding which way 
roundabouts go, name renderings, validation, improved searching context etc.

David


___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk


Re: [OSM-talk] Collapsed names

2008-07-25 Thread Martin Hoffmann
David Earl wrote:

 There's two separate cases

 (1) recognizing that variations are equivalent so that searching works.  
 I think I've demonstrated that that can work pretty well, without  
 needing to know the language - because 9a) it doesn't matter if you get  
 the odd extra hit on occasion, (bn) searches can be context sensitive,  
 and (c) you don't get to see and people don't search for the silly  
 variations that the database sometimes holds because of different 
 languages.

True. In this context, being overly helpful is a good thing. You might
also want to look for variations of the name, say, if someone types
Holland Road you may also look for Holland Street if no result can
be found for the former.

 (2) Drawing shorter variants when rendering. You only really need one  
 variation there, probably the shortest one.

Not sure I agree here. You want to put as much of the name into the
rendered map as space allows. Keeping the first names of people or at
least only shortening them to an initial may be a good thing because
they appear up front. From a name like Serafino Balestra a foreigner
wouldn't necessarly guess that this refers to a person and Serafino
can be dropped.

 In principle it ought to be  
 possible to determine the country an object is in, even though it is  
 quite hard at present. I think a lot of things would benefit from this  
 ability: nationally-styled rendering rules, deciding which way  
 roundabouts go, name renderings, validation, improved searching context 
 etc.

Definitely.

Regards,
Martin


___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk