Watson Natural Language Understanding offers enrichments such as keywords, emotion and sentiment that can uncover information about what people think and feel about a topic. Topics can range from product reviews to customer service interactions or opinions on articles. In this first of a three-post series, we’ll take a deep dive into showing you how you can extract keywords, emotion, and sentiment to uncover these insights.

For an overview on Watson Natural Language Understanding (NLU), check out this post. If you’d like to try out a text or article analysis, you can insert a URL or cut and paste text into the interactive demo found here.  Now let’s apply Natural Language Understanding to a blog about the first Watson-generated movie trailer using Natural Language Understanding’s Keywords, Emotion and Sentiment features.

This movie-trailer blog details how the IBM Research team trained Watson to detect what makes movie trailers scary using a baseline of 100 horror films and segmenting out each scene from the trailers. Scenes were tagged with emotions that identified people, objects and scenery; audio elements such as tone, and musical score features; and composition such as shot, the image framing and the lighting. We all know what a horror movie’s predominant tone is – and the standard tropes used to create them.

But, Watson had to learn all of that. How can we use the Natural Language Understanding service to get a quick understanding of the blog post about the making of this movie trailer?

Natural Language Understanding – Sentiment

Sentiment helps us quantify perception. When a new product is released, organizations want to know how people are talking about it. Do they like it or hate it? Are they neutral? We’ll use NLU’s sentiment feature to analyze how the movie trailer blog post discusses Watson, film, and more. With this feature, you can analyze the sentiment toward specific target phrases and the sentiment of the document as a whole. You can also get sentiment information for detected entities and keywords by enabling the sentiment option for those features.

Sentiment, and specifically targeted sentiment, helps us quickly understand this. Unlike emotion, sentiment breaks down into three categories: positive, negative or neutral. Natural Language Understanding offers multiple ways to extract sentiment.

  • Document sentiment is the result from retrieving the basic `sentiment` feature and calculates a positive, negative, or neutral label as applied to an entire document. That measurement is most helpful when you’re looking at a paragraph of text or less at a time.
  • Targeted sentiment results from adding `sentiment.targets’ to your API call. Targeted sentiment is great for collecting the sentiment about a particular phrase across an article.
  • Keywords and Entities sentiment gets results for the sentiment on the Keywords and Entities calls. You can learn how to do it yourself in our API docs.

This blog has an overall sentiment score of .23 Positive. When I added a target for sentiment detection, “AI”, NLU found a .47 score for sentiment, indicating that the author has a strong positive view of AI.

Is Artificial Intelligence (AI) scary? We asked Watson and its Natural Language Understanding (NLU) capabilities

Natural Language Understanding – Keywords

Using the Keywords feature, we’ll learn what the content is about. The keywords that Natural Language Understanding extracts are meant to give a word-cloud style summary of what’s in an article, without overwhelming us with too much information.

Each keyword extracted is a phrase of about one to three words in length, selected as most relevant to understanding the article’s content.

For most long articles, the API will return about 50 keywords, ordered by relevance. Think of Keywords as a way to automatically generate tags that show what the article’s about.

Here’s a selection of some of the results from the Watson movie-trailer blog post:

{
"keywords": [
{
"text": "movie trailer",
"relevance": 0.981303
},
{
"text": "horror movies",
"relevance": 0.77587
},
{
"text": "horror movie trailer",
"relevance": 0.749214
},
{
"text": "cognitive movie trailer",
"relevance": 0.743717
},
{
"text": "compelling movie trailer",
"relevance": 0.724927
},
{
"text": "moments",
"relevance": 0.7107
},
{
"text": "suspense/horror movie trailer",
"relevance": 0.708865
},
{
"text": "suspense/horror movie trailers",
"relevance": 0.685059
},
{
"text": "upcoming suspense/horror film",
"relevance": 0.679276
},
{
"text": "20th Century Fox",
"relevance": 0.674184
},
{
"text": "creative projects",
"relevance": 0.666297
},
{
"text": "especially horror movies",
"relevance": 0.666059
},
{
"text": "experimental Watson APIs",
"relevance": 0.650647
},
{
"text": "different types",
"relevance": 0.645718
},
{
"text": "full-length feature film",
"relevance": 0.644173
},
{
"text": "different ways –moments",
"relevance": 0.642444
},
{
"text": "suspenseful moments",
"relevance": 0.640487
},
{
"text": "black title cards",
"relevance": 0.634481
},
{
"text": "potential candidate moment",
"relevance": 0.6301
},
{
"text": "cutting room floor",
"relevance": 0.629331
},
{
"text": "completely manual process",
"relevance": 0.628831
},
{
"text": "cognitive computing systems",
"relevance": 0.622532
},

From the top of the Keywords list, we get a quick summary of the article’s main topics: movie trailer, horror movies.  Reading through, you get a sense of the main points the article makes.

Natural Language Understanding – Emotion

Emotion is great for understanding how the author feels about a topic. The NLU Emotion feature detects anger, disgust, fear, joy, and sadness implied in text on a scale of 0 to 1. A score of 0 means the text does not convey the emotion; 1 indicates the text expresses the emotion strongly. It can analyze the overall emotional tone of the content or it can analyze emotion conveyed by specific target phrases. You can also enable emotion analysis for entities and keywords that are automatically detected by the service.

Let’s take a look at our movie post to gauge a targeted emotion – to examine how emotion factors into the author’s feelings about the target “movies”.

        "targets": [

            {

                "text": "movies",

                "emotion": {

                    "sadness": 0.113518,

                    "joy": 0.014731,

                    "fear": 0.699715,

                    "disgust": 0.153705,

                    "anger": 0.104858

                }

            }

        ]

Since the movies we’re talking about are horror movies, it makes sense that the main emotion that the author expresses about the target “movies” in this post is fear.

Aggregating Emotion results from Natural Language Understanding helps quantify what the emotion within text is predominantly about. You can also use the targeted emotion feature to determine the author’s feelings towards specific aspects of the topic.

So, Watson seems to tell us that yes, horror movies as described by the blog post we used as input, are definitely scary according to the author! Whether that means that the topic of AI is scary as a whole, well, that’s up to the movie-goer.

To learn more about NLU enrichments and how to get the most out of them, check out the rest of my blog series! “How to track people, places organizations and relationships using Watson NLU”  explains entities, relations, and semantic roles, and “How to get the most from text enrichments in Watson Natural Language Understanding” covers metadata, concepts, and categories.

Learn more and try out Watson Natural Language Understanding

Save

Save

18 comments on"Is artificial intelligence (AI) scary? We asked Watson!"

  1. Parabéns pelo conteúdo. Palavra chave gostei “sentimento”

  2. Naganna Chetty September 14, 2017

    The post is useful and worthy.

Join The Discussion

Your email address will not be published. Required fields are marked *