For a decade now, we’ve lived in a “social” era – through networks such as LinkedIn, Facebook, and IBM Connections. Social networks have given us the tools by which we can engage in dialogue, share ideas, and find new information. A simple example is the now-ubiquitous comments section seen on most websites. Someone posts content, and someone writes back in the form of a comment. Collectively, those comments reflect public perception, understanding, and support. But to get a sense of the public’s reaction, you have to read through all of the comments.
This is where the emerging cognitive era can help. Rather than manually read the comments, one could simply use a cognitive service to classify the emotions of commenters. One such service is IBM’s AlchemyAPI. Below I’ve combined Alchemy’s emotion analysis with IBM Connections’ comments to generate a “social reaction” to my post.
Admittedly, people aren’t really angry with my post – maybe it’s the exclamation marks being used by commenters … but you get the point. In isolation, this is a neat trick. But when you apply this on a larger scale, it gives you the ability to listen cognitively to the social network. For example, an active forum of actual angry customers could trigger intervention by a customer support representative. Or combined with other services – like concept extraction – would tell us which areas of the company, initiative, or project that employees are struggling with. The possibilities and outcomes are substantial, which is why cognitive is more than just technology. It’s a new era of business and computing.
- Lots of information exists on using AlchemyAPI. Start out by creating an account on Bluemix and adding the service.
- I used a tool called Greasemonkey to add the “Reaction widget” to IBM Connections Blog pages. Think of Greasemonkey as a way of creating small, personal applications that run only in your browser.
- Adapt my widget below to experiment with content an APIs.
Installing Greasemonkey Reaction Widget
- Launch your Firefox browser.
- Head over to the Greasemonkey addon page.
- Click the “Add to Firefox” button.
- You’ll then see a little monkey on the toolbar.
- Copy the script above to the clipboard.
- Click “Add New User Script”.
- Click “Use Script From Clipboard”.
- Change the script as needed.
How It Works
A few things to point out:
- The top of the script defines where the “application” can run. I’ve made it so that the widget will be added to IBM Connections Cloud and IBM’s Connections deployment. You should update the @include line to reflect your server installation. The @include directive also says to run the application only on Blog entry pages. It does not currently run on a wiki or forum page for example.
- The script will add a button to the right sidebar. Pressing the button invokes the AlchemyAPI.
- The text sent to AlchemyAPI is obtained from the Comments section of the post. All we’re doing here is grabbing the HTML from inside your browser and making an API call. AlchemyAPI does the rest.
- I’m using Chart.js to create the chart. I’ve used it before on other blog posts.
- The color of the emotions in the chart is similar to the “Inside Out” characters. 😉