We use the excellent combination of Huggingface transformers and fast.ai with
SemEval-2019 Task 3 description:
"Lack of facial expressions and voice modulations make detecting emotions in text a challenging problem. For instance, as humans, on reading "Why don't you ever text me!" we can either interpret it as a sad or angry emotion and the same ambiguity exists for machines. However, the context of dialogue can prove helpful in detection of the emotion. In this task, given a textual dialogue i.e. an utterance along with two previous turns of context, the goal was to infer the underlying emotion of the utterance by choosing from four emotion classes - Happy, Sad, Angry and Others. To facilitate the participation in this task, textual dialogues from user interaction with a conversational agent were taken and annotated for emotion classes after several data processing steps."
Setting up the virtual environment first:
$ pip install virtualenv
$ virtualenv venv
$ source venv/bin/activate
(venv) $ pip install ipykernel
(venv) $ ipython kernel install --user --name=projectname
Then install github repository and requirements:
$ git clone https://github.com/PhilippMaxx/semeval2019_task3
$ cd semeval2019_task3
$ pip install requirements.txt
Then start jupyter notebook:
$ jupyter notebook
You can run everything inside of the notebooks.
- For customization work for fast.ai and Bert only open the notebook 00_fastbert.ipynb
- For the SemEval-2019 Task 3 work open the notebook 01_task3.ipynb
automatically created by nbdev: Documentation
Jupyter notebooks explaining the customizationand the task:
- 00_fastbert.ipynb
- 01_task3.ipynb