Book Image

Cognitive Computing with IBM Watson

By : Rob High, Tanmay Bakshi
Book Image

Cognitive Computing with IBM Watson

By: Rob High, Tanmay Bakshi

Overview of this book

Cognitive computing is rapidly becoming a part of every aspect of our lives through data science, machine learning (ML), and artificial intelligence (AI). It allows computing systems to learn and keep on improving as the amount of data in the system increases. This book introduces you to a whole new paradigm of computing – a paradigm that is totally different from the conventional computing of the Information Age. You will learn the concepts of ML, deep learning (DL), neural networks, and AI with the help of IBM Watson APIs. This book will help you build your own applications to understand, and solve problems, and analyze them as per your needs. You will explore various domains of cognitive computing, such as NLP, voice processing, computer vision, emotion analytics, and conversational systems. Equipped with the knowledge of machine learning concepts, how computers do their magic, and the applications of these concepts, you’ll be able to research and apply cognitive computing in your projects.
Table of Contents (16 chapters)
Title Page
Copyright and Credits
About Packt
Contributors
Preface
Index

Using a custom model in NLU


Once you have deployed a model to your NLU instance, you can reference that model in the feature attributes for either entities or relations (or both).

The following are the steps:

  1. You need the Model ID, which you can get through the List models method on the NLU service, or more easily from the Model ID listed in the Version History and Deployment tab of Knowledge Studio:
  1. Reference that model ID in your call to the analyze method:
entities=EntitiesOptions(limit=100, mentions=True, sentiment=True, emotion=True, model='7a8d0323-939b-4dbc-afa8-1a60d7966c67')
  1. When you run the analyze method again with this model, you should see dramatically different results than the entity analysis. It might look something like this:
The following entities were found:
[British] of type <ORGANIZATION> was found 1 times, with 0% confidence.
The entity was found in:
"British", at index 55
The emotional scores for this entity are: 12% Anger; 2% Disgust; 15% Fear; 63% Joy; and 3% Sadness...