【问题标题】:Correct syntax for curl command for conceptualSearch Watson API概念搜索 Watson API 的 curl 命令的正确语法
【发布时间】:2016-05-19 02:09:18
【问题描述】:

我设置了一个名为 devoxx_corpus1 的私有语料库。我可以成功运行:

curl -u "username":"password" -G -d "ids=[\"/graphs/wikipedia/en-20120601/concepts/Java_(programming_language)\"]" "https://gateway.watsonplatform.net/concept-insights/api/v2/corpora/eve6tionsto1/devoxx_corpus1/conceptual_search"

但在添加 document_fields={\"user_fields\":1} 后无法运行相同的命令,这在我的项目中进行概念搜索时添加非常重要。

您能否给我正确的语法来运行带有上述概念和document_fields的curl命令。

【问题讨论】:

    标签: curl ibm-watson concept-insights


    【解决方案1】:

    我在命令行中添加了-d 'document_fields={"user_fields":1}',它似乎可以工作。

    例如,这个 curl 调用对我使用公共 TEDTalks 语料库很有帮助:

    curl -u 用户名:密码 -G -d 'ids=["/graphs/wikipedia/en-20120601/concepts/Java_(programming_language)"]' -d 'document_fields={"user_fields":1}' " https://gateway.watsonplatform.net/concept-insights/api/v2/corpora/public/TEDTalks/conceptual_search"

    【讨论】:

    • 感谢您的回复。该命令有效! .还有一个问题,我可以忽略从维基百科图表返回的结果吗,因为我只对我的语料库中的结果感兴趣。
    猜你喜欢
    • 2015-08-10
    • 2019-11-20
    • 1970-01-01
    • 1970-01-01
    • 2016-09-20
    • 1970-01-01
    • 1970-01-01
    • 2016-08-15
    • 1970-01-01
    相关资源
    最近更新 更多