LegNER: a domain-adapted transformer for legal named entity recognition and text anonymization
The increasing demand for scalable and privacy-preserving processing of legal documents has intensified the need for accurate Named Entity Recognition (NER) systems tailored to the legal domain. In this work, we introduce <b>LegNER</b>, a domain-adapted transformer model designed for both legal NER and text anonymization. The model is trained on a corpus of 1,542 manually annotated court cases and enriched with an extended legal vocabulary, enabling robust recognition of six critical entity types, including PERSON, ORGANIZATION, LAW, and CASE_REFERENCE. Built on BERT-base and enhanced through domain-specific pretraining and span-level supervision, LegNER consistently outperforms established legal NER baselines. Experimental results demonstrate significant gains in accuracy (99%), F1 score (over 99%), and inference efficiency (processing more than 12 documents per second), confirming both its precision and scalability. Beyond quantitative improvements, qualitative evaluation highlights LegNERs ability to generate coherent anonymized outputs, a crucial requirement for GDPR-compliant redaction and automated legal analytics. Taken together, these results establish LegNER as a reliable and effective solution for high-precision entity recognition and anonymization in compliance-sensitive legal workflows.
Authors
- Andreas Kanavos (ORCID: https://orcid.org/0000-0002-9964-4134)
- Khalil Al-Hussaeni (ORCID: https://orcid.org/0000-0002-5343-2064)
- Ioannis Karamitsos (ORCID: https://orcid.org/0000-0001-6106-6423)
- Nikolaos Roufas
Institutions
- Rochester Institute of Technology - Dubai (AE)
- Ionian University (GR)
Publication Details
- Journal
- Frontiers in Artificial Intelligence
- Published
- 2025-11-06
- DOI
- https://doi.org/10.3389/frai.2025.1638971
- Citations
- 2
- Primary Topic
- Topic Modeling
- Type
- article
- Field-Weighted Citation Impact
- 4.96