Perform Text Analysis with IBM Watson and Google Docs

Google, Microsoft, IBM and Amazon have made it easier for developers to add human cognitive capabilities (also known as artificial intelligence) within their own applications. You need not be a machine learning expert to build a computer program that can recognize objects in photographs, or one that transforms human speech to text or even a chatbot that converses with people in natural language.

The Google Photos app leverages machine learning to identify landmarks and faces in your photos. You can even build and train your own machine learning models by installing Google’s TensorFlow library on your own computer. IBM’s PowerAI lets enterprises deploy TensorFlow like frameworks in the cloud on power systems for training custom machine learning models of any size.

The IBM Code Patterns microsite hosts hundreds of ready-to-use examples around artificial intelligence. For instance, here’s an open source repo that explains how to recognize images of houses that have swimming pools. Another example on Github shows how you can easily build a system that can detect and count products on store shelves using the PowerAI platform.

Train your own Machine Learning Model

If you would like to build your own image recognition engine without the complexity of servers and TensorFlow, try this online demo of the Watson Visual Recognition engine hosted the IBM Cloud (formerly Bluemix) website.

watson-image-recognition.png

You can create your own classifier and upload a set of images to train the classifier.  It is also essential to upload a set of negative images that may look similar but are different. Train the model and, in about a minute or so, your model is ready. Upload any image and the classifier will be able to tell if it matches any of your trained bundles.

IBM Watson + Google Docs for Natural Language Understanding

The Natural Language Processing (NLP) service of IBM Watson uses machine learning to extract entities, person names, places, and understand the overall sentiment and emotion of text. Amazon Comprehend and Google Natural Language are other competing platforms that offer powerful text analysis in the cloud.

ibm-watson-nlp.png

Getting started with Watson NLP is easy and all you need is an IBM Cloud account to get started. The lite plan is free (no credit card required), it never expires and the quota resets every month automatically.

I’ve built a sample Google Apps Script based app that uses Watson NLP to analyze the text in your Google Document. Here’s how you can get started:

  1. Copy this Google Document to your Google Drive
  2. Select the text in the document, go to the IBM Watson menu and choose the Analyze text menu.
  3. Grant the necessary authorization and you’ll see get a pop-up with the list of entities found in the selected text.

The Google Apps Script is open-source and you can find a copy of the source code inside Tools > Script Editor. If you ever run into quota limits, remember to replace the credentials in the source code with your own Bluemix account.

ibm-watson-google-docs.gif

Disclaimer: The writer attended IBM Code Day in Bangalore at the invitation of IBM. The travel and accommodation were arranged and paid for by IBM.

Amit Agarwal

Amit Agarwal

Google Developer Expert, Google Cloud Champion

Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.

Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory

0

Awards & Titles

Digital Inspiration has won several awards since it's launch in 2004.

Google Developer Expert

Google Developer Expert

Google awarded us the Google Developer Expert award recogizing our work in Google Workspace.

ProductHunt Golden Kitty

ProductHunt Golden Kitty

Our Gmail tool won the Lifehack of the Year award at ProductHunt Golden Kitty Awards in 2017.

Microsoft MVP Alumni

Microsoft MVP Alumni

Microsoft awarded us the Most Valuable Professional (MVP) title for 5 years in a row.

Google Cloud Champion

Google Cloud Champion

Google awarded us the Champion Innovator title recognizing our technical skill and expertise.

Email Newsletter

Sign up for our email newsletter to stay up to date.

We will never send any spam emails. Promise.