MACHINE LEARNING
NLP CLASSIFIER
A specialized machine learning pipeline for topic classification and language detection across English, Tagalog, and Cebuano using BERTopic and BART models.
Overview
Overview
This project tackles the complexity of multi-dialect natural language processing. It combines a custom language detection model with advanced Transformer-based topic extractors to accurately classify unstructured text in code-switched environments.
Architecture
Architecture
Tech Stack
Tech Stack
Python
FastAPI
BERTopic
BART-Large-MNLI
Scikit-Learn
Design Decisions
Design Decisions
The backend API leverages FastAPI to serve heavily cached .pkl model states. By pre-training the Logistic Regression, LDA, and BERTopic embeddings, the system reduces cold-start latency and can route input text to the correct model based on instant language identification.
Model Metrics
Model Metrics
Performance Statistics
Performance Statistics
Language Detection Accuracy: 96.67%
LDA Classification Accuracy: 62.00%
BART Zero-Shot Accuracy: 100.00%
Trilingual BERTopic assignment rate: 70.22%
Why the discrepancy? The traditional LDA model (62%) relies on simple word frequencies (bag-of-words), which severely struggles with short, code-switched text (Taglish/Bislish). In contrast, the BART model (100%) and our custom N-gram Language Detector (96%) leverage deep contextual embeddings, allowing them to perfectly understand semantic intent across multiple dialects. Finally, the 70% BERTopic assignment rate means the model successfully grouped 70% of the raw documents into highly coherent topics while filtering out the remaining 30% as low-quality noise.
Accuracy Overview
Accuracy Overview
