我正在尝试https://cloud.ibm.com/apidocs/natural-language-understanding中记录的各种功能的示例示例。在尝试使用 Curl 时,除了 Sentiment 功能之外,所有功能示例都可以正常工作。
curl -X POST \
-H "Content-Type: application/json" \
-u "apikey:{apikey}" \
-d @parameters.json \
"{url}/v1/analyze?version=2018-11-16"
parameters.json
{
"url": "www.wsj.com/news/markets",
"features": {
"sentiment": {
"targets": [
"stocks"
]
}
}
}
Sentiment feature response:
{
"language": "en",
"error": "target(s) not found",
"code": 400
}