ibm-cloud-docs / natural-language-understanding

natural-language-understanding
22 stars 36 forks source link

Unable to import ClassificationsOptions #78

Closed vera-nan closed 3 years ago

vera-nan commented 3 years ago

I am unable to import ClassificationsOptions from the libraries:

from ibm_watson.natural_language_understanding_v1 import Features, ClassificationsOptions ImportError: cannot import name 'ClassificationsOptions' from 'ibm_watson.natural_language_understanding_v1'

SirSpidey commented 3 years ago

Hi @vera-nan,

I'm not sure which Watson SDK you're referring to, but here are 2 thoughts:

Python

from ibm_watson import NaturalLanguageUnderstandingV1
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator

Ruby

require "ibm_watson/natural_language_understanding_v1"
include IBMWatson

See the API reference for Python: Create classifications model. If you have other issues, consider posting an issue directly in th SDK repo. The link is available in the introduction of the API ref for the language or framework that you're using.