Back to Top

 

Sentiment Analysis

Looking for the sentiment analysis docs? They can be found here.

Sentiment Analysis API

Sentiment is the attitude, opinion or feeling toward something, such as a person, organization, product or location. AlchemyAPI's sentiment analysis API provides easy-to-use mechanisms to identify the positive or negative sentiment within any document or webpage.

The sentiment analysis API is capable of computing document-level sentiment, sentiment for a user-specified target, entity-level sentiment, quotation-level sentiment, directional-sentiment and keyword-level sentiment. These multiple modes of sentiment analysis provide for a variety of use cases ranging from social media monitoring to trend analysis.

AlchemyAPI's sentiment analysis algorithm looks for words that carry a positive or negative connotation then figures out which person, place or thing they are referring to. It also understands negations (i.e. "this car is good" vs. "this car is not good") and modifiers (i.e. "this car is good" vs. "this car is really good"). The sentiment analysis API works on documents large and small, including news articles, blog posts, product reviews, comments and Tweets.

Want to test out our sentiment analysis API?

Sentiment Analysis Example:

The iPhone 4 boasts a glass screen that Apple claims is stronger than plastic and more resistant to scratches. But its durability--and scratch resistance--has yet to be tested by users' everyday wear. Already, there are reports that the iPhone's screen smudges easily and fails to withstand "shock and sudden impact." CNET writes in its early review of the iPhone 4, "The glass attracts smudges by the ton and durability remains a concern." iFixyouri warns the iPhone's design could make its glass screen susceptible to shattering: "On the new iPhone, the glass basically sits on top of the aluminum frame. On the old iphone, it was recessed and protected by a chrome bezel."

excerpt from: http://www.huffingtonpost.com/2010/06/22/iphone-4-review-the-worst_n_620714.html#s103623title=Its_Screen

Analyzed Item Target Sentiment
Overall Document Mixed
iPhone Entity Mixed
Apple Entity Mixed
glass screen Keyword Negative
old iphone Keyword Positive
new iphone Keyword Negative
fails to withstand Directional Negative
CNET Quote Quotation Mixed

Target Options:

Document

AlchemyAPI can calculate the sentiment for the overall document to determine if it's generally more positive or more negative.

User Specified Target

Users can specify a target (i.e. a brand name), and AlchemyAPI will calculate the sentiment in regards to that target.

Entity and Keyword Level

Sentiment can be calculated for each entity and keyword as part of the entity extraction API and keyword extraction API calls.

Relational

In the relation extraction API, sentiment can be calculated for the subject, object and location.

Quotations

If quotation extraction and sentiment analysis is enabled on the entity call, the sentiment will be returned for each extracted quotation.

Directional

In the relation extraction API, the sentiment from the Subject to Object can be calculated. For example, the phrase "Bob sued Susan" has a negative sentiment from Bob to Susan.

Features:

Language Support

AlchemyAPI supports sentiment analysis for content written in English, German and Spanish, with additional languages in development.

Response Formats

Sentiment analysis data can be returned in either JSON, XML or RDF formats to fit the needs of your application.