0%
Project: End-to-End Sentiment Analysis

Project: End-to-End Sentiment Analysis

A complete project on French-language movie reviews: data, a TF-IDF baseline, a fine-tuned CamemBERT, a confusion matrix, and error analysis.

10-15 min

The previous nine lessons introduced separate pieces. This project assembles them around a single problem, from loading the data to discussing the final model's errors. This is the exercise that matters, because in a real project the difficulty is never an isolated technique: it lies in the sequence, where each decision constrains the next ones.

The goal is to classify movie reviews written in French by polarity. The corpus is real: it consists of reviews published on Allociné, collected and distributed under the name allocine on the Hugging Face Hub, with two classes, negative and positive, derived from the ratings their authors gave. This last point is important and will be discussed: the label is not an expert annotation of the text, it is a rating turned into a category, and that creates a particular kind of error.

The method follows a non-negotiable order. You look at the data before modeling. You set a dumb baseline, then a serious non-neural one. Only then do you train a transformer, and you compare it to the baselines on the same test set, opened only once. Finally you read the errors, categorize them, and explicitly test the model's robustness on cases built to make it fail.

Link copied!