arrow_backward Back to blog

Sentiment Analysis using API

The API is now available for developers who are interested in Twitter related sentiment analysis.

Support Vector Machines sentiment analysis is based on a machine learning method called Support Vector Machines(SVM). SVM is one of the most efficient supervised learning algorithms. We are using LIBSVM – a popular implementation of SVM developed at Taiwan National University.

SVM is very computational intensive and LIBSVM is implemented in C++ for performance. For Ruby and Rails, a gem called libsvm-ruby-swig is available on Github; you can install it by running “gem install libsvm-ruby-swig”. Currently, it only runs on the Linux platform.

For large scale text classification, LIBLINEAR is much more efficient. You can use the liblinear-ruby-swig gem with Ruby and Rails.

Currently three API calls are available:

Sentiment on tweets<text to analyze>
Sentiment on topics<topic to analyze>
Sentiment on users<twitter user to analyze>

The sentiment analysis API is available either as web service or as a standalone app that can be installed behind the firewall.

To try out the API calls, run the following sample code in irb:

We will be working on improving sentiment analysis accuracy, performance, and also adding additional features. Feel free to contact us for suggestions, feature requests, and bug reports.


New Project Request