Belcastro, L., Cantini, R., Marozzo, F., Talia, D., & Trunfio, P. (2020). Learning political polarization on social media using neural networks. IEEE Access, 8, 47177-47187.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Python 3.7
- Install requirements
pip install requirements.txt
- Run IOM-NN
python twitter_opinion_miner.py
In the input/
folder we provide a dataset containing tweets collected from the state of Colorado before the 2016 US presidential elections.
Unzip it into the input/
folder before running IOM-NN. Each row of the dataset represents a tweet and is a json string formatted as follows:
{
"id":"id",
"text":"tweet text",
"date":"date",
"user":{
"id":"user_id",
"name":"",
"screenName":"",
"location":"",
"lang":"en",
"description":""
},
"location":{
"latitude":0.0,
"longitude":0.0
},
"isRetweet":false,
"retweets":0,
"favoutites":0,
"inReplyToStatusId":-1,
"inReplyToUserId":-1,
"hashtags":[
"hashtag"
],
"lang":"lang",
"place":{
}
}
constants.py
contains all the parameters used in the methodology. Changing them will influence the obtained results.