Click the link below to see the dynamic view of the report:
https://nbviewer.jupyter.org/github/gujral1997/twitter_sentimental_analysis/blob/master/tsa.ipynb
- Anaconda
- python2 and python3
- json2csv
- model.pkl (pre-trained model)
Click here to install anaconda
Click here to install json2csv
Click here to download model.pkl
- Create you twitter api from here
- After that open
mining_script.pyand addconsumer_key,consumer_secret,access_tokenandaccess_secret. - You can edit geographic location. date, phrases you want to search in the same file.
- Tweets mined by the script will be in JSON format
Note: Use python3 to run the above script.
Run json2csv -i input_file.json -f text -o output_file.csv in your teminal to conver input json file into csv.
- Rename
non_tech_pred.csvinmodel.pyto your own csv filename. - Copy
model.pklin root directory of the project. - Run
model.py
Note: Use python2 to run the above script and your working directory should be root directory of the project.