(Recommended operating systems: macOS or Linux)
Follow the steps provided below in order to get everything set up:
- Install Python
$ python3 --version
Python 3.6.7rc1
- Install Git and download this repository
$ sudo apt install git
$ git clone https://github.com/jumayel06/Tension-Analysis.git
- Download the following files from this link: https://goo.gl/PUDAKv
- model.h5
- variables.p
- stanford-corenlp-full-2018-02-27.zip
- Copy the first two files (model.h5 and variables.p) in a new folder called models.
- Copy the last file (stanford-corenlp-full-2018-02-27.zip) in the resources folder and unzip it.
- Install the following packages from terminal:
$ sudo apt install python3-pip
$ sudo apt install default-jre
$ pip3 install bs4
$ pip3 install mammoth
- Install nltk and other dependencies
$ pip3 install nltk
$ python3
> import nltk
> nltk.download('punkt')
> nltk.download('wordnet')
> exit()
- Install other packages
$ pip3 install psutil
$ pip3 install vaderSentiment
$ pip3 install numpy
$ pip3 install keras
$ pip3 install tensorflow
$ pip3 install emoji
$ pip3 install sklearn
In order to use the tension analysis tool, run the following command on the terminal:
$ python3 main.py models/model.h5 models/variables.p datasets/interview_transcripts/BertheKayitesi.docx output.csv
NOTE: The above command requires five arguments:
- main.py (this file can be found in Tension Analysis folder)
- models/model.h5 (relative path for the trained model for emotion recognition)
- models/variables.p (relative path for stored variables)
- datasets/interview_transcripts/BertheKayitesi.docx (path to the interview file)
- output.csv (Name of the output file)
The above command will analyze the provided interview transcript and generate a csv file similar like this:
Important: Provided interview transcript should be in the right format for this tool to work correctly.
Tutorial: https://goo.gl/cegbjB