Querying OSM with Natural Language

Dan S danstowell+osm at gmail.com
Thu Aug 6 09:16:48 UTC 2015


Hi Carolin,

Interesting project. I'm not one of the OSM maintainers, but I thought
I'd give my own little thoughts in response to your message.

Firstly I'd expect that the OSM maintainers won't be keen to add your
extra message box onto the osm.org website. Please don't be too
disappointed by that. There are lots of research/development projects
that different people work on around the world, using OSM and aiming
to improve it, but it's very rare that the projects are conducted
using the main live OSM website.

Secondly, are you sure that the best approach is to ask people
visiting osm.org to type in a sentence? These would not be "real" use
cases, they would be OSM users trying to make fictional examples for
you. I'd imagine it's a million times better to gather real sentences
that people actually use in information-seeking situations. You could
get these from travel discussion forums for example. I'm not involved
with Overpass, but they have a wizard as part of
http://overpass-turbo.eu/ and maybe they could collate the
half-sentences that people actually type in to that?

Here are some suggestions for nodes to query for: bike rack, butcher,
cafe, cash machine, church, cinema, convenience store, golf course,
library, lighthouse, museum, pharmacy, postbox, post office, public
toilet, pub, supermarket, train station, windmill.

There are often requirements that can be interpreted simply by
checking for additional tags, for example:
a bank which has a cash machine,
a building more than 10 levels high,
a pharmacy that's open right now,
a restaurant that serves vegan food,
a butcher that is halal.

Here's a concept which probably doesn't match an overpass query: "on
the way to". For example, I'd like to ask:
Is there a cash machine near a bike rack, on the way from my house to
the cinema?

Best
Dan

2015-08-04 13:43 GMT+01:00 Carolin Haas <haas1 at cl.uni-heidelberg.de>:
> Hello OSM Devs!
>
> we are sure that this idea has been in the air in the OSM development
> community for a while: An interface for querying OSM with natural language
> questions!
>
>    Example question:  Which hotels in Paris have wheelchair access?
>    Answer: Hôtel Montpensier, Hôtel Ibis Paris Avenue d'Italie, Le Grand
> Hôtel Intercontinental, …
>
> On examples like this, we trained a semantic parser that can parse the
> natural language question into a representation that is mapped into the
> Overpass format (http://wiki.openstreetmap.org/wiki/Overpass_API) which
> allows to access the OSM database:
>
>    Example Query:
> findkey(area(keyval(name,'Paris')),node(keyval(tourism,'hotel'),keyval(wheelchair,'yes')),key(name))
>    Overpass:
> area[name=“Paris”]→.a;node(area.a)[“tourism”=“hotel”][wheelchair=“yes”];out;
>
> Our semantic parser is trained on 900 handcrafted examples on the geography
> of Heidelberg, Edinburgh, and Paris, and it is already able to parse a lot
> of previously unseen natural language questions to OSM. However, we need
> your help to ask more difficult and different questions.
>
> For example, our queries revolve around OSM nodes such as hospitals,
> supermarkets, restaurants, peaks, hotels, etc. Can you think of other
> interesting nodes to query for?
>
> Natural language allows to express fuzzy concepts, for example, "nearby" or
> "south of", that can be captured nicely by Overpass operators such as
> "around". Can you think of other interesting concepts that are best asked in
> terms of natural language?
>
> Please have a look at the pipeline of our model (attached file “pipe.png”)
> and a suggestion for a little interface to the current openstreetmap
> website, asking volunteers to phrase their search intent in natural language
> (attached file “website_screenshot.png”).
>
> Our goal is to first gather new natural language questions from OSM users,
> and then retrain our parser, and eventually release our system so that OSM
> users can search for information using natural language. Please let us know
> if you would support this and what would be the best way for us to get
> started.
>
> Thank you for taking the time to read this.
>
> Carolin & Stefan
>
> _______________________________________________
> rails-dev mailing list
> rails-dev at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/rails-dev
>



More information about the rails-dev mailing list