【问题标题】:Alchemy News Excerpts炼金术新闻摘录
【发布时间】:2016-10-02 17:25:46
【问题描述】:

我们正在为我们的用户格式化和呈现 Alchemy Data News 查询结果。我想我看到了其他演示(例如 Watson News Explorer),它们显示了每篇文章的一小段摘录。我没有看到 Alchemy Data News API 返回的任何摘录。我们在查询中遗漏了什么吗?我们如何为我们的用户显示新闻故事的摘录?

【问题讨论】:

    标签: ibm-watson alchemyapi


    【解决方案1】:

    您可以使用 return=enriched.url.text

    检索文本样本

    在此处查看完整的参数列表

    https://docs.google.com/spreadsheets/d/1wN0e_fhYCO7GBAneN9xjrNo57OtS_0Tr8FI9xCMfmzM/edit#gid=0

    例如

    https://gateway-a.watsonplatform.net/calls/data/GetNews?apikey=****
      &outputMode=json&start=now-1d&end=now&count=100
      &q.enriched.url.enrichedTitle.relations.relation
      =|action.verb.text=acquire,object.entities.entity.type=Company|
      &return=enriched.url.text
    

    会回来

    {
        "status": "OK",
        "usage": "By accessing AlchemyAPI or using information generated by AlchemyAPI, you are agreeing to be bound by the AlchemyAPI Terms of Use: http://www.alchemyapi.com/company/terms.html",
        "totalTransactions": "148",
        "result": {
            "docs": [
                {
                    "id": "NzI0MTkzMTM0N3wxNDY0OTYzMzY2",
                    "source": {
                        "enriched": {
                            "url": {
                                "text": "We've heard all year that fighting
                                 the opioid crisis is the most important issue facing the New Hampshire
                                 Legislature. Executive Councilor Colin Van Ostern is required by law to
                                 file a report on his gubernatorial campaign's receipts and expenditures by
                                 June 22. ..."
                            }
                        }
                    },
                    "timestamp": 1464963366
                },(...)
    

    ps。我正在为 Bluemix 使用 Alchemy API

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-09-27
      • 1970-01-01
      • 2014-10-12
      • 1970-01-01
      • 1970-01-01
      • 2022-01-11
      • 1970-01-01
      相关资源
      最近更新 更多