Create a mobile app that analyzes the emotions of content


Ever wonder how you come off in an email you’re concocting for a top executive or a blog post that could be read by millions? Beyond that, wonder how your customers think of your offering in their abundant tweets, reviews, and customer service conversations? Watson Tone Analyzer interprets text based on its perceived emotion, so you know immediately if customers are overjoyed in their posts about your latest release or upset with the direction you’re going in.

This code pattern gives you the foundation you need to start creating an app that uses Tone Analyzer immediately. Or, you can copy and paste the code into an existing application. The Code Pattern presents a text box that you can popular with text then analyze based on emotion, language style, and social tendencies. Each category offers a label for the characteristics found in the text with its percent accuracy.


This code pattern makes it very easy to follow a Cloud Native programming model that uses IBM’s best practices for app development. If you click on Build on IBM Cloud at the top of the code pattern, you’ll be able to dynamically provision IBM Cloud services. Those services will be automatically initialized in your generated application. Add a managed MongoDB service or an additional Watson service.

This code pattern will teach you how to:

  • Build a mobile application that uses Watson Tone Analyzer
  • Provision and integrate additional IBM Cloud services
  • Analyze emotions and tones in text


Tone Analyzer for iOS architecture diagram

  1. The user submits their content as a JSON, plain text, or HTML file.
  2. The Watson Tone Analyzer Service will analyze the provided content and return a JSON analysis file back to the user.


See the detailed instructions in the README file.