This section overviews many of Watson’s services and provides links to the details for each. Be sure to run the demos to see the services in action. For links to each Watson service’s documentation and API reference, visit:
https:/ / console.bluemix.net/ developer/ watson/ documentation
We provide footnotes with links to each service’s details. When you’re ready to use a particular service, click the
Create
button on its details page to set up your credentials.
The Watson Assistant service9 helps you build chatbots and virtual assistants that enable users to interact via natural language text. IBM provides a web interface that you can use to train the Watson Assistant service for specific scenarios associated with your app. For example, a weather chatbot could be trained to respond to questions like, “What is the weather forecast for New York City?” In a customer service scenario, you could create chatbots that answer customer questions and route customers to the correct department, if necessary. Try the demo at the following site to see some sample interactions:
https:/ / www.ibm.com/ watson/ services/ conversation/ demo/ index.html#demo
The Visual Recognition service10 enables apps to locate and understand information in images and video, including colors, objects, faces, text, food and inappropriate content. IBM provides predefined models (used in the service’s demo), or you can train and use your own (as you’ll do in the “Deep Learning” chapter). Try the following demo with the images provided and upload some of your own:
https:/ / watson-visual-recognition-duo-dev.ng.bluemix.net/
The Speech to Text service,11 which we’ll use in building this chapter’s app, converts speech audio files to text transcriptions of the audio. You can give the service keywords to “listen” for, and it tells you whether it found them, what the likelihood of a match was and where the match occurred in the audio. The service can distinguish among multiple speakers. You could use this service to help implement voice-controlled apps, transcribe live audio and more. Try the following demo with its sample audio clips or upload your own:
https:/ / speech-to-text-demo.ng.bluemix.net/
The Text to Speech service,12 which we’ll also use in building this chapter’s app, enables you to synthesize speech from text. You can use Speech Synthesis Markup Language (SSML) to embed instructions in the text for control over voice inflection, cadence, pitch and more. Currently, this service supports English (U.S. and U.K.), French, German, Italian, Spanish, Portuguese and Japanese. Try the following demo with its plain sample text, its sample text that includes SSML and text that you provide:
https:/ / text-to-speech-demo.ng.bluemix.net/
The Language Translator service,13 which we’ll also use in building in this chapter’s app, has two key components:
translating text between languages and
identifying text as being written in one of over 60 languages.
Translation is supported to and from English and many languages, as well as between other languages. Try translating text into various languages with the following demo:
https:/ / language-translator-demo.ng.bluemix.net/
The Natural Language Understanding service14 analyzes text and produces information including the text’s overall sentiment and emotion and keywords ranked by their relevance. Among other things, the service can identify
people, places, job titles, organizations, companies and quantities.
categories and concepts like sports, government and politics.
parts of speech like subjects and verbs.
You also can train the service for industry- and application-specific domains with Watson Knowledge Studio (discussed shortly). Try the following demo with its sample text, with text that you paste in or by providing a link to an article or document online:
https:/ / natural-language-understanding-demo.ng.bluemix.net/
The Watson Discovery service15 shares many features with the Natural Language Understanding service but also enables enterprises to store and manage documents. So, for example, organizations can use Watson Discovery to store all their text documents and be able to use natural language understanding across the entire collection. Try this service’s demo, which enables you to search recent news articles for companies:
https:/ / discovery-news-demo.ng.bluemix.net/
The Personality Insights service16 analyzes text for personality traits. According to the service description, it can help you “gain insight into how and why people think, act, and feel the way they do. This service applies linguistic analytics and personality theory to infer attributes from a person’s unstructured text.” This information could be used to target product advertising at the people most likely to purchase those products. Try the following demo with tweets from various Twitter accounts or documents built into the demo, with text documents that you paste into the demo or with your own Twitter account:
https:/ / personality-insights-livedemo.ng.bluemix.net/
The Tone Analyzer service17 analyzes text for its tone in three categories:
emotions—anger, disgust, fear, joy, sadness.
social propensities—openness, conscientiousness, extroversion, agreeableness and emotional range.
language style—analytical, confident, tentative.
Try the following demo with sample tweets, a sample product review, a sample e-mail or text you provide. You’ll see the tone analyses at both the document and sentence levels:
https:/ / tone-analyzer-demo.ng.bluemix.net/
You train the Natural Language Classifier service18 with sentences and phrases that are specific to your application and classify each sentence or phrase. For example, you might classify “I need help with your product” as “tech support” and “My bill is incorrect” as “billing.” Once you’ve trained your classifier, the service can receive sentences and phrases, then use Watson’s cognitive computing capabilities and your classifier to return the best matching classifications and their match probabilities. You might then use the returned classifications and probabilities to determine the next steps in your app. For example, in a customer service app where someone is calling in with a question about a particular product, you might use Speech to Text to convert a question into text, use the Natural Language Classifier service to classify the text, then route the call to the appropriate person or department. This service does not offer a Lite tier. In the following demo, enter a question about the weather—the service will respond by indicating whether your question was about the temperature or the weather conditions:
https:/ / natural-language-classifier-demo.ng.bluemix.net/
Many of the APIs we discuss throughout the book are synchronous—when you call a function or method, the program waits for the function or method to return before moving on to the next task. Asynchronous programs can start a task, continue doing other things, then be notified when the original task completes and returns its results. Many Watson services offer both synchronous and asynchronous APIs.
The Speech to Text demo is a good example of asynchronous APIs. The demo processes sample audio of two people speaking. As the service transcribes the audio, it returns intermediate transcription results, even if it has not yet been able to distinguish among the speakers. The demo displays these intermediate results in parallel with the service’s continued work. Sometimes the demo displays “Detecting speakers” while the service figures out who is speaking. Eventually, the service sends updated transcription results for distinguishing among the speakers, and the demo then replaces the prior transcription results.
With today’s multi-core computers and multi-computer clusters, the asynchronous APIs can help you improve program performance. However, programming with them can be more complicated than programming with synchronous APIs. When we discuss installing the Watson Developer Cloud Python SDK, we provide a link to the SDK’s code examples on GitHub, where you can see examples that use synchronous and asynchronous versions of several services. Each service’s API reference provides the complete details.
(Fill-In) You can use ____________ to embed instructions in the text for control over voice inflection, cadence, pitch and more.
Answer: Speech Synthesis Markup Language (SSML).
(Fill-In) The ____________ service analyzes text and produces information including the text’s overall sentiment and emotion and keywords ranked by their relevance.
Answer: Natural Language Understanding.
(True/False) Synchronous programs can start a task, continue doing other things, then be notified when the original task completes and returns its results.
Answer: False. Asynchronous programs can start a task, continue doing other things, then be notified when the original task completes and returns its results.