This post was co-authored by Deema Alamer and Rashid Aljohani.

Assume you just launched a new product or campaign, or you’ve just started your own business. Naturally, you would be curious about what the public think of it, wouldn’t you? You would perhaps want to find areas of improvements to make your customers happier, since happier customers equal happier you.

Well … that’s when you need to sharpen your social listening skills. Essentially, social listening is the process of monitoring conversations about specific topics, keywords, or brands to understand what customers are saying or feeling. Social listening helps you track the health of your business, create content people crave, improve your customer experience, and simply help you make better product decisions.

Now, that’s all well and good but how can artificial intelligence help you here?

We built a Web application, which primarily uses Watson Tone Analyzer service on the IBM Cloud to analyze emotions and tones in what people write online, such as tweets. It predicts whether they are happy, sad, confident, and more. Based on that, you can re-adjust your business plans strategically as needed.

How it works

Using a hashtag and a geolocation, we dip into Twitter to analyze tweets and find the tones in what people are writing on Twitter.

First, choose a geolocation on the map if you want your search to be specific so only tweets in that region are analyzed. This is optional. If you prefer to analyze tweets worldwide, scroll down the page.

Next, enter the hashtag you’re curious about, for example, olympics2018. The most recent tweets with that hashtag (and geolocation if specified) is scraped from Twitter and passed to the Watson Tone Analyzer service. The service returns an array of different tones and a score for each tone. In our application, we chose a limited number of tones that we are interested in.

Note since Tone Analyzer doesn’t support Arabic yet. We incorporated the Watson Language Translator service to translate tweets from Arabic to English before passing it to the Tone Analyzer service. That way we are able to get an instantaneous summary of people’s tones and emotions about our products.

Tools, technologies, and key libraries

We used the following to build and power the application:

We also used a jQuery plugin based on raphael.js to display dynamic vector maps.

Try it for yourself

We took this application as a demo to Misk Global Forum last year and the public loved it! Guests were curious to see how people felt about their products & startups as well as political matters.

If you fancy trying it for yourself, we uploaded the source code on GitHub. You can download the code and install the needed tools. Of course, don’t forget to generate your Twitter API keys and create your Watson services on the IBM Cloud, and update the credentials file. Then voila, you’re ready to run the application. There are many ways to build on the application and make adjustments – the floor is yours!

Join The Discussion

Your email address will not be published. Required fields are marked *