- What is NLP?
- Deep Learning
- White Papers
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.
Example sentiment analysis on a news article
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."
|fails to withstand||Directional||Negative|
AlchemyAPI can calculate the sentiment for the overall document to determine if it's generally more positive or more negative.
Users can specify a target (i.e. a brand name), and AlchemyAPI will calculate the sentiment in regards to that target.
Sentiment can be calculated for each entity and keyword as part of the entity extraction API and keyword extraction API calls.
In the relation extraction API, sentiment can be calculated for the subject, object and location.
If quotation extraction and sentiment analysis is enabled on the entity call, the sentiment will be returned for each extracted quotation.
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.
AlchemyAPI supports sentiment analysis for content written in English and German, with additional languages in development.
Sentiment analysis data can be returned in either JSON, XML or RDF formats to fit the needs of your application.