Detection of Vulgar and Offensive Comments Using Tries in C++
摘要
The widespread use of digital platforms and social media has made them primary spaces for communication, but they also present challenges in managing inappropriate language. Offensive comments foster hostility, negatively impacting both individual users and the broader online community. A significant drawback of employing machine learning methods such as CNNs or BERT is their decreased effectiveness in identifying offensive words or slang which evolve quickly. Conversely, Tries data structures are highly efficient for real-time updates and can handle dynamic datasets with ease, adapting seamlessly as the dataset evolves. This research introduces a system for detecting vulgar and offensive language in user comments using a trie-based data structure implemented in C++. The trie efficiently stores offensive words, enabling fast and accurate detection during comment moderation. By processing comments character by character, the system flags inappropriate language in real time. This approach ensures scalability and efficiency in large datasets, making it suitable for real-time applications where speed and accuracy are crucial. The system is highly adaptable, offering a strong foundation for future content moderation improvements and contributing to safer digital environments.