Skip to content

manuelcoppotelli/SentiCheNews

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SentiCheNews

A tool for analyzing possible relationships between news and tweet sentiments.

Sapienza, University of Rome

Master of Science in Engineering in Computer Science

Data Mining class, Fall 2016

Project made with ❀ by:

You can find the related presentation on Slideshare.

You can find the related tutorial on YouTube.


Install instruction

Install python packages:

pip install -r requirements.txt --user
python -c "import nltk; nltk.download('stopwords')"
cp config.py.example config.py

Edit the config.py file by adding you Twitter API key; if you want you can also customize the other parameters.

Running

Collection of the data

In order to properly collect the data, we suggest to set the following contab entries.

0 */6 * * * /usr/bin/env python collect_news.py >/dev/null 2>&1
0 */6 * * * /usr/bin/env python collect_tweets.py >/dev/null 2>&1
0 */6 * * * /usr/bin/env python preprocess.py >/dev/null 2>&1

In alternative execute manually the scripts. A time interval of 6 hours is recommended.

Search Engine & Pearson Correlation

To run the Search Engine or the Pearson Correlation scripts, first setup the environment with the command:

python setup.py

The script setup.pywill create the inverted index from the tweets file (previously collected).

Now, you can run the Search Engine to manually find similar tweets to a given query:

python SearchEngine.py

The web interface will open in your default browser.

Instead, if want to use the Pearson Correlation script, use the following command:

python PearsonCorrelation.py

About

A tool for analyzing possible relationships between news πŸ“° and tweet 🐦 sentiments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors