This library performs sentiment analysis from a graph theory perspective on fan's tweets before a football match.
SentiFootball needs the next libraries to work:
- Emoji - Emoji library for python
- Matplotlib - 2D graphics library
- Networkx - Complex networks package
- Nltk - Natural language processing with python
- Numpy - Scientific computation package
- Scipy - Mathematics and science environment
- Seaborn - Data visualization library
- Stanza - Stanford NLP package
- WordCloud - Word cloud generator with python
export TW_KEY=""
export TW_SECRET=""
├── GB
│ ├── 2019
│ │ ├── 38
│ │ │ ├── 1595772340_ARSWAT_neutral.json
│ │ │ ├── 1595772552_ARSWAT_positive.json
│ │ │ ├── 1595772607_ARSWAT_negative.json
│ │ │ ├── 1595773332_BURBHA_negative.json
│ │ │ ├── 1595773344_BURBHA_positive.json
│ │ │ ├── 1595773360_BURBHA_neutral.json
Querying Twitter before a match can be performed by running.
python search_twitter.py --home_team_id --away_team_id --week
python search_twitter.py CHE LIV 2
Note: GB/GB_twitter.json contains the 3 letter code of the teams.
This command creates a whole dataset of all tweets in a week.
python maps_tweets.py --country --season --week
python maps_tweets.py GB 2020 2
This command creates a clean dataset and classifies tweet's polarity and support to a team.
python process_tweets.py --country --season --week
python process_tweets.py GB 2020 2
visualization_sentiment.ipynb contains some visualizations of the weekgame.
graph_sentiment.ipynb contains some visualizations of the weekgame from a graph theory perspective.