Chapter 14: IBM Watson and Cognitive Computing 1
IBM Watson and Cognitive Computing
14.1 Introduction: IBM Watson and Cognitive Computing
14.1 Q1: Which of the following statements a), b) or c) is false?
a. To beat the two best human Jeopardy players, Watson simultaneously executed
hundreds of language-analysis algorithms to locate correct answers in 200 million
pages of content (including all of Twitter) requiring four terabytes of storage.
b. IBM researchers trained Watson using machine-learning and reinforcement-
learning techniques.
c. Watson’s “no credit card required” policy and free Lite tier services are among
the friendliest to people who’d like to experiment with cloud-based cognitive com-
puting services at no charge.
d. All of the above statements are true.
14.1 Q2: Which of the following statements is false?
a. IBM Watson is a cloud-based cognitive-computing platform being employed
across a wide range of real-world scenarios.
b. Cognitive-computing systems simulate the pattern-recognition and decision-
making capabilities of the human brain to “learn” as they consume minimal data.
c. Watson offers an intriguing set of capabilities that are easy to incorporate into
your applications.
d. It’s easy to set up an IBM Cloud account and use the Lite tier and IBM’s Watson
demos to experiment with various web services, such as natural language transla-
tion, speech-to-text, text–to-speech, natural language understanding, chatbots, ana-
lyzing text for tone and visual object recognition in images and video.
14.1 Q3: You can develop Watson apps by quickly and conveniently ________ several
Watson services. For example, you can transcribe English or Spanish audio record-
ings to text, translate the text to the other language, then synthesize and play Span-
ish or English audio from the translated text.
a. merging
b. collating
2 Chapter 14: IBM Watson and Cognitive Computing
c. mashing up
d. hashing
14.2 IBM Cloud Account and Cloud Console
14.2 Q1: Which of the following statements is false?
a. You can use a free IBM Cloud account to access Watson’s Lite tier services.
b. Each service’s description web page lists the service’s tiered offerings and what
you get with each tier.
c. Though the Lite tier services limit your use, they typically offer what you’ll need
to familiarize yourself with Watson features and begin using them to develop apps.
d. Lite tiers are intended for use in commercial-grade applications.
14.2 Q2: Which of the following statements is false?
a. You can use the Watson dashboard to browse the Watson services; link to the
services you’ve already registered to use; look at the developer resources, including
the Watson documentation, SDKs and various resources for learning Watson; and
view the apps you’ve created with Watson.
b. You’ll need to register for and get your credentials to use various Watson ser-
vices.
c. You can view and manage your list of services and your credentials in the IBM
Cloud dashboard at https://console.bluemix.net/dashboard/apps. You can
also click Existing Services in the Watson dashboard to get to this list.
d. All of the above statements are true.
14.3 Watson Services
14.3 Q1: Which of the following statements is false?
a. The Watson Assistant service helps you build chatbots and virtual assistants that
enable users to interact via natural language text. In a customer service scenario,
you could create chatbots that answer customer questions and route customers to
the correct department, if necessary.
b. With Watson Assistant, a weather chatbot could be trained to respond to ques-
tions like, “What is the weather forecast for New York City?”
c. The Visual Recognition service enables apps to locate and understand infor-
mation in images and video, including colors, objects, faces, text, food and inappro-
priate content.
Chapter 14: IBM Watson and Cognitive Computing 3
d. IBM’s predefined visual recognition models are sufficient for all the visual recog-
nition tasks you might need to perform.
14.3 Q2: Which of the following statements about the IBM Watson Speech to Text
service is false?
a. The Speech to Text service converts speech audio files to text transcriptions of
the audio.
b. 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 au-
dio.
c. The Speech to Text service treats all speakers as a single speaker when transcrib–
ing audio.
d. You could use this service to help implement voice-controlled apps, transcribe
live audio and more.
14.3 Q3: Which of the following statements about IBM Watson’s Text to Speech
service is false?
a. The Text to Speech service enables you to synthesize speech from text.
b. You can use Speech Markup Language (SML) to embed instructions in the text for
control over voice inflection, cadence, pitch and more.
c. The Text to Speech service supports English (U.S. and U.K.), French, German, Ital-
ian, Spanish, Portuguese and Japanese.
d. All of the above statements are true.
14.3 Q4: Which of the following statements is false?
a. The Language Translator service can translate text between languages.
b. The Language Translator service can identify text as being written in one of over
60 languages.
c. The Language Translator service supports translation only from English to many
other languages or from many other languages to English.
d. All of the above statements are true.
Chapter 14: IBM Watson and Cognitive Computing 5
a. You train the Natural Language Classifier service 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.”
b. 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.
c. You might 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 con-
vert a question into text, use the Natural Language Classifier service to classify the
text, then route the call to the appropriate person or department.
d. All of the above statements are true.
14.3 Q9: Which of the following statements is false?
a. Many APIs 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.
b. Synchronous programs can start a task, continue doing other things, then be no-
tified when the original task completes and returns its results.
c. Many Watson services offer both synchronous and asynchronous APIs.
d. The Speech to Text demo is a good example of asynchronous APIs. The demo pro-
cesses 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 distin-
guish among the speakers. The demo displays these intermediate results in parallel
with the service’s continued work. Sometimes the demo displays “Detecting speak-
ers” while the service figures out who is speaking. Eventually, the service sends up-
dated transcription results for distinguishing among the speakers, and the demo
then replaces the prior transcription results.
14.3 Q10: Which of the following statements is false?
a. With today’s multi-core computers and multi-computer clusters, asynchronous
APIs can help you improve program performance.
b. Programming with synchronous APIs is more complicated than programming
with asynchronous APIs.
c. IBM provides Watson Developer Cloud Python SDK code examples on GitHub,
where you can see examples that use synchronous and asynchronous versions of
several services.
d. All of the above statements are true.
6 Chapter 14: IBM Watson and Cognitive Computing
© Copyright 2020 by Pearson Education, Inc. All Rights Reserved.
Answer: b. Actually, programming with asynchronous APIs is more compli-
cated than programming with synchronous APIs.
14.4 Additional Services and Tools
14.4 Q1: ________ is the Watson interface for creating and managing your Watson
projects and for collaborating with your team members on those projects.
a. Watson Visual Recognition service
b. Watson Knowledge Catalog
c. Watson Studio
d. Watson Business Analytics
14.4 Q2: Which of the following describes Watson’s Business Analytics preconfig-
ured project:
a. “Build modeler flows to train SPSS models or design deep neural networks.”
b. “Create visual dashboards from your data to gain insights faster.”
c. “Combine, cleanse, analyze, and shape data using Data Refinery.”
d. “Ingest and analyze streaming data using the Streaming Analytics service.”
14.4 Q3: Which of the following describes Watson’s Standard preconfigured pro-
ject:
a. “Work with any type of asset. Add services for analytical assets as you need them.”
b. “Analyze data to discover insights and share your findings with others.”
c. “Tag and classify visual content using the Watson Visual Recognition service.”
d. “Build neural networks and deploy deep learning models.”
14.4 Q4: Which of the following statements is false?
a. Various Watson services work with predefined models, but also allow you to pro-
vide custom models that are trained for specific industries or applications.
b. Watson’s Knowledge Studio helps you build custom models.
c. Watson’s Knowledge Studio allows enterprise teams to work together to create
and train new models, which can then be deployed for use by Watson services.
d. All of the above statements are true.
Chapter 14: IBM Watson and Cognitive Computing 9
import pydub.playback
import wave
Which of the following statements is false?
a. The pyaudio module enables you to record audio from the microphone.
b. pydub and pydub.playback modules enable you to load and play audio files.
c. The Python Standard Library’s wave module enables you to save WAV (Waveform
Audio File Format) files. WAV is a popular audio format originally developed by Mi-
crosoft and Apple.
d. All of the above statements are true.
14.6 Q4: What predefined Watson model will translate the text from English to
Spanish?
a. ‘en–sp’
b. ‘eng–spa’
c. ‘en–es’
d. ‘eng–esp’
14.6 Q5: Which of the following statements about using the SpeechToTextV1 ob-
ject’s recognize method to invoke the Speech to Text service is false?
a. The method’s keyword argument audio is the file (audio_file) to pass to the
Speech to Text service.
b. The method’s keyword argument content_type is the media type of the file’s
contents—‘audio/wav’ indicates that this is an audio file stored in WAV format.
c. The method’s keyword argument model indicates which spoken language model
the service will use to recognize the speech and transcribe it to text. This app uses
predefined models—either ‘en-US_BroadbandModel’ (for English) or ‘es–
ES_BroadbandModel’ (for Spanish).
d. All of the above statements are true.
14.6 Q6: Consider the following code:
def play_audio(file_name):
“””Use the pydub module (pip install pydub) to play a WAV file.”””
sound = pydub.AudioSegment.from_wav(file_name)
pydub.playback.play(sound)
10 Chapter 14: IBM Watson and Cognitive Computing
Which of the following statements is false?
a. To play the audio files returned by Watson’s Text to Speech service, we use fea-
tures of the pydub and pydub.playback modules.
b. From the pydub module, the function uses the AudioSegment class’s wav method
to load a WAV file.
c. To play the AudioSegment, the function calls the pydub.playback module’s
play function, passing the AudioSegment as an argument.
d. All of the above statements are true.
14.7 Watson Resources
14.7 Q1: Which of the following items are normally included in the Watson docu-
mentation for each service?
a. A getting started tutorial and a video overview of the service.
b. A link to a service demo and links to more specific how-to and tutorial documents.
c. Sample apps and additional resources, such as more advanced tutorials, videos,
blog posts and more.
d. All of the above.
14.7 Q2: Links to which of the following are found on the Watson Learning Re-
sources page?
a. Blog posts on Watson features and how Watson and AI are being used in industry
b. Watson’s GitHub repository (developer tools, SDKs and sample code) and the
Watson YouTube channel
c. Code patterns, which IBM refers to as “roadmaps for solving complex program-
ming challenges.”
d. All of the above.
14.7 Q3: Which of the following statements is false?
a. The Watson YouTube channel contains hundreds of videos showing you how to
use all aspects of Watson.
b. The Watson YouTube channel contains spotlight videos showing how Watson is
being used.
c. The IBM Redbooks publications cover IBM Cloud and Watson services in detail,
helping you develop your Watson skills.
d. All of the above are true.