Git Product home page Git Product logo

sentimentapi's Introduction

sentimentAPI

Copyright (c) by respective owners. All rights reserved.  Released under license as described in the file LICENSE.txt

sentimentAPI is a python based text sentiment analysis api that you can use to test the positivity/negativity of a body of text. You pass it text and get back a float score representing the sentiment of the text you passed in. Scores equal to 0 and higher are positive, higher the score the more positive the statement. Scores less than 0 are negative, lower the more negative.

Build Status Scrutinizer Code Quality

Features

Important

  • Memory required to compile scipy is around 2-3G. Make sure you have at least that.

Install Ubuntu

# update repos
sudo apt-get -y update

# install git
sudo apt-get -y install git

# install python and stuff python needs to compile packages
sudo apt-get -y install python-dev python-pip libblas-dev liblapack-dev libatlas-base-dev gfortran

# install python requirements
export LC_ALL=C
sudo pip install -U setuptools
sudo pip install -U numpy scipy scikit-learn sklearn cython falcon gunicorn gevent

# move to your install dir
cd /opt

# pull code
git clone https://github.com/mikelynn2/sentimentAPI.git

# start it up
cd /opt/sentimentAPI
gunicorn -c gunicornSettings.py sentimentAPI:app

# simple test
curl -H "Content-Type: application/json" -X POST -d '{"text":"thats great!"}' http://127.0.0.1:8000/api/sentiment/v1

# file json test
curl -vX POST http://127.0.0.1:8000/api/sentiment/v1 -d @example.json --header "Content-Type: application/json"

# load test
ab -p example.json -T application/json -c 10 -n 2000 http://127.0.0.1:8000/api/sentiment/v1

Settings

All settings are located in gunicornSettings.py. They mostly deal with the API serving

sentimentapi's People

Contributors

mikelynn2 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.