I am new to IBM NLU Watson; I wanted to learn anyone is facing the same problem?
I have signed up for a BASIC IBM FREE tier account.
import json
from ibm_watson import NaturalLanguageUnderstandingV1
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
from ibm_watson.natural_language_understanding_v1
import Features, SentimentOptions
## Apikey - provided by IBM
authenticator = IAMAuthenticator('{apikey}')
natural_language_understanding = NaturalLanguageUnderstandingV1(
version='2020-08-01',
authenticator=authenticator
)
## url: aws server
natural_language_understanding.set_service_url('{url}')
response = natural_language_understanding.analyze(
url='www.wsj.com/news/markets',
features=Features(sentiment=SentimentOptions(targets=['stocks']))).get_result()
print(json.dumps(response, indent=2))
ERROR:
ApiException: Error: target(s) not found, Code: 400 , X-global-transaction-id: 41d3b7e1-bd8c-4754-a929-55ee9f4ffdbb