IBM Watson Knowledge Studio: Demo Guide: Building a Machine-learning Annotator Cognitive Solutions Application Development IBM Global Business Partners Duration: 30 minutes Updated: September 5, 2017 Klaus-Peter Schlotter [email protected]Version 1.1
12
Embed
IBM Watson Knowledge Studio: Demo Guide: Building a Machine … · 2017-09-05 · IBM Watson Knowledge Studio: Demo Guide: Building a Machine-learning Annotator Cognitive Solutions
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
IBM Watson Knowledge Studio:
Demo Guide: Building a Machine-learning Annotator
Cognitive Solutions Application Development
IBM Global Business PartnersDuration: 30 minutesUpdated: September 5, 2017Klaus-Peter [email protected]
Version 1.1
Watson Services Workshop
The document assumes that you have already created a machine-learning model with Watson Knowledge Studio and deployed it to your Natural Language Understanding service in your Bluemix Account. The steps are decribed in the document Building a machine-learning annotator with Watson Knowledge Studio.
In the demo a new project will be created and configured until Step 15, then the model from the already existing project will be used.
Step 1 When you have assigned Watson Knowledge Studio to your IBM account, you find the application in your account when you open the following URL:
https://www.ibm.com/marketplace/cloud-computing
Step 2 Login to your account with the IBM Id and select Products and services on the menu behind your profile image
Step 3 On your Products and services list start Watson Knowledge Studio
COPYRIGHT IBM CORPORATION 2017. ALL RIGHTS RESERVED. WKS DEMO SCRIPT Page 2 of 12
Step 4 On the list of instances click the URL of your instance
Step 5 Now you can create a new project give it a Project name. Leave the other defaults and click Create.
Step 6 Create a type system by importing the sample lab02 en-klue2.zip.
You can browse through the Types, Mention Attributes and Relation Types.
COPYRIGHT IBM CORPORATION 2017. ALL RIGHTS RESERVED. WKS DEMO SCRIPT Page 3 of 12
Watson Services Workshop
Step 7 On the Documents tab add documents for annotation by importing thesample document set documents-new.csv.
Step 8 Creating annotation sets on the Documents tab.
An annotation set is a subset of documents from an imported docu-ment set that you assign to a human annotator. The human annotator annotates the documents
Because we only have on person available in WKS we create an annotationset with all documents, for this person.
Specify a Set name and click Generate.
COPYRIGHT IBM CORPORATION 2017. ALL RIGHTS RESERVED. WKS DEMO SCRIPT Page 4 of 12
Watson Services Workshop
Step 9 Adding a dictionary on the Dictionaries tab.
Dictionaries are used in WKS for pre-annotating text when creating a machine learning annotator.
Create a new dictionary...
… and then import dictionary-items-organization.csv, this way it can be edited.
Step 10 Add an entry for IBM – International Business Machines
COPYRIGHT IBM CORPORATION 2017. ALL RIGHTS RESERVED. WKS DEMO SCRIPT Page 5 of 12
Watson Services Workshop
Step 11 Pre-annotating with a dictionary-based annotator on the Annotator Component tab.
You must map at least one dictionary before you can run the pre-anno-tator. Map the ORGANIZATION entity type to the “Test dictionary” dictio-nary you created previously
Search for Organization and select the Test dictionary. Click Save.
Click Create → Create & Run
Select the Annotation Set and click Run
COPYRIGHT IBM CORPORATION 2017. ALL RIGHTS RESERVED. WKS DEMO SCRIPT Page 6 of 12
Watson Services Workshop
Step 12 Creating an annotation task on the Human Annotation tab
In this section, you will learn how to use annotation tasks to track the work of human annotators in Watson Knowledge Studio
Click Add Task specify a Task name and a Deadline in the future the click Create.
Select the Annotation Set created in Step 8 and click Create Task.
COPYRIGHT IBM CORPORATION 2017. ALL RIGHTS RESERVED. WKS DEMO SCRIPT Page 7 of 12
Watson Services Workshop
Step 13 Annotating documents (View the annotated documents)
Open the Annotation Task and select the action Annotate on the Anno-tation Set.
The document Technology – gmanews.tv was annotated with the newly created Organisation IBM. Now mark Thomas Watson ans select Person entity on the right side bar.
In the same document on the Relations tab, Drag the person entity Thomas Watson onto Organization IBM. Select the Relation Type founderOf from in the right side bar.
a) Click the Save button at the top of the editor. Then click Close
b) In the list of documents click Submit All. Confirm with OK.
All the documents in the list should now have a status
c) Close the browser tab with the Ground Truth Editor.
d) Back in the Annotation Task select the AnnotationSet with status
and click . Confirm with OK.
The annotation set is now in status
COPYRIGHT IBM CORPORATION 2017. ALL RIGHTS RESERVED. WKS DEMO SCRIPT Page 8 of 12
Watson Services Workshop
Step 14 Creating and deploying a machine-learning annotator on the Annotator Component tab.
a) Click Create this type of annotator.
b) Select the completed AnnotationSet and click Next.
c) On the Directory Mapping panel select Reuse mapping that is defined … and click Train & Evaluate.
This process may take some time so we switch to the already completed project and show how to deploy the machine learning annotator.
COPYRIGHT IBM CORPORATION 2017. ALL RIGHTS RESERVED. WKS DEMO SCRIPT Page 9 of 12
Watson Services Workshop
Step 15 Deploy the machine learning model to your Natural Language Understanding service in Bluemix.
a) In this project navigate to the Annotator Component tab and click Details on the machine Learning Annotator.
b) On the Versions tab you see list of versions available. On should already be deployed. Click Take Snapshot and as a description just enter some-thing like “Demo Snapshot”. Click OK.
c) Now on the new version created you can click on the Deploy action, select Natural Language Understanding and click Next.
d) Select your Bluemix Region, Space and Service Instance to deploy this model. Because there is already one deployed, the Deploy button is dis-abled. The Demo will be done with the model already deployed.
COPYRIGHT IBM CORPORATION 2017. ALL RIGHTS RESERVED. WKS DEMO SCRIPT Page 10 of 12
Watson Services Workshop
Step 16 Testing the Model with Postman.
a) List your deployed models. You need Basic Auth (username and pass-word from your Natural Language Understanding Service from your Bluemixaccount and the following URL:
b) Test the model with the Basic Auth information from previous step and in the header section add
key: Content-type value: application/json
In the URL exchange models with analyze
In the Body section enter text you want to analyze and service features you want to use:
{ "text": "NCR, which counts later IBM Thomas Watson as one of its earlyemployees, said its products and services account for more than $400 bil-lion in annual commerce and 23 billion consumer selfservice transactions2","features": { "relations": { "model": "10:8ec45dbd-5daf-450f-8a99-c924a7bce649" } } }
COPYRIGHT IBM CORPORATION 2017. ALL RIGHTS RESERVED. WKS DEMO SCRIPT Page 11 of 12
Watson Services Workshop
Respone:
COPYRIGHT IBM CORPORATION 2017. ALL RIGHTS RESERVED. WKS DEMO SCRIPT Page 12 of 12