Skip to content

This is a basic sentiment analysis API. It is mean to illustrate how easy is to create, deploy, manage, control and monitor API using the free 3scale's management solution.

Notifications You must be signed in to change notification settings

solso/sentiment-api-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sentiment API Example

This is a very basic API that returns the sentiment value of a word or a sentence. You can define the sentiment value of any additional word that is not in the dictionary.

The API is meant to serve an example of how you can easily create an API, and how you can use the free 3scale platform to control, manage and monitor the operations of the API so that you only have to do the fun part.

The original sentiment values are taken from the dataset AFINN-111.txt from Denmark Technical University

Usage

Start the API...

ruby ./sentiment-api.rb 8080

Call one method of the API with curl (or with your browser if you want)

curl -X GET -g "https://localhost:8080/v1/word/fantastic.json

The above call returns

{"word":"fantastic","sentiment":4}

About

This is a basic sentiment analysis API. It is mean to illustrate how easy is to create, deploy, manage, control and monitor API using the free 3scale's management solution.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages