[OSM-dev] OSM API Improvements work

Stefan Keller sfkeller at gmail.com
Tue Oct 16 00:17:08 BST 2012


Hi Jochen

2012/10/14 Jochen Topf <jochen at remote.org>:
> On Sun, Oct 14, 2012 at 03:59:59AM +0200, Stefan Keller wrote:
>> @Jochen: taginfo is a very valuable service which I use regularly. But
>> it seems to me that taginfo is rather a browsing tool and has not been
>> designed to return key-value suggestions given a single search term,
>> right?
>>
>> Taginfo has strong linking capabilities but wants you rather to know
>> the key or the value term in advance. For example: A search for
>> "castle" returns castle_type (instead of historic=castle, see
>> http://taginfo.openstreetmap.org/search?q=castle ). A search for
>> "monastery" (or church) it returns the same term again (instead of
>> place_of_worship=*). And seaching in non-english language is even
>> worse.
>
> Of course taginfo also returns historic=castle. Click on the "Value" tab on the
> results page to see it. The way search results are displayed is not really
> great. Ideas or patches to improve this are welcome.

When you have to click it's not searching it's browsing (and in
editors users dont want to click when searching for a tag).
The use case is: given a search term return a ranked result set.
That's more than just improving the display.
And we need an API of that which can be used in editors like JOSM.

>> That's why I suggested something I called "TagFinder". You can look at
>> the showcase here http://openpoimap.ch/tagfinder/search?q=Schloss .
>> And I'm giving a talk about how ony could add value to taginfo
>> statistics at the OGRS conference coming soon http://www.ogrs2012.org/
>> .
>>
>> So, taginfo is rather close to that "simple search with tag suggestion
>> feature". In fact, you know that I suggested a patch for such an API -
>> which you rejected at this time. I would still love to see taginfo
>> enhanced with this feature (even if i would turn something like
>> TagFinder obsolete).
>
> Yes, we have been over this a few times... Your suggested patch wasn't a
> good solution in my opinion and I explained how it could be done better.
> But you declared my solution to be impossible and didn't try it.
>
> Just to get you off my back I spent a few hours today and have implemented a
> minimal solution now. It is far from perfect, but maybe somebody wants to
> take it up and improve on it. There are many possible improvements such as
> adding a thesaurus, word stemming, better detection which words might be
> relevant, adding more word sources etc.

That's exactly what we realized in TagFinder: We implemented a free
dictionary and a free thesaurus. We included a parser of related terms
(as templates) in OSM wiki pages so that users can give hints. And we
added a ranking of the result set.

> There is a new "Full text" tab now on the search results page which shows tags
> that might be applicable by searching through the wiki pages for all the tags.
> If your search for "Schloss" for instance it will find "historic=castle" and
> "historic=archaeological_site", and also "barrier=fence" and
> "amenity=bicycle_parking" ("Schloss" in German means "castle", but can also
> mean "lock") and some other stuff. Or try "fire" to see not only
> "amenity=fire_hydrant" etc. but also "man_made=cutline" and
> "tourism=camp_site".

I'm sorry to take a closer look at this: A search for...
* castle gives 5th pos, but should list "historic=castle" on top [1]
* Schloss lists archeological_site and castle at pos. 16/17 [2]
* church return three weird lines [3]

> As I said this is very very basic, but it is actually usable and could be
> useful. I don't have the time right now to improve it, so if nobody takes it up
> it will stay like this for the forseeable future.

I hope you understand that this is not usable in our use case and that
we are taking your offer to take it up with caution.

-Stefan

[1] http://taginfo.openstreetmap.org/search?q=castle#fulltext
[2] http://taginfo.openstreetmap.org/search?q=Schloss#fulltext
[3] http://taginfo.openstreetmap.org/search?q=church#fulltext



More information about the dev mailing list