A web application powered by Machine Learning capable of determining the sentiment of a comment.
- Framework: Bootstrap
- Programming language(s): Python
- App framework: Flask
- Distributed memory caching: Memcached
- Data processing and Machine Learning: sklearn, numpy, pandas
- HTTP Load Balancing: NGINX
- Deployment: Docker, AWS
- Preprocess a data file of natural language sentences
- Train a Machine Learning model based on the processed data
- Evaluate natural language sentences to extract sentiments and confidence scores
$ docker-compose up
The application can be found at http://localhost:5000/
Make sure you have installed these following prerequisites on your computer:
- Python 3.6 or later. You can download different versions of Python here: http://www.python.org/getit/
pip
virtualenv
$ virtualenv venv --python=python3.8
$ source venv/bin/activate
pip install -r requirements.txt
$ python run.py
Comment Sentiment Detector can be used either as a web application, APIs, or scripts.
- Web application: The application can be found at http://localhost:5000/
- APIs: APIs for backend usage can be found here. For example, send a
POST
request to/api/v1/sentiments/predict
to evaluate sentiment of a text, example request body:
{
"text": "this is awesome!"
}
A JSON object with the detected sentiment and confidence score will be returned.
- Scripts: preprocess data, train model
- Implement APIs for preprocessing data and training model
- Provide detailed API specs for backend usage