Upload
ibm-watson
View
343
Download
0
Embed Size (px)
Citation preview
Building an App Using the Natural Language Classifier
#BuildingWithWatson
Housekeeping Items
• Webinar slides, live recording and Q&A will be emailed
• Ask questions at any time during the presentation - Use chat window on the webinar panel - We're on Twitter: @IBMWatson #BuildingWithWatson
© 2015 International Business Machines Corporation
#BuildingWithWatson
Our Expert: Rahul A. Garg
© 2015 International Business Machines Corporation
Strategy and Offering Management, Watson Solutions
#BuildingWithWatson
What will be covered today?
• Overview• Sample Calls• Parameters• Q&A
© 2015 International Business Machines Corporation
#BuildingWithWatson
Overview• Watson Natural Language Classifier interprets
and classifies natural language with confidence.
• NLC is tuned and tailored to short text (1000 characters or less) and can be trained to function in any domain or application.
• Variety of uses such as Q&A
© 2015 International Business Machines Corporation
#BuildingWithWatson
Usage Examples
• Tackle common questions • Classify SMS texts • Classify tweets
© 2015 International Business Machines Corporation
#BuildingWithWatson© 2015 International Business Machines Corporation
#BuildingWithWatson
Sample Application: Questions on the NLC
• This application shows how to build a question-and-answer application
© 2015 International Business Machines Corporation
#BuildingWithWatson
Preparing Data• Train the NLC using data in comma-separated value (CSV) format.• Rows vs. Columns - Row: Example record - Columns: Based on the number of records; contains representative text to
classify and classes that apply to the text
© 2015 International Business Machines Corporation
CSV file with four records. Each record in this sample includes the text input and one class, which are separated
by a comma.
#BuildingWithWatson
Creating and Training Classifier• $ curl -i -u "<username>":"<password>" \• -F training_data=@<path_to_file>/weather_data_train.csv \• -F training_metadata= "{\"language\":\"en\",\"name\”
:\"TutorialClassifier\"}" \"https://gateway.watsonplatform.net/natural-language-classifier/api/v1/classifiers"
• Reference
© 2015 International Business Machines Corporation
#BuildingWithWatson
Sample Response• { • "name": "TutorialClassifier", • "language": "en", • "status": "Training", • "url": "https://gateway.watsonplatform.net/natural-language-
classifier/api/v1/classifiers/10D41B-nlc-1", • "classifier_id": "10D41B-nlc-1", • "created": "2015-05-28T18:01:57.393Z", • "status_description": "The classifier instance is in its training phase, not yet
ready to accept classify requests" • }
© 2015 International Business Machines Corporation
#BuildingWithWatson
Classifying Text• $ curl -G -u "<username>":"<password>" \
"https://gateway.watsonplatform.net/natural-language-classifier/api/v1/classifiers/<classifier_id>/classify" \ --data-urlencode "text=How hot will it be today?"
© 2015 International Business Machines Corporation
#BuildingWithWatson
Sample Response• {• "classifier_id": "10D41B-nlc-1", • "url": "https://gateway.watsonplatform.net/natural-language-
classifier/api/v1", • "text": "How hot will it be today?", • "top_class": "temperature", • "classes": [ • { "class_name": "temperature", "confidence": 0.9998201258549781 }, • { "class_name": "conditions", "confidence": 0.00017987414502176904 }
] }
© 2015 International Business Machines Corporation
#BuildingWithWatson
Are you ready to get started?
• Watson App Gallery• Getting Started Docs• Toolkit for NLC• API Explorer• API Reference Guide
© 2015 International Business Machines Corporation
#BuildingWithWatson© 2015 International Business Machines Corporation
Q&A
#BuildingWithWatson© 2015 International Business Machines Corporation
What’s next?• Look out for a follow up email with a link to the on-demand version of the webinar,
presentation slides and Q&A recap
• The series continues bi-weekly on Wednesdays @ 12pm ET / 9am PT
• Wednesday, December 2, 2015 • Optimize Conflicting Decisions with the Tradeoff Analytics API
#BuildingWithWatson© 2015 International Business Machines Corporation
Thank you for attending!
Contact usPhone: 1-877-253-0308
Email: [email protected]: Watson Developer Cloud