{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,11,4]],"date-time":"2026-11-04T18:16:07Z","timestamp":1793816167399,"version":"4.6.1"},"reference-count":75,"publisher":"Frontiers Media SA","license":[{"start":{"date-parts":[[2025,11,6]],"date-time":"2025-11-06T00:00:00Z","timestamp":1762387200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["frontiersin.org"],"crossmark-restriction":true},"short-container-title":["Front. Artif. Intell."],"abstract":"<jats:p>\n                    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\n                    <jats:bold>LegNER<\/jats:bold>\n                    , 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\n                    <jats:monospace>PERSON<\/jats:monospace>\n                    ,\n                    <jats:monospace>ORGANIZATION<\/jats:monospace>\n                    ,\n                    <jats:monospace>LAW<\/jats:monospace>\n                    , and\n                    <jats:monospace>CASE_REFERENCE<\/jats:monospace>\n                    . 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.\n                  <\/jats:p>","DOI":"10.3389\/frai.2025.1638971","type":"journal-article","created":{"date-parts":[[2025,11,6]],"date-time":"2025-11-06T11:46:35Z","timestamp":1762429595000},"update-policy":"https:\/\/doi.org\/10.3389\/crossmark-policy","source":"Crossref","is-referenced-by-count":11,"title":["LegNER: a domain-adapted transformer for legal named entity recognition and text anonymization"],"prefix":"10.3389","volume":"8","author":[{"given":"Ioannis","family":"Karamitsos","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Nikolaos","family":"Roufas","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Khalil","family":"Al-Hussaeni","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Andreas","family":"Kanavos","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1965","published-online":{"date-parts":[[2025,11,6]]},"reference":[{"key":"B1","doi-asserted-by":"publisher","first-page":"10200","DOI":"10.3390\/app122010200","article-title":"Survey of text mining techniques applied to judicial decisions prediction","volume":"12","author":"Alc\u00e1ntara Francia","year":"2022","journal-title":"Appl. Sci"},{"key":"B2","doi-asserted-by":"publisher","first-page":"16","DOI":"10.32996\/jpda.2023.2.1.3","article-title":"Problems of identifying lexical and syntactic features of legal documents by undergraduate efl students","volume":"2","author":"Al-Jarf","year":"2023","journal-title":"J. Pragmat. Discourse Analy"},{"key":"B3","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2022.nllp-1.31","article-title":"Aralegal-bert: A pretrained language model for arabic legal text","author":"Al-Qurishi","year":"2022","journal-title":"arXiv"},{"key":"B4","first-page":"3","article-title":"\u201cCross-domain retrieval in the legal and patent domains: A reproducibility study,\u201d","volume-title":"43rd European Conference on Advances in Information Retrieval (ECIR), volume 12657 of Lecture Notes in Computer Science","author":"Althammer","year":"2021"},{"key":"B5","doi-asserted-by":"crossref","first-page":"281","DOI":"10.3233\/FAIA230975","article-title":"\u201cAutomatic simplification of legal texts in portuguese using machine learning,\u201d","volume-title":"Legal Knowledge and Information Systems","author":"Alves","year":"2023"},{"key":"B6","doi-asserted-by":"publisher","first-page":"307","DOI":"10.3390\/info14060307","article-title":"An intelligent conversational agent for the legal domain","volume":"14","author":"Amato","year":"2023","journal-title":"Information"},{"key":"B7","first-page":"255","article-title":"\u201cBb25hlegalsum: Leveraging BM25 and bert-based clustering for the summarization of legal documents,\u201d","volume-title":"14th International Conference on Recent Advances in Natural Language Processing (RANLP)","author":"Andrade","year":"2023"},{"key":"B8","first-page":"92","article-title":"\u201cPyeurovoc: A tool for multilingual legal document classification with eurovoc descriptors,\u201d","volume-title":"International Conference on Recent Advances in Natural Language Processing (RANLP)","author":"Avram","year":"2021"},{"key":"B9","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1007\/s10506-025-09437-x","article-title":"Semantic role extraction in law texts: a comparative analysis of language models for legal information extraction","volume":"2025","author":"Bakker","year":"2025","journal-title":"Artif. Intellig. Law"},{"key":"B10","doi-asserted-by":"publisher","first-page":"172","DOI":"10.1108\/IJLMA-08-2022-0194","article-title":"Plain language in mauritius: an empirical study of legal communication in mauritius","volume":"65","author":"Beebeejaun","year":"2023","journal-title":"Int. J. Law Managem"},{"key":"B11","doi-asserted-by":"publisher","first-page":"359","DOI":"10.52919\/altralang.v5i3.374","article-title":"Legal translation in algeria: the justice scales to the test of equivalence","volume":"5","author":"Benaouda","year":"2023","journal-title":"ALTRALANG J"},{"key":"B12","doi-asserted-by":"crossref","first-page":"11","DOI":"10.1145\/3368567.3368587","article-title":"\u201cOverview of the fire 2019 aila track: Artificial intelligence for legal assistance,\u201d","volume-title":"Proceedings of the 11th Forum for Information Retrieval Evaluation","author":"Bhattacharya","year":"2019"},{"key":"B13","first-page":"19","article-title":"\u201cExtracting contract elements,\u201d","author":"Chalkidis","year":"2017","journal-title":"16th International Conference on Artificial Intelligence and Law (ICAIL)"},{"key":"B14","doi-asserted-by":"crossref","first-page":"2898","DOI":"10.18653\/v1\/2020.findings-emnlp.261","article-title":"\u201cLegal-BERT: the muppets straight out of law school,\u201d","volume-title":"Findings of the Association for Computational Linguistics: EMNLP","author":"Chalkidis","year":"2020"},{"key":"B15","doi-asserted-by":"publisher","first-page":"1338","DOI":"10.1002\/oby.23183","article-title":"Patient provider discussions of bariatric surgery and subsequent weight changes and receipt of bariatric surgery","volume":"29","author":"Chang","year":"2021","journal-title":"Obesity"},{"key":"B16","doi-asserted-by":"publisher","first-page":"102050","DOI":"10.1109\/ACCESS.2023.3317083","article-title":"A survey on legal judgment prediction: Datasets, metrics, models and challenges","volume":"11","author":"Cui","year":"2023","journal-title":"IEEE Access"},{"key":"B17","doi-asserted-by":"publisher","first-page":"477","DOI":"10.3390\/info14090477","article-title":"A secure and privacy-preserving blockchain-based xai-justice system","volume":"14","author":"Demertzis","year":"2023","journal-title":"Information"},{"key":"B18","doi-asserted-by":"publisher","first-page":"33","DOI":"10.1007\/s12525-023-00622-x","article-title":"Promise not fulfilled: Fintech, data privacy, and the gdpr","volume":"33","author":"Dorfleitner","year":"2023","journal-title":"Electronic Markets"},{"key":"B19","first-page":"138","article-title":"\u201cPre-processing framework for twitter sentiment classification,\u201d","volume-title":"International Conference on Artificial Intelligence Applications and Innovations (AIAI), volume 560 of IFIP Advances in Information and Communication Technology","author":"Dritsas","year":"2019"},{"key":"B20","doi-asserted-by":"publisher","first-page":"704","DOI":"10.1111\/rego.12557","article-title":"Extracting and classifying exceptional covid-19 measures from multilingual legal texts: the merits and limitations of automated approaches","volume":"18","author":"Egger","year":"2024","journal-title":"Regulat. Govern"},{"key":"B21","doi-asserted-by":"publisher","first-page":"537","DOI":"10.1017\/lsi.2022.66","article-title":"The process of legal institutionalization: how privacy jurisprudence turned towards the us constitution and the american state","volume":"49","author":"Eiermann","year":"2024","journal-title":"LawSoc. Inquiry"},{"key":"B22","doi-asserted-by":"publisher","first-page":"103","DOI":"10.1007\/s41701-023-00138-x","article-title":"Building the leeds monolingual and parallel legal corpora of arabic and english countries constitutions: methods, challenges and solutions","volume":"7","author":"El-Farahaty","year":"2023","journal-title":"Corpus Pragmatics"},{"key":"B23","doi-asserted-by":"publisher","first-page":"33910","DOI":"10.1109\/ACCESS.2024.3371262","article-title":"Legal document similarity matching based on ensemble learning","volume":"12","author":"Fan","year":"2024","journal-title":"IEEE Access"},{"key":"B24","article-title":"\u201cAutomatic extraction of legal norms: evaluation of natural language processing tools,\u201d","author":"Ferraro","year":"2019","journal-title":"New Frontiers in Artificial Intelligence"},{"key":"B25","doi-asserted-by":"publisher","first-page":"527","DOI":"10.3390\/info14100527","article-title":"Comparative analysis of deep learning architectures and vision transformers for musical key estimation","volume":"14","author":"Garg","year":"2023","journal-title":"Information"},{"key":"B26","doi-asserted-by":"publisher","first-page":"119","DOI":"10.18485\/esptoday.2023.11.1.6","article-title":"Is machine translation reliable in the legal field? A corpus-based critical comparative analysis for teaching esp at tertiary level","volume":"11","author":"Giampieri","year":"2023","journal-title":"ESP Today"},{"key":"B27","doi-asserted-by":"publisher","first-page":"7620","DOI":"10.3390\/app13137620","article-title":"Abstractive vs. extractive summarization: An experimental review","volume":"13","author":"Giarelis","year":"2023","journal-title":"Appl. Sci"},{"key":"B28","doi-asserted-by":"publisher","first-page":"1","DOI":"10.5539\/ijel.v13n5p1","article-title":"Hate speech, incitamento allodio, incitaci\u00f3n al odio: Eu parallel corpora, legal discourse, metadiscourse and translation","volume":"13","author":"Giordano","year":"2023","journal-title":"Int. J. English Linguist"},{"key":"B29","first-page":"51","article-title":"\u201cMixed-domain language modeling for processing long legal documents,\u201d","volume-title":"Natural Legal Language Processing Workshop","author":"Hua","year":"2023"},{"key":"B30","article-title":"\u201cExtract-select: a span selection framework for nested named entity recognition with generative adversarial training,\u201d","author":"Huang","year":"2022","journal-title":"Findings of the Association for Computational Linguistics"},{"key":"B31","first-page":"1","article-title":"\u201cA comparative analysis of tweet analysis algorithms using natural language processing and machine learning models,\u201d","volume-title":"18th International Workshop on Semantic and Social Media Adaptation and Personalization (SMAP)","author":"Kanavos","year":""},{"key":"B32","first-page":"1","article-title":"\u201cComparative study of machine learning algorithms and text vectorization methods for fake news detection,\u201d","author":"Kanavos","year":"","journal-title":"14th International Conference on Information, Intelligence, Systems"},{"key":"B33","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2022.findings-acl.278","article-title":"Hldc: Hindi legal documents corpus","author":"Kapoor","year":"2022","journal-title":"arXiv"},{"key":"B34","doi-asserted-by":"publisher","first-page":"0254","DOI":"10.1098\/rsta.2023.0254","article-title":"Gpt-4 passes the bar exam","volume":"382","author":"Katz","year":"2024","journal-title":"Philosop. Trans. Royal Soc. A"},{"key":"B35","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2021.findings-emnlp.164","article-title":"Contractnli: A dataset for document-level natural language inference for contracts","author":"Koreeda","year":"2021","journal-title":"arXiv"},{"key":"B36","doi-asserted-by":"publisher","first-page":"648","DOI":"10.3390\/electronics13030648","article-title":"A survey on challenges and advances in natural language processing with a focus on legal informatics and low-resource languages","volume":"13","author":"Krasadakis","year":"2024","journal-title":"Electronics"},{"key":"B37","doi-asserted-by":"publisher","first-page":"e1330","DOI":"10.55908\/sdgs.v11i11.1330","article-title":"Legal regulation of the reliability and quality of translations of official documents and texts","volume":"11","author":"Kupriyanova","year":"2023","journal-title":"J. Law Sustain. Dev"},{"key":"B38","first-page":"272","article-title":"\u201cFine-grained named entity recognition in legal documents,\u201d","volume-title":"International Conference on Semantic","author":"Leitner","year":"2019"},{"key":"B39","doi-asserted-by":"publisher","first-page":"117","DOI":"10.15407\/pp2022.03-04.117","article-title":"Algebraic approach to the analysis of legal documents","volume":"4","author":"Letychevskyi","year":"2022","journal-title":"Prob. Program"},{"key":"B40","first-page":"14840","article-title":"\u201cCourt opinion generation from case fact description with legal basis,\u201d","volume-title":"AAAI Conference on Artificial Intelligence","author":"Li","year":"2021"},{"key":"B41","doi-asserted-by":"publisher","DOI":"10.5121\/csit.2024.140819","article-title":"Legal documents drafting with fine-tuned pre-trained large language model","author":"Lin","year":"2024","journal-title":"arXiv"},{"key":"B42","doi-asserted-by":"publisher","first-page":"105070","DOI":"10.1016\/j.cognition.2022.105070","article-title":"Poor writing, not specialized concepts, drives processing difficulty in legal language","volume":"224","author":"Mart\u00ednez","year":"2022","journal-title":"Cognition"},{"key":"B43","doi-asserted-by":"publisher","first-page":"424","DOI":"10.3390\/info16060424","article-title":"Enhancing text classification through grammar-based feature engineering and learning models","volume":"16","author":"Mohasseb","year":"2025","journal-title":"Information"},{"key":"B44","volume-title":"Orchestrating NLP Services for the Legal Domain","author":"Moreno-Schneider","year":"2020"},{"key":"B45","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1145\/3549737.3549751","volume":"10","author":"Mouratidis","year":"2022"},{"key":"B46","doi-asserted-by":"publisher","first-page":"135","DOI":"10.1007\/s12626-022-00102-2","article-title":"Transformer-based approaches for legal text processing","volume":"16","author":"Nguyen","year":"2022","journal-title":"Rev. Socionetw. Strat"},{"key":"B47","first-page":"257","article-title":"\u201cAI explainability. a bridge between machine vision and natural language processing,\u201d","volume-title":"Pattern Recognition. ICPR International Workshops and","author":"Oussalah","year":"2021"},{"key":"B48","doi-asserted-by":"publisher","first-page":"2133","DOI":"10.1007\/s11196-023-09989-8","article-title":"Traditional knowledge protection and digitization: a critical decolonial discourse analysis","volume":"36","author":"Paul","year":"2023","journal-title":"Int. J. Semiot. Law"},{"key":"B49","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2209.06049","article-title":"Pre-training transformers on indian legal text","author":"Paul","year":"2022","journal-title":"arXiv"},{"key":"B50","doi-asserted-by":"publisher","DOI":"10.5753\/eniac.2021.18301","article-title":"LegalNLP - natural language processing methods for the brazilian legal language","author":"Polo","year":"2021","journal-title":"arXiv"},{"key":"B51","doi-asserted-by":"crossref","first-page":"243","DOI":"10.3233\/FAIA200874","article-title":"\u201cFrom prescription to description: mapping the gdpr to a privacy policy corpus annotation scheme,\u201d","volume-title":"Legal Knowledge and Information","author":"Poplavska","year":"2020"},{"key":"B52","doi-asserted-by":"publisher","first-page":"1","DOI":"10.48550\/arXiv.1910.10683","article-title":"Exploring the limits of transfer learning with a unified text-to-text transformer","volume":"21","author":"Raffel","year":"2020","journal-title":"J. Mach. Learn. Res"},{"key":"B53","doi-asserted-by":"publisher","first-page":"109","DOI":"10.2478\/icame-2023-0006","article-title":"The corpus of contemporary english legal decisions, 1950-2021 (coceld): A new tool for analysing recent changes in english legal discourse","volume":"47","author":"Rodr\u00edguez-Puente","year":"2023","journal-title":"ICAME J"},{"key":"B54","first-page":"72","article-title":"\u201cFrom words to images through legal visualization,\u201d","volume-title":"International Workshop on AI Approaches to the Complexity of Legal","author":"Rossi","year":"2015"},{"key":"B55","first-page":"39","article-title":"\u201cAnalyzing public discourse and sentiment in climate change discussions using transformer-based models,\u201d","volume-title":"International Conference on Artificial Intelligence Applications and Innovations (AIAI), volume 754 of IFIP Advances in Information and Communication Technology","author":"Roufas","year":"2025"},{"key":"B56","doi-asserted-by":"publisher","first-page":"59","DOI":"10.1007\/s10506-021-09288-2","article-title":"Detecting and explaining unfairness in consumer contracts through memory networks","volume":"30","author":"Ruggeri","year":"2022","journal-title":"Artif. Intellig. Law"},{"key":"B57","author":"Sang","year":"2003","journal-title":"Introduction to the CoNLL-2003 Shared Task: Language-Independent Named Entity Recognition"},{"key":"B58","doi-asserted-by":"publisher","first-page":"1279794","DOI":"10.3389\/frai.2023.1279794","article-title":"The unreasonable effectiveness of large language models in zero-shot semantic annotation of legal texts","volume":"6","author":"Savelka","year":"2023","journal-title":"Front. Artif. Intellig"},{"key":"B59","author":"Sharma","year":"2018"},{"key":"B60","doi-asserted-by":"publisher","first-page":"17","DOI":"10.18355\/XL.2020.13.02.02","article-title":"Linguistic analysis of the peculiarities of the french-language legal task texts","volume":"13","author":"Sinyakin","year":"2020","journal-title":"XLinguae"},{"key":"B61","first-page":"761","author":"Skianis","year":"2020"},{"key":"B62","doi-asserted-by":"publisher","first-page":"75835","DOI":"10.1109\/ACCESS.2022.3190408","article-title":"On the effectiveness of pre-trained language models for legal natural language processing: an empirical study","volume":"10","author":"Song","year":"2022","journal-title":"IEEE Access"},{"key":"B63","doi-asserted-by":"publisher","first-page":"58","DOI":"10.24018\/ejece.2023.7.2.509","article-title":"An improved model for legal case text document classification","volume":"7","author":"Stow","year":"2023","journal-title":"Eur. J. Elect. Eng. Comp. Sci"},{"key":"B64","doi-asserted-by":"crossref","first-page":"160","DOI":"10.1007\/978-3-030-01177-2_12","article-title":"\u201cLegal document retrieval using document vector embeddings and deep learning,\u201d","volume-title":"Intelligent Computing: Proceedings of the 2018 Computing Conference","author":"Sugathadasa","year":"2019"},{"key":"B65","doi-asserted-by":"publisher","first-page":"129","DOI":"10.32996\/ijllt.2020.3.10.15","article-title":"Multilingual analysis of macrostructure in online lower court judgments of england and wales, Germany, France and Spain: a comparative summary and phraseology","volume":"3","author":"Tena","year":"2020","journal-title":"Int. J. Linguist. Literat. Transl"},{"key":"B66","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2021.findings-acl.314","article-title":"On the ethical limits of natural language processing on legal text","author":"Tsarapatsanis","year":"2021","journal-title":"arXiv"},{"key":"B67","first-page":"1235","article-title":"\u201cLEDGAR: A large-scale multi-label corpus for text classification of legal provisions in contracts,\u201d","volume-title":"12th Language Resources and Evaluation Conference (LREC)","author":"Tuggener","year":"2020"},{"key":"B68","doi-asserted-by":"crossref","first-page":"127","DOI":"10.3233\/FAIA210327","article-title":"\u201cSignal phrase extraction: A gateway to information retrieval improvement in law texts,\u201d","volume-title":"Legal Knowledge and Information Systems","author":"van der Veen","year":"2021"},{"key":"B69","first-page":"4618","article-title":"\u201cDecoding gender on social networks: An in-depth analysis of language in online discussions using natural language processing and machine learning,\u201d","volume-title":"IEEE International Conference on Big Data","author":"Vonitsanos","year":"2023"},{"key":"B70","doi-asserted-by":"publisher","first-page":"841","DOI":"10.2139\/ssrn.3063289","article-title":"Counterfactual explanations without opening the black box: automated decisions and the GDPR","volume":"31","author":"Wachter","year":"2017","journal-title":"Harvard J. Law Technol"},{"key":"B71","first-page":"38","article-title":"\u201cTransformers: State-of-the-art natural language processing,\u201d","volume-title":"Conference on Empirical Methods in Natural Language Processing: System Demonstrations","author":"Wolf","year":"2020"},{"key":"B72","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2023.emnlp-main.740","article-title":"Precedent-enhanced legal judgment prediction with llm and domain-model collaboration","author":"Wu","year":"2023","journal-title":"arXiv"},{"key":"B73","doi-asserted-by":"publisher","first-page":"15","DOI":"10.53469\/jtpes.2024.04(02).03","article-title":"Advancing legal citation text c lassification a CONV1D-based approach for multi-class classification","volume":"4","author":"Xie","year":"2024","journal-title":"J. Theory Pract. Eng. Sci"},{"key":"B74","article-title":"Automatic detection of industry sectors in legal articles using machine learning approaches","author":"Yang","year":"2023","journal-title":"arXiv"},{"key":"B75","doi-asserted-by":"crossref","first-page":"5218","DOI":"10.18653\/v1\/2020.acl-main.466","article-title":"\u201cHow does NLP benefit legal system: a summary of legal artificial intelligence,\u201d","volume-title":"58th Annual Meeting of the Association for Computational Linguistics (ACL)","author":"Zhong","year":"2020"}],"container-title":["Frontiers in Artificial Intelligence"],"original-title":[],"link":[{"URL":"https:\/\/www.frontiersin.org\/articles\/10.3389\/frai.2025.1638971\/full","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,11,6]],"date-time":"2025-11-06T11:46:41Z","timestamp":1762429601000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.frontiersin.org\/articles\/10.3389\/frai.2025.1638971\/full"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,11,6]]},"references-count":75,"alternative-id":["10.3389\/frai.2025.1638971"],"URL":"https:\/\/doi.org\/10.3389\/frai.2025.1638971","relation":{},"ISSN":["2624-8212"],"issn-type":[{"value":"2624-8212","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,11,6]]},"article-number":"1638971"}}