Enhancing Named Entity Recognition for Email Text using Domain-Specific Tags
DOI:
https://doi.org/10.56394/aris2.v6i1.80Keywords:
custom named entity recognition, domain-specific named entity recognition, Natural Language Processing, SpaCyAbstract
Named Entity Recognition (NER) is a fundamental task in Natural Language Processing (NLP) that identifies and classifies entities such as dates, organizations, and people. However, generic NER models often underperform in domain-specific contexts, failing to detect entities like email addresses and website links that are essential for applications such as spam detection. This study proposes an enhanced NER framework that introduces two custom domain-specific tags-EMAIL and WEBSITE- using rule-based methods. Preprocessing strategies were incorporated to resolve tokenization inconsistencies in monetary values, time expressions, and URLs.The enriched entity set, combining SpaCy’s default NER output with the custom tags, was transformed into feature vectors alongside TF-IDF representations and used to train multiple machine-learning classifiers, including Multinomial Naïve Bayes, Support Vector Machine (SVM), and XGBoost. Experimental results on a public spam dataset show that the enhanced model achieved a peak accuracy of 95.99%, outperforming the TF-IDF-only baseline (91.4%). An ablation study confirmed that the custom EMAIL and WEBSITE entities contributed up to a 4.5% improvement in accuracy. Interpretability analysis using Local Interpretable Model-Agnostic Explanations (LIME) validated the influence of these domain-specific entities on classification outcomes. While results highlight measurable performance gains, limitations include reliance on a single dataset and reduced effectiveness against obfuscated entity formats. The approach is adaptable to other NLP applications such as phishing detection, fraud prevention, and customer service analytics, demonstrating that lightweight domain-specific enhancements can deliver tangible benefits in specialized contexts.
References
[1] H. Shelar, G. Kaur, N. Heda, and P. Agrawal, “Named Entity Recognition Approaches and Their Comparison for Custom NER Model,” Sci Technol Libr (New York, NY), vol. 39, no. 3, pp. 324–337, Jul. 2020, doi: 10.1080/0194262X.2020.1759479.
[2] K. Taghandiki, “Building an Effective Email Spam Classification Model with spaCy,” Mar. 2023, [Online]. Available: http://arxiv.org/abs/2303.08792
[3] Yuli. Vasiliev, Natural Language Processing Using Python. No Starch Press, Incorporated, 2020.
Downloads
Published
How to Cite
Issue
Section
License

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

