Skip to content

jumayel06/Tension-Analysis

Repository files navigation

Getting Started

(Recommended operating systems: macOS or Linux)

Follow the steps provided below in order to get everything set up:

  1. Install Python
$ python3 --version
Python 3.6.7rc1
  1. Install Git and download this repository
$ sudo apt install git
$ git clone https://github.com/jumayel06/Tension-Analysis.git
  1. Download the following files from this link: https://goo.gl/PUDAKv
  • model.h5
  • variables.p
  • stanford-corenlp-full-2018-02-27.zip
  1. Copy the first two files (model.h5 and variables.p) in a new folder called models.
  2. Copy the last file (stanford-corenlp-full-2018-02-27.zip) in the resources folder and unzip it.
  3. Install the following packages from terminal:
$ sudo apt install python3-pip
$ sudo apt install default-jre
$ pip3 install bs4
$ pip3 install mammoth
  1. Install nltk and other dependencies
$ pip3 install nltk
$ python3
> import nltk
> nltk.download('punkt')
> nltk.download('wordnet')
> exit()
  1. Install other packages
$ pip3 install psutil
$ pip3 install vaderSentiment
$ pip3 install numpy
$ pip3 install keras
$ pip3 install tensorflow
$ pip3 install emoji
$ pip3 install sklearn

For Users

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:

  1. main.py (this file can be found in Tension Analysis folder)
  2. models/model.h5 (relative path for the trained model for emotion recognition)
  3. models/variables.p (relative path for stored variables)
  4. datasets/interview_transcripts/BertheKayitesi.docx (path to the interview file)
  5. 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published