Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

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 original sentiment values are taken from the dataset AFINN-111.txt from Technical University of Denmark

Version 0

This is version 0. See the full version lists here.

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 "http://localhost:8080/v1/words/fantastic.json

The above call returns

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