Two approaches to text classification
Classic NLP relies on hand-crafted features. Modern NLP uses pretrained transformers. I wanted to see how much the gap matters in practice.
TF-IDF + Logistic Regression
A bag-of-words TF-IDF representation with logistic regression is fast, interpretable, and needs little data. NLTK handled tokenization and stopword removal.
Fine-tuning BERT
I fine-tuned a BERT-base model on the same review dataset. Hugging Face's Transformers library made the pipeline straightforward.
Results
- TF-IDF + LR: strong baseline, trains in seconds, easy to interpret.
- BERT: higher accuracy, especially on nuanced reviews, but slower and data-hungry.
When to use which
For a quick prototype or a small dataset, TF-IDF is hard to beat. When you have enough data and need every bit of accuracy, BERT is worth the cost.
Takeaways
Start simple, measure, then decide whether the transformer is worth the complexity.



