Positive news aggregator built on sentiment analysis in TensorFlow and Keras with an RNN to sort news feed. Extracts keywords with scikit-learn and NLTK to perform topic modelling, web scraping with Python for data.
We train an RNN on the IMDB large movie review dataset for sentiment analysis. The raw text is preprocessed, then fed into the model. The model is used to predict the positivity of a given news article, with the most positive being displayed first. Additionally, Latent Dirichlet Allocation is used for topic modelling and keyword extraction.
Article Title | Keywords | Score |
---|---|---|
Rashford's free school meals victory 'chance to end holiday hunger' | school, meal, free, england, voucher | 0.936 |
How football can help displaced people 'heal, develop and grow' | refugee, football, photo, participant, goal | 0.4019 |
Michael Irving: Teens jailed for 'Trojan horse trap' murder | hair, twitter, footballer, sharp, post | -0.9442 |
How to run the application
- Clone the repository.
- Open constants.py and adjust the values as desired.
- Run main.py with
python main.py
. The output data is saved in data/sentiment.csv.
- TensorFlow - Deep Learning
- NLTK - Natural Language Processing
This project is licensed under the MIT License - see LICENSE file for details.