Natural language processing

From OpenStreetMap Wiki
Jump to navigation Jump to search

Natural language processing (NLP) is an interdisciplinary subfield of linguistics, computer science, and artificial intelligence concerned with the interactions between computers and human language, in particular how to program computers to process and analyze large amounts of natural language data. (this is copied directly from Wikipedia).

The purpose of this page is to encourage the use, and gather data on, NLP for Open Street Maps.

How NLP Is Currently Used for OSM

As of January 2023, this is a new page. Please add other examples of (or ideas for) NLP on OSM.

Web to OSM Opening Hours

Web to OSM Opening Hours (source on GitHub) is a tool that allows you to paste in plain text containing opening hours. The output is opening hours in the correct syntax for OSM.

This works well if you want to copy/paste hours from a website or photograph of the opening hours.

NLMaps

NLMaps lets you ask natural language questions and get answers. It is still in development. a talk about it and reddit post with background.

Possible Future Uses

Extract Text From Menus and Signs

Apps like Every Door (which doesn't plan to implement this feature) or StreetComplete could allow you to take a photo of a menu or sign and automatically extract suggestions for:

Accepting Speech Input

Perhaps the opening hours or hand written and relatively complicated. A user could speak the opening hours "It's open Monday Tuesday and Thursday from 10am to 1pm and from 5pm to 8pm" and then the appropriate opening hours could be detected.

Check POI Data Against Websites

There could be an automated program that looks at POIs that have a website listed and then extract the opening hours/phone number from the website. If there is a discrepancy between the website and the OSM data it can be flagged for someone to manually confirm.

Answering Natural Language Queries for OSM Data

There could be an interface to let people ask a question like "Which cafes in Brussels are open after 7pm on Tuesdays and have wifi?"

This would be much easier for your average person to search when compared to writing an overpass query.

See also