Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Build a Chatbot with Watson APIs!
You have completed Build a Chatbot with Watson APIs!
Preview
The best way to understand what you can do with various Watson services is to try them out!
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
For starters, let's check out a website
that lets you explore Watson services
0:00
right in the browser,
without writing in any code.
0:03
If you search for Watson API services or
click on the link in the teacher's notes.
0:06
You will come to this page that lists
all the services currently available on
0:10
the Watson Platform.
0:14
So here we have some services
related to conversation.
0:15
And some forward discovery and
if we keep scrolling down we can see
0:19
computer vision and speech,
language, and finally empathy.
0:24
As you could see there is a lot of
computer empower available here.
0:29
The goal of these course, is to get you
started some common and useful examples.
0:32
But there's much more available for you to
use to solve different kinds of problems.
0:36
We encourage you to test
a lot of these out, but
0:40
let's check out the Tone Analyzer
here at the bottom.
0:42
So the Tone Analyzer service understands
emotions and communication style in text.
0:47
So this means if I give it the text,
I'm happy, it will detect a positive tone.
0:53
Amen, exactly how does the tone analyzer
0:57
determine human emotion from speech or
text?
0:59
>> That's a great question, Ben.
1:03
We employed psychologists who use
the big five personality traits.
1:05
Openness, conscientious,
extraversion, agreeableness,
1:11
neuroticism, OCEAN, to be exact.
1:14
What they did is they collected lot
of texts and they analyzed that text,
1:18
classified it, and
they placed it within those buckets.
1:23
Each that they thought were appropriate
to a particular tone that depicted
1:28
one of the big part personality traits.
1:34
From there on once Watson comes
across an article, a text,
1:36
a paragraph, a noun phrase one
that it hasn't' seen before.
1:41
It is able to then classify it and
1:45
come up with derivatives of those
five such as joy, confidence, and
1:49
anger and hence depict the tone of
the written or the spoken word.
1:53
>> It's incredible really.
2:00
And again, all this work is done behind
the scenes to train these services and
2:01
make them available.
2:05
So when we're using them,
2:06
it's got all this information
underneath that's ready for us.
2:07
>> Absolutely, yes.
2:11
>> So yeah,
let's continue with our example here.
2:12
If we click on the view demo button,
2:15
then we come to a page that is
pre-loaded with some samples.
2:17
So here we have some Tweets,
Online Reviews, Email messages, etc.
2:21
And the first one in here is a series of
tweets about people who are not happy
2:25
about new phone.
2:29
All right, so let's analyze this and
see how it goes.
2:30
Click on the button here, all right.
2:33
So we get a document level summary, right,
and it's showing us that there is some
2:35
anger, fear, and some confidence as
the main tones present in this text.
2:39
And if we scroll down a little bit,
we get down to the sentence level.
2:44
And we can see which sentences in
the text match the different tones.
2:47
So if I click on anger,
there we are, highlighted in red,
2:52
there's some angry sentences,
some angry tweets about the phone.
2:55
Same thing if I click on tentative,
nothing shows up.
2:58
If I try fear, got a sentence there at
the bottom, about a fearful sentence.
3:02
So if we scroll back up, we can also
enter our own text for analysis too.
3:07
I'm going to paste in a message I
sent the teaching team recently.
3:11
So click your own text come in here and
paste.
3:14
And let's see, yep, okay.
3:20
So if I analyze this.
3:21
Let's take a look, how did I do?
3:23
All right, so the tone analyzer is telling
me that it detected joyful tones and
3:25
tentative tones.
3:30
If we click on each down at the sentence
level we can see certain things,
3:32
the same things was detected as joyful.
3:37
If I click on tentative I can
see some examples here where
3:40
we can see that the color
here matches the,
3:44
it's a slightly less confident
reading of this text.
3:46
So even the Tone Analyzer itself
is tentative in its analysis here.
3:49
And one of the fun things that you
suggested that I do is paste in some
3:55
angry text as well.
3:59
So I'm going to just here in the middle,
insert some angry text and
4:00
analyze it again.
4:04
And now at the bottom,
sure enough we got some angry passages.
4:06
And if I click on it, and scroll for
the red one, you can not only see not only
4:10
angry but also detected some
sadness which is interesting.
4:14
Two different passages,
4:18
there were different levels of
confidence in how sad they were.
4:19
The Watson API documentation defines
all of these interpretations.
4:23
And you can check it out using
the link in teacher's notes.
4:27
You will definitely wanna
refer to the docs for
4:29
each service that you
wanna use in your apps.
4:32
Note that these API docs have
sample code in multiple languages
4:34
right here on the right side.
4:38
This is some of the best
documentation that I've ever seen.
4:40
You should plug in some things you have
written, like emails or tweets and
4:43
see what the results are.
4:46
It's amazing.
4:47
>> So try some things out grab
an excerpt from a sad song,
4:49
copy paste that into Tone Analyzer.
4:53
The one that I do most often is
actually take a snippet of my email or
4:56
the entire email.
5:00
And I can't tell you how many times that
has stopped me from sending the email
5:01
before I erase all the red and
make it look blue.
5:06
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up