This is a web application called Sentiment Analyzer and is built on the Django framework.
Installations required:
- Download and install Python version 3.5.3 and above.
- From the Python CLI create a virtual environment using: pip install virtualenvwrapper
- Make a virtual environment with the command (where py1 is the name of the virual environment): mkvirtualenv py1
- Switch to this environment using: workon py1
- Install Django in this environment using: pip install django
- Change directory to the folder that contains the project files and use the command (where ‘mypro’ is the name of the project): django-admin startproject mypro
- Change directory to the project file created in step 6.
- Install Tweepy package using: pip install tweepy
- Install Scikit learn package using: pip install -U scikit-learn
- Install Numpy package using: pip install numpy
- Install Pandas package using: pip install pandas
For first time execution: Execute all the .ipynb files. These create the machine learning model needed and the preprocessors as .sav files which will be used further.
In order to execute the project files following are the steps:
- Open the command prompt.
- An optional step is to activate the virtual environment created. Change the directory to py1 which is now a folder in the ‘Envs’ folder of the system and type the command: activate
- Change the directory to ‘mypro’.
- Start the server with the command: python manage.py runserver
- Open the browser and type the URL: http://localhost:8000/LSVC/home/
- The web API is now ready to use. Choose and option: 'Compare Products' or 'Compare Brands'.
- Fill the form with the input and submit by clicking 'Get Review Analysis'.
- The output is shown on the browser.