A gazetteer is a structured geographical dictionary that serves as a critical lookup resource for Named Entity Recognition (NER) and geoparsing pipelines. It systematically maps textual place names—toponyms—to precise geospatial coordinates, typically latitude and longitude, and a formal, unambiguous identifier such as a GeoNames ID. Unlike a general dictionary, a gazetteer is a curated knowledge base that resolves the inherent ambiguity of location names, distinguishing 'Springfield, Illinois' from 'Springfield, Oregon' through feature type classifications, population data, and hierarchical administrative boundaries.
Glossary
Gazetteer

What is a Gazetteer?
A gazetteer is a structured geographical dictionary used in geoparsing and entity recognition to map location names in text to precise coordinates and formal identifiers.
In modern entity linking workflows, the gazetteer functions as the ground-truth index for candidate generation and toponym resolution. When a geoparser identifies a location mention in unstructured text, it queries the gazetteer to retrieve a shortlist of possible real-world referents. The system then applies disambiguation heuristics, often using contextual clues and population priors, to select the correct entry. This process transforms a vague string into a machine-readable, spatially-aware entity, enabling downstream applications like crisis mapping, epidemiological surveillance, and geospatial intelligence analysis.
Core Components of a Computational Gazetteer
A computational gazetteer is a structured geographical dictionary that maps textual place names to precise spatial coordinates and formal identifiers, serving as the foundational knowledge base for geoparsing and location entity resolution.
Coordinate Normalization
Gazetteers enforce a canonical spatial reference system to ensure interoperability. The standard is WGS 84 (EPSG:4326) with decimal degree representation. Key normalization tasks include:
- Converting degrees-minutes-seconds (DMS) to decimal degrees
- Validating latitude bounds (-90 to +90) and longitude bounds (-180 to +180)
- Resolving coordinate precision to an appropriate number of decimal places
- Handling antimeridian crossing for bounding box queries
A precision of 4 decimal places (~11 meters) is typical for city-level disambiguation.
Toponym Resolution & Disambiguation
The core function of a gazetteer is resolving ambiguous toponyms. For example, 'Springfield' appears in 34 U.S. states. Disambiguation strategies include:
- Population heuristics: Defaulting to the most populous candidate
- Spatial proximity: Selecting the candidate closest to other mentioned locations
- Administrative context: Using parent region mentions to filter candidates
- Type filtering: Restricting by feature code when the text implies a specific category (e.g., 'river' vs. 'city')
This process transforms the string 'Paris, Texas' into the unambiguous geonameId 4717560.
Hierarchical Spatial Indexing
Efficient gazetteers use spatial data structures to enable sub-millisecond lookups. Common indexing approaches include:
- Geohash: Hierarchical grid system encoding coordinates as base-32 strings, allowing prefix-based proximity searches
- R-trees: B-tree variant optimized for spatial access methods, grouping nearby objects
- Quadtrees: Recursive decomposition of space into quadrants
These structures power bounding-box queries essential for geoparsing pipelines that must rapidly filter candidates by a document's geographic scope.
Alternate Name Dictionaries
A robust gazetteer must handle the vast variability in how places are referenced in text. The alternate name index includes:
- Exonyms: Foreign language names (e.g., 'Munich' for 'München')
- Historical names: Defunct place names (e.g., 'Constantinople' for 'Istanbul')
- Abbreviations: Common shorthand (e.g., 'LA' for 'Los Angeles')
- Colloquialisms: Informal nicknames (e.g., 'The Big Apple' for 'New York City')
This dictionary is the primary input for the candidate generation phase of entity linking, where surface forms are matched against known variants.
Feature Type Ontologies
Gazetteers classify locations using structured feature type hierarchies that enable semantic filtering. The GeoNames feature codes define a taxonomy including:
- A: Country, state, region (administrative divisions)
- H: Stream, lake, reservoir (hydrographic features)
- P: City, village, capital (populated places)
- T: Mountain, hill, volcano (hypsographic features)
- S: Hotel, farm, building (spot features)
This ontology allows geoparsers to distinguish a mention of 'Washington' as a state (A.ADM1) versus a city (P.PPL), dramatically improving disambiguation accuracy.
Frequently Asked Questions
A gazetteer is a structured geographical dictionary used in geoparsing and entity recognition to map location names in text to precise latitude/longitude coordinates and formal GeoNames IDs. Below are common questions about how gazetteers function within NLP pipelines.
A gazetteer in natural language processing is a structured, machine-readable dictionary that maps textual place names (toponyms) to their corresponding geospatial coordinates and unique identifiers. Unlike a standard dictionary, an NLP gazetteer contains rich metadata for each entry, including latitude/longitude pairs, GeoNames IDs, feature type classifications (e.g., city, mountain, river), population counts, and administrative hierarchy information. The gazetteer serves as the authoritative lookup table during geoparsing—the process of extracting location mentions from unstructured text—and geocoding, where those mentions are resolved to precise spatial footprints. Modern gazetteers like GeoNames, OpenStreetMap's Nominatim, and Who's on First contain millions of entries and support fuzzy matching to handle spelling variations, historical names, and multilingual toponyms. The quality of a gazetteer directly determines the accuracy of downstream geospatial analysis, as any missing or ambiguous entry will cause a location mention to remain unresolved or be incorrectly mapped.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Core concepts that work alongside gazetteers to build robust entity linking pipelines, from initial recognition to final knowledge base population.
Named Entity Recognition (NER)
The foundational information extraction task that locates and classifies named entities in unstructured text into pre-defined categories. NER identifies where entities are and what type they belong to—such as person, organization, or location—before a gazetteer resolves them to precise coordinates.
- Spans token sequences to identify entity boundaries
- Uses BIO tagging schemes (Begin, Inside, Outside)
- Modern approaches leverage transformer-based architectures like BERT
- Output feeds directly into geoparsing and entity linking pipelines
Named Entity Disambiguation (NED)
The critical subtask that resolves which specific entity a mention refers to when multiple entities share the same surface form. For example, distinguishing 'Paris, Texas' from 'Paris, France' requires contextual analysis beyond simple string matching.
- Uses surrounding context words as disambiguation features
- Leverages entity prominence and prior probability scores
- Gazetteers provide the candidate set of possible locations
- Collective approaches consider all mentions in a document jointly
Candidate Generation
The initial retrieval phase that produces a shortlist of possible knowledge base entries for a given textual mention. Gazetteers serve as the primary surface form dictionary, mapping location name variants to candidate GeoNames IDs.
- Uses n-gram indexing for fast dictionary lookup
- Handles alternate names, abbreviations, and historical variants
- Balances recall (finding all candidates) against precision (keeping lists short)
- Approximate nearest neighbor search for dense embedding approaches
Toponym Resolution
The specialized geoparsing subtask that maps a recognized place name to its precise geographic coordinates and formal identifier. This is where the gazetteer becomes operational—transforming 'downtown Boston' into latitude 42.3601° N, longitude 71.0589° W with GeoNames ID 4930956.
- Handles nested locations (neighborhood within city within state)
- Resolves relative references like '50 miles north of Denver'
- Accounts for temporal validity when place names change over time
- Critical for crisis mapping and humanitarian response applications
Collective Entity Linking
A global optimization approach that jointly disambiguates all entity mentions in a document by maximizing semantic coherence among the linked entities. Rather than resolving each mention independently, it considers whether linked locations form a geographically plausible cluster.
- Builds a graph where nodes are mention-candidate pairs
- Scores edges based on entity relatedness and spatial proximity
- Uses algorithms like PageRank or loopy belief propagation
- Gazetteer features inform spatial coherence scoring between location entities
Canonical Entity Identifier
A persistent, unique identifier that serves as the single source of truth reference for a specific entity. In gazetteer-based systems, this is typically a GeoNames ID, Wikidata Q-ID, or proprietary master data management UUID.
- Enables unambiguous cross-system data integration
- Survives name changes and surface form variations
- Forms the backbone of knowledge graph entity nodes
- Essential for maintaining referential integrity in linked data

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us