[OSM-talk] Collapsed names

Martin Hoffmann hn at nvnc.de
Fri Jul 25 22:11:10 BST 2008


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




More information about the talk mailing list