Performance Comparison of Rule Matching, spaCy and BERT for Location Extraction in Unstructured Texts

Extracting location information from tweets and other social software statements is essential for governments and organisations to make timely decisions. However, challenges include extracting valid locations from massive posts and handling latest events in a few posts, which require models to process data quickly and extract the correct locations from small data. This paper constructs a comparative experimental framework for location entity recognition based on three techniques, namely rule matching, spaCy, and BERT. This study selects about 19,000 labelled social media posts. Results show that rule matching has a high precision rate (>90%), but suffers a low recall rate (~35%) and low efficiency; the spaCy (en_core_web_sm) model balances performance under full data training (F1: 0.8778, recall: 100%), and its small sample version (only 100 data) still maintains excellent performance (F1: 0.9040), demonstrating a strong small sample adaptability; the BERT model performs outstandingly in the semantic understanding task (F1: 0.8418), but its small-sample version suffers from a significant overfitting problem.

Authors

Institutions

Publication Details

Journal
Applied and Computational Engineering
Published
2025-08-13
DOI
https://doi.org/10.54254/2755-2721/2025.bj25965
Primary Topic
Geographic Information Systems Studies
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Performance Comparison of Rule Matching, spaCy and BERT for Location Extraction in Unstructured Texts

Wenxin Liao
Applied and Computational Engineering
Geographic Information Systems Studies
article

Performance Comparison of Rule Matching, spaCy and BERT for Location Extraction in Unstructured Texts

Wenxin Liao
article en

Abstract

Extracting location information from tweets and other social software statements is essential for governments and organisations to make timely decisions. However, challenges include extracting valid locations from massive posts and handling latest events in a few posts, which require models to process data quickly and extract the correct locations from small data. This paper constructs a comparative experimental framework for location entity recognition based on three techniques, namely rule matching, spaCy, and BERT. This study selects about 19,000 labelled social media posts. Results show that rule matching has a high precision rate (>90%), but suffers a low recall rate (~35%) and low efficiency; the spaCy (en_core_web_sm) model balances performance under full data training (F1: 0.8778, recall: 100%), and its small sample version (only 100 data) still maintains excellent performance (F1: 0.9040), demonstrating a strong small sample adaptability; the BERT model performs outstandingly in the semantic understanding task (F1: 0.8418), but its small-sample version suffers from a significant overfitting problem.

Applied and Computational EngineeringVol. 177(1)
South China Normal University (CN)
Openalex Percentile: Top 74%
Geographic Information Systems Studies
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.