The purpose of this project is to extract the personality of a person using Transformers on labeled text data of the Big Five model.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
What things you need to install the software and how to install them
conda create --name <env> --file requirements.txt
or
install pandas, numpy, pytorch, transformers, simpletransformers, (optional) ktrain
Data can be found in the data
folder. There is 3 datasets:
Essays
FriendsPersonality (but finally not used)
myPersonality
Source code can be found in the src
folder.
- Useful code, result used for the paper:
data.py
: contains code to preprocess and format the datasimpletransformers_train.py
: file used to train every model with different parameters. Almost all good results come from this filesimpletransformers.ipynb
: Test of simpletransformers before implementation in the python fileSeminar_Chatbot_Demo.ipynb
: File used for the demo, using the model of cCON and cEXT, on google colab.main.py
: self-made training using RoBERTa modelpredict.py
: predict data using model get frommain.py
- Test code, finally not used for the paper:
ktrain.ipynb
andktrainv2.ipynb
: Test of using the ktrain librarytest1.ipynb
,test2.ipynb
,v1.ipynb
,v2.ipynb
: Test file of different model
To test the training, use simpletransformers_train.py
and uncomment / change the different array at the beginning of the file. To test a model, use Seminar_Chatbot_Demo.ipynb
and change the folder dir and the name of the model when creating ClassificationModel
- Thomas Schaller
This project is licensed under the MIT License
This is paper is a student work, written for Seminar "Chatbots and Conversational Agents" of the university of Fribourg, under the supervision of Jacky Casas and Prof. Dr. Elena Mugellini, HumanTech Institute, University of Applied Sciences of Western Switzerland, Switzerland, 2020.