Contributors: Sarim Zafar, Usman Sarwar, Zafar Gilani
License: GPL 3.0
A library that classifies social media entities of Pakistan into any of the four main political entities per feature-set (Hashtags, Links, Friends, Tweets). The strength or accuracy of the classification is indicated by confidence levels in percentage.
We require the following packages:
- Miniconda - to setup a base environment for managing dependencies.
- Keras - a high-level neural networks API running atop TensorFlow and Theano.
- Theano - for mathematical backend support in Python.
- TensorFlow - for machine learning backend (Python).
- Tweepy - for accessing the Twitter APIs.
- Spyre - for web application purposes.
- scikit-learn - machine learning library for Python.
- NumPy, SciPy, matplotlib - dependencies of scikit-learn.
Miniconda is the base environment for managing dependencies for this Python project. Install Miniconda for Python 3.6 using the guide, making sure the OS and the version. Usually (yes to all questions):
sh Miniconda3.shAfter installing Miniconda, create the conda environment:
source ~/.bashrc
source activate root
conda install python==3.5.2Install dependencies:
pip install pandas matplotlib DataSpyre tweepy sklearn scipy keras
pip install scikit-learn==0.19.0
pip install tensorflow
pip install h5py
conda install numpy scipy mkl mkl-service nose
conda install theanoOnce installation of all dependencies is successful, exit the root environment and make the following change in "/home/user/.keras/keras.json":
"backend": "theano",We need to open listening access to port 8080 (required su access):
sudo ufw allow 8080Confirm if the allow action was successful:
sudo ufw statusRun the application:
cd ~/uc/
python app.pyPoint the browser to http://localhost:8080/ or a public URL (if available) with port 8080, to use the application.