【问题标题】:tone analyzer api cannot be connected音调分析器 api 无法连接
【发布时间】:2016-04-21 05:14:17
【问题描述】:

我试图通过其 API 连接到 Tone Analyzer。我在 Bluemix 上创建了如下凭据:

ta_url = "https://gateway.watsonplatform.net/tone-analyzer-experimental/api/v2/profile"
username =  "xxxxxxxxxxxxxxxxxxxxxxxxx"
password = "yyyyyyyyyy"

我可以使用相同的方法连接到 Personality Insight(凭据是单独创建的)。

您的帮助将不胜感激!

最好的问候, 肯

【问题讨论】:

  • Ken,您能否添加失败的代码和您收到的错误?

标签: ibm-watson tone-analyzer


【解决方案1】:

Tone AnalyzerPersonality Insights 是两个不同的服务。
查看您尝试使用的网址:

https://gateway.watsonplatform.net/tone-analyzer-experimental/api/v2/profile

我猜您正在尝试使用 /tone 调用来分析一段文本的“音调”。

正确的网址应该是:

https://gateway.watsonplatform.net/tone-analyzer-beta/api/v3/tone

Curl 请求示例

curl -X POST \
 -u USERNAME:PASSWORD \
 -H "Content-Type: application/json" \
 -d 'This is an important email. You should be working on X and have it ready by Friday' \
 "https://gateway.watsonplatform.net/tone-analyzer-experimental/api/v3/tone?version=2016-02-11"

确保将USERNAMEPASSWORD 替换为您的服务凭据。


请参阅Tone Analyzer documentation 以了解有关该服务的更多信息。
请参阅API Explorer 了解有关 API 的更多信息。

更新:音调分析器现在是 Beta 版;网址已更正。

【讨论】:

    猜你喜欢
    • 2023-04-03
    • 2017-12-15
    • 2020-05-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-04-15
    • 1970-01-01
    相关资源
    最近更新 更多