Skip Links

The Sentimeter, Part 1

By Mark Gibbs, Network World
August 06, 2009 02:34 PM ET
Gibbs
  • Print

In one of my June Web Applications newsletters I wrote about a new service called OpenAmplify that had impressed me. In case you didn't catch that issue, let me summarize what OpenAmplify is all about.

OpenAmplify is a linguistic engine that you present a block of text to analyze through a RESTful API. The service returns the content's semantic indications (called "signals") divided into topics, actions, styles and demographics.

Topic analysis identifies the nouns that are significant and reports their ranking and polarity (the degree of positive or negative bias as shown in the text), along with guidance (a measure of whether advice is being sought or offered), identification of proper nouns, and referenced locations.

Action analysis reports on the words that relate to action with measures of decisiveness (how likely the action is to be taken), guidance and temporality (when the action may take place).

Style analysis detects how "flowery" the writing style is and the amount of slang used, while demographic analysis returns measures of the likely age, gender and education level signals of the text's author or audience.

What got me really excited was using OpenAmplify to analyze social media in which I include not only Twitter, Facebook and all the other usual suspects, but also e-mail and instant messaging.

There's a lot to the API, but here's a simple example of how you could request an OpenAmplify analysis:

http://portaltnx.openamplify.com/AmplifyWeb/AmplifyThis?analysis=all&apiKey=<apikey>&inputtext=<urlencoded_input_text>

In this request you'd insert your API key value in place of <apikey> (you get this key when you sign up, which is free) and the text you want to have analyzed in place of the string <urlencoded_input_text> formatted by URL encoding. The returned results are in XML format by default (JSON and DART are also options). The results from a real example are far too long to include here but the API documentation has several examples you can peruse at your leisure.

What's really cool about this is that instead of submitting URL encoded text you can give OpenAmplify a URL and it will go and fetch the remote content and then analyze and return the results. So, should you be so motivated, you could try this query:

http://portaltnx.openamplify.com/AmplifyWeb/AmplifyThis?apiKey=<apikey>&analysis=all&outputFormat=xml&sourceURL=http%3A%2F%2Fsearch.twitter.com%2Fsearch.atom%3Flang%3Den%26rpp%3D100%26page%3D1%26q%3Diran

This request asks OpenAmplify to fetch a URL, which is in fact another API request for Twitter's search interface and, in this case, instructs it to look for "iran", and analyze that content.

Now, you might think that because the Twitter search results will be an entire ATOM-formatted data structure this will introduce linguistic "noise", but it actually has a negligible impact on the results because what we're looking for is linguistically relevant content -- something that repetitious XML formatting lacks.

Anyway, what we get back are all of the OpenAmplify analyses for all of the Twitter content and the various measures for the search term "Iran" will be amongst them.

  • Print

Videos

rssRss Feed