Real Time Company Sentiment Analysis and Forecasting - Day by day sentiment(positive/negative/neutral) of the company (or query).
- Clone this repo to your local machine using
$ git clone https://github.com/Ar9av/streaming_data_nlp_pipeline.git
change the working directory
$ cd streaming_data_nlp_pipeline
- Install the requirements using the following commands
$ pip install -r requirements.txt
- Make sure you have Redis
In case not , Run the following to install and start redis-server
$ cd
$ wget http://download.redis.io/releases/redis-6.0.6.tar.gz
$ tar xzf redis-6.0.6.tar.gz
$ cd redis-6.0.6
$ make
$ src/redis-server
Once the redis server is started
Cange the parameters in config.yml
and change the COMPANY_NAME
to the desired query and run the following command.
- Now in different terminal windows run the following:
$ python consumer/consumer.py
$ python time_series_analytics/time_series.py
$ python producer/prod.py
If the above throws error , probably you have different versions of python installed in your system.
Replace python
with python3
NOTE: Maintain the order of run to get the result instantenously as new results take time.
The windows should look something like this producing the necessary output.
3 tasks :
1) Scraping Data (prod.py
)
2) Sentiment Analysis (consumer.py
)
3) Time Series Forecasting (time_series.py
)
Run in async matter but waits for the response from others through 3 redis channels which is used for publishing and listening.