A Comparative Performance Evaluation of Named Entity Recognition using spaCy and NLTK on Benchmark and Custom Datasets
Abstract
With the rapid growth of digital text data, automatically extracting meaningful information from unstructured text has become essential for applications such as information retrieval, knowledge extraction, and question answering. Named Entity Recognition (NER) is a key task in Natural Language Processing (NLP) that identifies and classifies entities such as persons, organizations, locations, dates, and monetary values into predefined categories. A large portion of real-world data is unstructured, making NER essential for extracting structured information. This study evaluates two widely used Python-based NLP libraries, spaCy and NLTK, on a benchmark dataset (CoNLL-2003) and a custom news dataset from Kaggle. Performance was measured using precision, recall, and F1-score. Results show that spaCy outperforms NLTK in both accuracy and efficiency, especially for real-world text data, demonstrating its suitability for robust and scalable NER applications. BERT-based and transformer-based models are discussed in the related work section to provide insight into recent advancements in Named Entity Recognition techniques.