Checklist HAIO 2024 Summer National Final · NLP-2 task
Twitter Sentiment Analysis
English title: Twitter Hangulatelemzés
Explore and clean the Sentiment140 tweets and train a logistic-regression sentiment classifier.
The task
John Intelligent has not discovered emojis and must infer the sentiment of tweets from their text. The data are the Sentiment140 tweets with target 0 (negative) or 4 (positive).
Task 1 (14 points): re-encode the target to 0/1 (1), split into 20% test and 80% training data without changing the order (2), print five negative and five positive training tweets (1), tokenise both sets with torchtext get_tokenizer (2), count unique training tokens (1), and plot the 100 most frequent (2) and the 100 least frequent (2) training words. Task 2 (10 points): remove punctuation (1), stop words (2), words that occur only once (2) and user mentions (@USER_ID) (4) from the training set, then re-tokenise both sets (1).
Task 3 (6 points): train sklearn LogisticRegression with the "saga" solver on the training set (2) and evaluate it on the tokenised test set with predict (4).
Abridged by SOTA from the official materials. The official statement has the exact rules, and it wins wherever this summary differs.
At a glance
- You get
training.1600000.processed.noemoticon.csv(Sentiment140, 1.6 million tweets; columns target, id, date, query, user, text).- You submit
- The completed notebook.
- Scoring
- 30 points in total (14 + 10 + 6); graded by the organisers.
- Rules
- Keras and TensorFlow are not allowed; any PyTorch-based tool may be used.
- The train/test split must preserve the order of the data.
- Format
- Summer National Final (Nyári Országos Döntő), held on site at the ELTE Faculty of Informatics, Budapest, on 30 May 2024. Solved in Google Colab; the completed notebook is downloaded as .ipynb and uploaded, zipped together with the other solutions, to the CMS.