# Toponym resolution

In geographic information systems, toponym resolution is the relationship process between a toponym, i.e. the mention of a place, and an unambiguous spatial footprint of the same place.
The places mentioned in digitized text collections constitute a rich data source for researchers in many disciplines. However, toponyms in language use are ambiguous, and difficult to assign a definite real-world referent. Over time, established geographic names may change (as in "Byzantium" > "Constantinople" > "Istanbul"); or they may be reused verbatim ("Boston" in England, UK vs. "Boston" in Massachusetts, USA), or with modifications (as in "York" vs. "New York"). To map a set of place names or toponyms that occur in a document to their corresponding latitude/longitude coordinates, a polygon, or any other spatial footprint, a disambiguation step is necessary. A toponym resolution algorithm is an automatic method that performs a mapping from a toponym to a spatial footprint.
Some methods for toponym resolution employ a gazetteer of possible mappings between names and spatial footprints.

## Resolution process

The "unambiguous spatial footprint of the same place" of definition can be in fact unambiguous, or "not so unambiguous". There are some different contexts of uncertainty where the resolution process can occur:
* When the evidence is geographical and with no uncertainty. For example, to obtain the country name of a photo place, when the place is a GPS position (10 meters of error), at 1000 km far from country borders.
* When the evidence is geographical, but with considerable uncertainty. Imagine a similar scenario where the GPS error is 100 meters and the place is near from, ~100 meters, of the country borders.
* When the evidence is only textual. Imagine a letter where the narrator is a tourist telling about his trip after he returned from vacation. The only evidences are textual, in the narrative.
* Mixed sources of evidence: more than one evidence, no one precise.

### From geographical evidence

The toponym resolution sometimes is a simple conversion from name to abbreviation, in special when the abbreviation is used as standard geocode. For example, converting the official country name Afghanistan into an ISO country code, AF.
In annotating media and metadata, the conversion using a map and the geographical evidence (e.g. GPS), is the most usual approach to obtain toponym, or a geocode that represents the toponym.

### From textual evidence

In contrast to geocoding of postal addresses, which are typically stored in structured database records, toponym resolution is typically applied to large unstructured text document collections to associate the locations mentioned in them with maps. If some of those text documents are geotagged --- e.g. because they are micro-blog posts with latitude and longitude automatically added --- they can be used to infer the varying geographical specificity of arbitrary terms, e.g. "cable car" or "high tide" .
The process of annotating media (e.g., image, text, video) using spatial footprints is known as Geotagging. In order to automatically geotag a text document, the following steps are usually undertaken: toponym recognition (i.e., spotting textual references to geographic locations) and toponym resolution (i.e., selecting an appropriate location interpretation for each geographic reference).
Toponym recognition can be considered as a special case of named-entity recognition where the objective is to merely derive location entities. However, the result of named-entity recognition can be further improved using hand-crafted rules or statistical rules.
For obtaining location interpretations, resolution models tend to leverage gazetteers (i.e., huge databases of locations) such as GeoNames and OpenStreetMap. A naive approach to resolve toponyms is to pick the most populated interpretation from the list of candidates. For example, in the following excerpt:
   Toronto man living, working in London 'uncertain of future' in U.K. after Brexit
The naive approach seems viable since toponyms Toronto and London refer to their most common interpretation, located in Canada and Britain respectively, whereas in the following piece from a news article:
   High-speed rail between Toronto and London by 2025
This approach fails to pinpoint toponym London as the city located in Ontario, Canada. Hence, selecting the highest population cannot work well for toponyms in a localized context.
Additionally, toponym resolution does not address metonymy in general. Nonetheless, a resolution technique can still disambiguate a metonymy reference as long as it is identified as a toponym in the recognition phase. For instance, in the following excerpt:
   Canada is also adjusting its driving laws to account for cannabis DUIs.
Canada indicates a metonymy and refers to "the government of Canada". However, it can be identified as a location by a generic named-entity recognizer and thus, a toponym resolver is able to disambiguate it.

## Approaches

Toponym resolution methods can be generally divided into supervised and unsupervised models. Supervised methods typically cast the problem as a learning task wherein the model first extracts contextual and non-contextual features and then, a classifier is trained on a labelled dataset. Adaptive model is one of the prominent models proposed in resolving toponyms. For each interpretation of a toponym, the model derives context-sensitive features based on geographical proximity and sibling relationships with other interpretations. In addition to context related features, the model benefits from context-free features including population, and audience location. On the other hand, unsupervised models do not warrant annotated data. They are superior to supervised models when the annotated corpus is not sufficiently large, and supervised models may not generalize well.
Unsupervised models tend to better exploit the interplay of toponyms mentioned in a document. The Context-Hierarchy Fusion model estimates the geographic scope of documents and leverages the connections between nearby place names as evidence to resolve toponyms. By means of mapping the problem to a conflict-free set cover problem, this model achieves a coherent and robust resolution.
Furthermore, adopting Wikipedia and knowledge bases have been shown effective in toponym resolution. TopoCluster models the geographical senses of words by incorporating Wikipedia pages of locations and disambiguates toponyms using the spatial senses of the words in the text.

### Geoparsing

Geoparsing is a special toponym resolution process of converting free-text descriptions of places (such as "twenty miles northeast of Jalalabad") into unambiguous geographic identifiers, such as geographic coordinates expressed as latitude-longitude. One can also geoparse location references from other forms of media, for examples audio content in which a speaker mentions a place. With geographic coordinates the features can be mapped and entered into Geographic information systems. Two primary uses of the geographic coordinates derived from unstructured content are to plot portions of the content on maps and to search the content using a map as a filter.
Geoparsing goes beyond geocoding. Geocoding analyzes unambiguous structured location references, such as postal addresses and rigorously formatted numerical coordinates. Geoparsing handles ambiguous references in unstructured discourse, such as "Al Hamra," which is the name of several places, including towns in both Syria and Yemen.
A geoparser is a piece of software or a (web) service that helps in this process. Some examples:
* GEOLocate automated georeferencing
* BioGeomancer – Semi-automatic georeferencing
* GEOnet Names Server – Freely available GIS information for areas outside of the US and Antarctica, updated monthly by the National Geospatial-Intelligence Agency (NGA) and the U.S. Board on Geographic Names (US BGN)
* Geographic Names Information System (GNIS) – Freely available database containing information on almost 2 million physical features, places, and landmarks in the U.S.A.
* CLAVIN – CLAVIN (Cartographic Location And Vicinity INdexer) is an open source software package for document geotagging and geoparsing that employs context-based geographic entity resolution.
* Geocode.xyz – Geocode.xyz is a web service that identifies both place names and street addresses mentioned in text.
* geoparsepy – geoparsepy is a free Python geoparsing library supporting free text location identification and disambiguation using the OpenStreetMap database