Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

COMP5423 NATURAL LANGUAGE PROCESSING

Lab1 Homework: Emotion Classification

Due date: 11:59pm, 26/2/2023 (Sunday)

Group Size: Individual

Homework Objective

The goal of this homework is to learn how to process the text data and classify the emotion of a text input. For example, “I feels so lame” reflects a sadness” emotion. We provide an emotional classification dataset(data.zip). In the Kaggle dataset, each sentence is labelled with one emotion (joy, fear, love, anger, sadness, surprise). The dataset includes training (train_data.txt), validation (val_data.txt), and testing set (test_data.txt), respectively. The training and validation sets are labeled, and the testing data is not labeled.  Their basic statistics are as below:

 

#train

#validation

#test

marks

Kaggle

16000

2000

2000

Labelled with emotions

Requirements

(1) Process the text input.

(2) Design your method to classify the emotions.

(3) Compare and analyze models’ performance (e.g., the classification accuracy on the validation set).

(4) If possible,  design  an  UI  system  (like  via  the  Web  programing  or  a  simple  command environment) for your method. Specifically, for each input sentence, when you classify its emotion, we hope your UI system can choose a corresponding emoji (for the joy emotion, the corresponding emoji may be a smile face) to show the predicted emotion.

(5) Participate theKaggle competition.

What to Hand in and Grading Scheme

Pack all files in one zipped file with the clear name for each file and submit I to Blackboard.

1.   (55%) The Source Code of Your Program (including UI system)

(1) A readme file describes the structure of your program and how to run it.

(2) Add annotations in the front of each (Python) file to specify its usage.

(3) Clear comments of your code.

2.   (40%) Report

(1) How you process the text input.

(2) How you classify the emotions.

(3) The results on the test set.

(4) The UI system. Describe its function and its workflow. Some screenshots are necessary. (online systems are not necessary)

3. (5%) Predicted result on the test set and a screenshot of your ranking under Leaderboard along with your name in the competition.

Submit a txt file named test_prediction.csv, where each line is the predicted emotion of the corresponding text in the test_data.txt. We provide a submission csv file that you can refer to (sample_labels.csv).

Remarks*:

1.   A good accuracy on the test set dont guarantee a high score of this project, your design and a clear description of your design are also valuable.

2.   You can implement this conversational system with the assistance of external knowledge

3.   You are strongly recommended to implement the system in Python.

Reference:

1.   Related Work:

•   Affect Analysis Model: novel rule-based approach to affect sensing from text

•  Finding People with Emotional Distress in Online Social Media: A Design Combining Machine Learning and Rule-Based Classification.

•   MojiTalk: Generating Emotional Responses at Scale

•   Emotional Chatting Machine: Emotional Conversation Generation with Internal and External Memory

2.   Free GPU resources:

•  Baidu PaddlePaddle:courese registerationtutorialusage

•  Google Colab:tutorialusage

•  Kaggle Kernel:tutorialusage

• FolydHub:usage