Senti is a machine learning-based sentiment analysis tool designed to classify sentiment in news for a given topic or company. Users can enter a specific company and see how they performed in the news and compare it to the stock price graph in the same period.
Senti is built with Django
and React.js
.
The project uses Python NLTK
library for sentiment analysis.
- clone the project
- create an account for NYT archive api
- create an api key:
- go to account -> apps
- create an app and enable archive api
- get your api key
- in the project folder create .env file
- add the following lines and paste your key:
KEY_NYT='{your key}' DJANGO_SECRET_KEY='{our django key}'
- run the following commands (on Windows):
python -m venv venv venv\Scripts\activate.bat pip install -r requirements.txt python manage.py migrate
- open python terminal and run:
>>> import nltk >>> nltk.download('all')
- go to frontend/ and run:
npm install --save --legacy-peer-deps npm run dev
- run the script to download articles
python manage.py runscript download_nyt_articles
- run the server
python manage.py runserver