Showing posts with label api. Show all posts
Showing posts with label api. Show all posts

Thursday, August 13, 2009

Sentiment API Exposes Web’s Feelings

I recently wrote this article for Evri's blog. I'm reproducing it here in its entirety for the reading pleasure of all you ChaloBolo-ites.

--

Every minute of every day people are expressing their sentiments and writing them down in news articles, blog posts, and other web content. Many people are too famous to write down their sentiments, but journalists, bloggers and other content creators are more than willing to document their feelings. Often times a famous radio commentator will bash a politician, or a politician will thrash a Hollywood actress. And on occassion, a true act of heroism will be recognized, and all sorts of famous folk will follow up with praise. Whether depressing or uplifting, disturbing or unnerving, tapping in to the sentiments of key actors on the world stage can be highly informative and engaging.

I'm excited to announce the release of our new sentiment web API which lets you build applications around the sentiments of specific entities (i.e. people, places, or things) as well as categories, or facets. Every minute of every day, Evri's systems are busy scouring the web, reading news content, blog posts and more so you don't have to. Now, Evri's system is also understanding the sentiments, or positive and negative expressions by and about entities. Many types of applications can be built using the sentiment API in areas including, but not limited to: market intelligence, market research, sports and entertainment, brand management, product reviews and more. Specifically, Evri's new sentiment API lets you:
  • Find the percentage of positive and negative expressions of sentiment made by an entity, or about an entity. For example, find out what percentage of things being written about the iPhone are positive and which percent are negative.
  • Discover who is criticizing and who is praising a particular person, place or thing. For example, see who is criticizing and praising Microsoft right now.
  • Read what praisers and critics are saying about an entity. For example, see what the GOP are saying about the Democrats.
  • Discover who or what your favorite entity is bashing and why. For example, see who Lance Armstrong is complaining about.
  • Discover who or what your favorite entity is praising and why. For example, see who the World Health Organization is commending and why.
Now, as an exploratory exercise, or tutorial, on how to use the API, I will walk through the calls needed to make a widget called the Vibology Meter. So, imagine the widget below is externally configured to be about the entity Barack Obama corresponding to the Evri URI: /person/barack-obama-0x16f69. Upon first load, you see something that looks like this:

From the above screenshot, we can see that the percentage of positive sentiment and negative sentiment expressed by Barack Obama are displayed. We can also see the specific top entities being praised by Barack Obama in the left column, and the specific entities being criticized in the right column. For example, from the above screenshot, we see that Barack Obama is criticizing the GOP, Rush Limbaugh, the ACLU, Al Zawahiri, and Israel. In order to render the screenshot above, this sentiment summary information is returned by the following REST API resource call:

/v1/sentiment/summary?sentimentSource=/person/barack-obama-0x16f69&includeSummaryDetails=true&sort=date

Now, consider the use case outlined in the screenshot below, where the user clicks on [Anything] under the positive vibes sentiment. In order to get the results outlined to the right of the positive and negative sentiment columns, we execute a resource request like:

/v1/sentiment/about?sentimentSource=/person/barack-obama-0x16f69&sentimentType=positive&sort=date

From this request URI, we see that the sentimentSource references Barack Obama, meaning we are interested in vibes or sentiment expressed by Obama, as opposed to about him. Next we see the sentimentType is set to positive, meaning we are interested in positive sentiment expressions. Finally, we see sort=date meaning we are interested in the latest results.

Also from the screenshot below, we see the results of this resource request, namely, the specific snippet from the article, as well as a time stamp, the article title, and a link off to the source article. From the snippet, we see the sentence stating that "the president commended..." -- the Evri system recognizes "the president" to be the source of the vibes, or sentiment, and commendation to be the prime justification for his positive sentiment expression.

And finally, we consider the case illustrated below, where the "Receiving vibes" tab is selected, and the particular source of negative sentiment is chosen by the user to be Rush Limbaugh. In this case, by executing this resource request:

/v1/sentiment/about?entityURI=/person/barack-obama-0x16f69&sentimentType=negative&sentimentSource=/person/rush-limbaugh-0x1ebf5&sort=date

From this request URI, we see that the entityURI references Barack Obama, meaning the returned sentiment is about Barack Obama. We can also see that the sentimentType is set to negative, meaning returned sentiment expressions will be negative in nature. We also see that the sentimentSource references Rush Limbaugh. The URI referencing Limbaugh was obtained from the sentiment summary results of the request shown above in reference to the first screenshot.

That pretty much sums up our walk through with the sentiment API. For complete documentation on this new API resource, see the Get sentiment information section of our REST API Specification. And finally, if you have any comments on how we can make this API better, questions on how to get things to work, or examples of bugs, please let us know on our developer forum.

Monday, March 23, 2009

APIs Pave the Way Toward Understanding

20 years ago this month, Tim Berners Lee proposed a “universal linked information system” at the Cern particle physics laboratory that would evolve into what we now know of as simply "the web." One of the more interesting phenomenon in the evolution of the web, has been the evolution toward the web-as-platform. Since even before a different, though perhaps no less influential, Tim -- Tim O'Reilly -- articulated the notion in his classic piece "What is Web 2.0", web companies have been rapidly exposing APIs which empower others to build upon their applications and data. This phenomenon has become so prolific, that it's almost rare to find a web company that does not have an API as a core part of their strategy. These APIs are forming the building blocks enabling Tim Berners Lee's more recent vision of the semantic web to be realized.

The semantic web is in essence, a web of understanding, where the actual meaning of web documents is made available to machines enabling a new generation of applications to emerge. The semantic web is being realized by many companies exposing APIs that are in turn used by other companies. For example, Yahoo has a terrific API with a very liberal usage policy. Yahoo has already spent billions of dollars indexing the entire web. Companies like Hakia, and my own, Evri, have taken advantage of Yahoo's extensive web crawl and global ranking to sample the web and index only the documents our users really need; this is a significant cost savings for a start up. Let's take another example; Free Base is busy building an extensive database of things -- think of it as a very highly structured Wikipedia, where not only is there a page for something like Barack Obama, but all of the data is completely structured and machine readable. This is in turn extremely helpful for applications like Powerset and Evri which need to be able to recognize these things in the many web documents their machines attempt to read in a human-like manner.

All of the above examples are, in essence, examples of machines talking to machines. In other words, when Hakia's indexing system leverages the Yahoo API to help determine what documents to index, I doubt a human is in the loop. In addition to machines talking to machines, there is, of course, the case of machines talking to humans. One of the hardest nuts to crack in the semantic web arena, is what a truly successful user experience looks and feels like. If you think back in time, when Alan Kay invented the desktop metaphor for PCs at Xerox Parc, the idea was not completely obvious. In fact, it was more than a decade before the metaphor was popularized by Apple. One of the most powerful motivations driving API proliferation is the appeal of access to a much larger community of innovators than are available within ones own company. For example, at my company we have great product designers and a terrific UI team; I have every confidence we are on the right path toward cracking the user experience problem for a deep semantic search engine. But, however good our team is, the user interface possibilities of building on our platform are endless. Why should we force our partners and customers to use our UIs? I think a similar conclusion is quite common; many semantic companies have some significant technology in the "deeper understanding" arena that enables a great number of UI permutations. So companies like Zemanta, Day Life, Reuters (Open Calais) and others all conclude: technology aspects with individual utility should be freed so its inherent value can be realized.

And of course, "freeing" technology aspects in the form of an API enables different monetization opportunities. In this rough economic climate, its a true advantage for any company to have diverse revenue streams. Many might not realize that almost 10x of Twitter's traffic is API driven. While most of us have little idea exactly what Twitter's monetization strategy looks like, I will wager a guess that making money off the API will be a core part of it. So how are companies making money off their APIs? Some are taking payment in the form of links to other already monetized pages. Many are simply charging for it. Most companies offer a certain volume of API requests free, then charge an escalated amount as a function of API request volume.

It seems obvious to most that social networking applications played a pivotal role in the web's evolution the past 10 years. Similarly, when we celebrate the 30th anniversary of the web, I predict APIs exposing a deep understanding of the web's content will be unambiguously recognized as primary drivers.
Related Posts with Thumbnails

Liked what you read? Tell your friends

More info about content in my post