BRIDGING RULE-BASED PRECISION WITH AI INTELLIGENCE: ENHANCING NLP WITH REGULAR EXPRESSIONS AND MACHINE LEARNING
Aarthi V. M, Arjunan R, T Divyasree, Manigandan R, V Muruganantham, Venkata Balaji R, M Nilan · 2025
Natural Language Processing (NLP) has emerged as a fundamental element of contemporary artificial intelligence, enabling systems that vary from chatbots to sentiment analyzers [1].Transforming unstructured text into organized, clean input is essential for attaining optimal performance in NLP tasks [2]. Regular expressions (RegEx) provide a rule-based, interpretable, and quick method for text tokenization, cleansing, and pattern extraction [3]. However, despite their effectiveness, RegEx methods are constrained by their failure to manage linguistic ambiguity and the variability present in natural language [4]. In comparison, machine learning (ML) models, particularly deep learning structures like BERT and LSTMs, offer strong semantic comprehension but necessitate vast amounts of training data and computational resources [5]. This document presents a hybrid framework that combines the rapid, rule based accuracy of RegEx with the profound semantic abilities of ML models to improve the overall performance of NLP systems [6]. We present a thorough literature review, elaborate algorithmdesigns complete with pseudocode, examples of code implementations, and an enhanced system architecture that remedies the limitations of existing methods [7]. The suggested method is assessed on benchmark tasks including sentiment analysis, named entity recognition (NER), and spam detection, demonstrating considerable advancements in both accuracy and efficiency [8].