Improving Toponym Resolution by Predicting Attributes to Constrain Geographical Ontology Entries (2024)

Abstract: Geocoding is the task of converting location mentions in text into structured geospatial data.We propose a new prompt-based paradigm for geocoding, where the machine learning algorithm encodes only the location mention and its context.We design a transformer network for predicting the country, state, and feature class of a location mention, and a deterministic algorithm that leverages the country, state, and feature class predictions as constraints in a search for compatible entries in the ontology.Our architecture, GeoPLACE, achieves new state-of-the-art performance on multiple datasets.Code and models are available at https://github.com/clulab/geonorm .

## introduction geocoding is the task of matching locations in text to geospatial coordinates or entries in a geographical database. geocoding systems support document categorization and retrieval @xcite , historical event analysis @xcite , monitoring the spread of infectious diseases @xcite , and disaster response mechanisms @xcite . geocoding is challenging because identical place names may refer to different geographical locations (e.g., san jose in costa rica vs. san jose in california, usa), while distinct names can represent the same geographical location (e.g., leeuwarden and ljouwert in the netherlands). the traditional paradigm for geocoding systems is to train machine learning algorithms that encode the location mention, its context, and the geographical ontology entries together when predicting a label for the mention. camcoder @xcite , refined @xcite , and geonorm @xcite all take this approach, with the latter showing that explicit countries and states in the context are especially helpful in this paradigm. however, these approaches are not able to take advantage of implicit context, such as countries and states that are not mentioned in the text but are inferrable from it. we propose an novel prompt-based approach to geocoding that automatically identifies the implicit geographic information necessary to resolve location mentions. in this new paradigm for geocoding, we first apply a text classification approach that takes a prompt containing the location mention and some document context as input and predicts ontology attributes such as the location's enclosing country and state. for example, our approach would predict that paris in a document about texas would have the attributes "a populated place located in texas in the united states." the constraints implied by these predictions are used to deterministically filter the ontology entries. our novel architecture, geographical normalization by predicting location attributes to constrain ontology entries (geoplace) is illustrated in figure 1 . our work makes the following contributions: ## related work prior work in geocoding included models based on hand-crafted rules and heuristics @xcite @xcite ; lieberman and samet, 2011; berico technologies, 2012; @xcite , and traditional machine learning models such as support vector machines @xcite @xcite @xcite @xcite . however, most recent approaches to geocoding use neural networks. neural network based models have approached geocoding both as a ranking problem, trying to sort ontology entries by their appropriateness as a label for a location mention @xcite @xcite and as a classification problem, trying to map a location mention directly to one of an n × n grid of tiles covering the earth's surface @xcite @xcite . the most successful approaches encode not just the mention and ontology entry names, but also context around the mention and information from the ontology such as population @xcite @xcite . many neural architectures have been considered, including convolutional @xcite , recurrent @xcite , and transformer networks @xcite . in contrast to these approaches, we predict geographical attributes (e.g., enclosing state) and use those to deterministically select an ontology entry. ## proposed methods the problem of geocoding can be formalized as defining a function f (m|t, m, e) = ê where t is the text of a document, m ⊂ t is the location mentions in the document, e is the set of geograph-ical database entries, @xmath0, and ê ∈ e is the entry predicted by f for m. in our paradigm for geocoding, we formulate f to first predict the country, state, and feature of m, next query the ontology with m to find candidate entries, then select the entry that violates the fewest constraints implied by the predicted attributes as the prediction ê. formally: ## experiments we conduct primary experiments on three toponym resolution datasets: local global lexicon (lgl; @xcite , a collection 588 news articles from local and small u.s. news sources; geo-webnews @xcite a collection of 200 articles from 200 globally distributed news sites; and tr-news (kamalloo and rafiei, 2018) a collection 118 articles from various global and local news sources. all datasets use as their ontology geonames, a crowdsourced database of almost 7 million entries that contains geographic coordinates (latitude and longitude), alternative names, feature class (country, city, river, mountain, etc.), population, elevation, and positions within a political geographic hierarchy. see appendix a.1 for statistics of the datasets. we adopt the train, development, and test splits and evaluation metrics of prior work @xcite . we refer the reader to that paper for details, but briefly, accuracy measures how often the correct database entry was predicted, while accuracy@161km, mean error distance, and area under the curve all give some partial credit for predicting entries that are wrong but geographically close to the correct entry. we compare to the state-of-the-art geocoders: refined is an end-to-end wikipedia-linking model that matches transformer-generated embeddings for tokens in the text to embeddings of ontology entries via dot products @xcite . refined was originally trained on wikipedia, but zhang and bethard (2023) leveraged the existing links to geonames ids to fine-tune it for toponym resolution. it is the wikipedia-linking model with the best reported performance on our evaluation datasets. geonorm zhang and bethard (2023) uses lucene to index and generate candidate entries from the ontology, applies a transformer network jointly over the mention and each candidate entry to predict a single entry, and applies a two-stage process to first resolve countries and states and use them as context to resolve other mentions. geoplace (+seq2seq) is a variant of our model that replaces our masked language modeling objective with a generative objective, asking the model to directly produce @xmath1. see appendix a.3 for prompting details. ## conclusion we introduced a new paradigm for geocoding where we predict implicit geographical attributes and use those to deterministically constrain the set of valid ontology entries. our approach leads to large error reduction over the current state-of-theart on the lgl and tr-news datasets.