Skip to content
This repository was archived by the owner on Nov 16, 2021. It is now read-only.

flaxel/sentiment_analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

73 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Sentiment Analysis

This project contains all the data to analyze a text, whether it is positive or negative.

Getting Started

These instructions will get you a copy of the project on your local machine for development.

Prerequisites

The project is created with the programming language Python3 and the manager pipenv.

Installing

To install all the necessary dependencies, the following command must be executed in the project.

# create virutal environment
python -m venv .venv

# activate virtual environment
.venv\Scripts\activate.bat # on windows
source .venv/bin/activate # on unix or macos

# installing necessary dependencies
pipenv install --dev

# optional: installing trained spacy pipeline
pipenv run python -m spacy download en_core_web_trf

Usage

You can have a first look at the data if you execute the following command:

python first_look.py

If you want to pre-process the raw data, you can run one of the pre-processing scripts for the tweets or the film reviews.

python preprocess_tweets.py
python preprocess_reviews.py

The preprocessed data can be analysed with the ensemble methods and the raw data with the huggingface transformer models. Afterwards, the results and graphics can be saved with the option -s.

python analysis_ensemble.py <-s>
python analysis_transformer.py <-s>

The cache for the downloaded models of the transformers can be set with the following environment variable:

TRANSFORMERS_CACHE=../.cache/huggingface/

About

project to analyse the sentiment of a text ๐Ÿ‘ฟ๐Ÿ˜‡

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages