Traditional content moderation is slow, inconsistent, and unscalable. CyberShield is a prototype NLP classification system that detects cyberbullying across 6 categories in Twitter text, with interpretability and ethical accountability built in from the start, not added as an afterthought.
End-to-end NLP pipeline on a Cyberbullying Tweets dataset. Text cleaned via lowercasing, punctuation removal, stopword filtering, and tokenisation. TF-IDF vectorisation with unigrams and bigrams to capture short semantic patterns. Multi-class classification across 6 categories: ethnicity, religion, age, gender, other cyberbullying, and not cyberbullying. Evaluated using classification report, confusion matrix, and per-class F1 scores. Top TF-IDF weighted features extracted per class to surface what signals drive predictions, making the model auditable rather than opaque. Deployed as a Gradio interactive prototype with real-time text classification. Dedicated ethical analysis covering explainability trade-offs, cultural bias in western-centric training data, and responsible deployment constraints.
81% overall accuracy (macro F1: 0.81). Explicit hate categories performed strongly (ethnicity F1=0.97, religion F1=0.95, age F1=0.96) because direct hate language is reliably detectable by lexical features. Ambiguous categories performed lower: not_cyberbullying F1=0.55, other_cyberbullying F1=0.59: sarcasm, irony, and coded language fall outside TF-IDF's context window. The model is suitable for flagging explicit content for priority review; automated disciplinary actions without human oversight are explicitly out of scope.
I'd extend to transformer-based embeddings to handle sarcasm and context-dependent language, the places where bag-of-words representations systematically fail.