Link to home
Start Free TrialLog in
Avatar of Emily Johnson
Emily Johnson

asked on

Learning resources for Watson NLC Classification in Python

I'm new to IBM Watson. I have to do natural language classification in python using Watson NLC. Can you please suggest some learning resources which will help me to learn NLC in python from scratch?
Avatar of Flabio Gates
Flabio Gates

Have you seen https://www.ibm.com/watson/developercloud/natural-language-classifier/api/v1/python.html?python
The site shows how to install the required python modules and has examples of classifying text using python
import json
from watson_developer_cloud import NaturalLanguageClassifierV1

natural_language_classifier = NaturalLanguageClassifierV1(
  username='YOUR SERVICE USERNAME',
  password='YOUR SERVICE PASSWORD')

classes = natural_language_classifier.classify('10D41B-nlc-1', 'How hot will it be today?')
print(json.dumps(classes, indent=2))

Open in new window

This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.