你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Model - List Entity Suggestions

获取可提高应用程序版本中实体模型准确性的建议示例话语。

GET {Endpoint}/luis/authoring/v3.0-preview/apps/{appId}/versions/{versionId}/entities/{entityId}/suggest
GET {Endpoint}/luis/authoring/v3.0-preview/apps/{appId}/versions/{versionId}/entities/{entityId}/suggest?take={take}&enableNestedChildren={enableNestedChildren}

URI 参数

Name In Required Type Description
appId
path True
  • string
uuid

应用程序 ID。

Endpoint
path True
  • string

支持的认知服务终结点 (协议和主机名,例如: https://westus.api.cognitive.microsoft.com) 。

entityId
path True
  • string
uuid

要增强的目标实体提取程序模型。

versionId
path True
  • string

版本 ID。

enableNestedChildren
query
  • boolean

切换嵌套/平面格式

take
query
  • integer

要返回的条目数。 最大页面大小为 500。 默认值为 100。

请求头

Name Required Type Description
Ocp-Apim-Subscription-Key True
  • string

响应

Name Type Description
200 OK

如果没有训练的实体模型,则响应中不会返回任何内容。 如果有经过训练的模型和主动学习查找任何相关查询,则会使用实体模型预测返回这些查询。 如果有已训练的模型,但主动学习找不到任何相关查询,则会在响应中返回空列表。

Other Status Codes

错误响应。

安全性

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

示例

Successful Get Entity Suggestion Examples

Sample Request

GET {Endpoint}/luis/authoring/v3.0-preview/apps/86226c53-b7a6-416f-876b-226b2b5ab07b/versions/0.1/entities/3d73462d-98f0-4dcd-8d30-fab9e65f2e73/suggest?enableNestedChildren=False

Sample Response

[
  {
    "text": "hey",
    "tokenizedText": [
      "hey"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 0.65
      },
      {
        "name": "FindAirportByCode",
        "score": 0.02
      },
      {
        "name": "WeatherInPlace",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "2-2-2017",
    "tokenizedText": [
      "2",
      "-",
      "2",
      "-",
      "2017"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 0.88
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "datetime",
        "startTokenIndex": 0,
        "endTokenIndex": 4,
        "phrase": "2-2-2017"
      }
    ]
  },
  {
    "text": "maybe find me an airport first",
    "tokenizedText": [
      "maybe",
      "find",
      "me",
      "an",
      "airport",
      "first"
    ],
    "intentPredictions": [
      {
        "name": "FindAirportByCode",
        "score": 0.99
      },
      {
        "name": "FindHotels",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "as",
    "tokenizedText": [
      "as"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 0.98
      },
      {
        "name": "FindAirportByCode",
        "score": 0.01
      },
      {
        "name": "WeatherInPlace",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "find hotel in barcelona",
    "tokenizedText": [
      "find",
      "hotel",
      "in",
      "barcelona"
    ],
    "intentPredictions": [
      {
        "name": "FindHotels",
        "score": 1
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Renamed Entity",
        "startTokenIndex": 3,
        "endTokenIndex": 3,
        "phrase": "barcelona"
      },
      {
        "entityName": "geography",
        "startTokenIndex": 3,
        "endTokenIndex": 3,
        "phrase": "barcelona"
      }
    ]
  },
  {
    "text": "find airport with code atl",
    "tokenizedText": [
      "find",
      "airport",
      "with",
      "code",
      "atl"
    ],
    "intentPredictions": [
      {
        "name": "FindAirportByCode",
        "score": 1
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Code",
        "startTokenIndex": 4,
        "endTokenIndex": 4,
        "phrase": "atl"
      }
    ]
  },
  {
    "text": "change hotel location to madrid",
    "tokenizedText": [
      "change",
      "hotel",
      "location",
      "to",
      "madrid"
    ],
    "intentPredictions": [
      {
        "name": "FindHotels-ChangeLocation",
        "score": 1
      },
      {
        "name": "FindHotels",
        "score": 0.24
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Renamed Entity",
        "startTokenIndex": 4,
        "endTokenIndex": 4,
        "phrase": "madrid"
      }
    ]
  },
  {
    "text": "ok, find me an airport",
    "tokenizedText": [
      "ok",
      ",",
      "find",
      "me",
      "an",
      "airport"
    ],
    "intentPredictions": [
      {
        "name": "FindAirportByCode",
        "score": 1
      },
      {
        "name": "FindHotels",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "eze",
    "tokenizedText": [
      "eze"
    ],
    "intentPredictions": [
      {
        "name": "FindAirportByCode",
        "score": 0.68
      },
      {
        "name": "None",
        "score": 0.29
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Code",
        "startTokenIndex": 0,
        "endTokenIndex": 0,
        "phrase": "eze"
      }
    ]
  },
  {
    "text": "today",
    "tokenizedText": [
      "today"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 0.64
      },
      {
        "name": "FindAirportByCode",
        "score": 0.01
      },
      {
        "name": "WeatherInPlace",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "datetime",
        "startTokenIndex": 0,
        "endTokenIndex": 0,
        "phrase": "today"
      },
      {
        "entityName": "datetime",
        "startTokenIndex": 0,
        "endTokenIndex": 0,
        "phrase": "today"
      }
    ]
  },
  {
    "text": "buenos aires",
    "tokenizedText": [
      "buenos",
      "aires"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 0.16
      },
      {
        "name": "WeatherInPlace",
        "score": 0.07
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "hi there",
    "tokenizedText": [
      "hi",
      "there"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 0.37
      },
      {
        "name": "FindAirportByCode",
        "score": 0.01
      },
      {
        "name": "WeatherInPlace",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "05-28-2017",
    "tokenizedText": [
      "05",
      "-",
      "28",
      "-",
      "2017"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 0.85
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "datetime",
        "startTokenIndex": 0,
        "endTokenIndex": 4,
        "phrase": "05-28-2017"
      }
    ]
  },
  {
    "text": "tomorrow",
    "tokenizedText": [
      "tomorrow"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 0.6
      },
      {
        "name": "FindAirportByCode",
        "score": 0.01
      },
      {
        "name": "WeatherInPlace",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "datetime",
        "startTokenIndex": 0,
        "endTokenIndex": 0,
        "phrase": "tomorrow"
      }
    ]
  },
  {
    "text": "tell me the weather in san francisco",
    "tokenizedText": [
      "tell",
      "me",
      "the",
      "weather",
      "in",
      "san",
      "francisco"
    ],
    "intentPredictions": [
      {
        "name": "WeatherInPlace",
        "score": 0.99
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Renamed Entity",
        "startTokenIndex": 5,
        "endTokenIndex": 6,
        "phrase": "san francisco"
      },
      {
        "entityName": "geography",
        "startTokenIndex": 5,
        "endTokenIndex": 6,
        "phrase": "san francisco"
      }
    ]
  },
  {
    "text": "find me a hotel in barcelona",
    "tokenizedText": [
      "find",
      "me",
      "a",
      "hotel",
      "in",
      "barcelona"
    ],
    "intentPredictions": [
      {
        "name": "FindHotels",
        "score": 1
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Renamed Entity",
        "startTokenIndex": 5,
        "endTokenIndex": 5,
        "phrase": "barcelona"
      }
    ]
  },
  {
    "text": "dme",
    "tokenizedText": [
      "dme"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 0.62
      },
      {
        "name": "FindAirportByCode",
        "score": 0.09
      },
      {
        "name": "WeatherInPlace",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "dude",
    "tokenizedText": [
      "dude"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 0.65
      },
      {
        "name": "FindAirportByCode",
        "score": 0.02
      },
      {
        "name": "WeatherInPlace",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "sorry, find me airport juj",
    "tokenizedText": [
      "sorry",
      ",",
      "find",
      "me",
      "airport",
      "juj"
    ],
    "intentPredictions": [
      {
        "name": "FindAirportByCode",
        "score": 1
      },
      {
        "name": "FindHotels",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Code",
        "startTokenIndex": 5,
        "endTokenIndex": 5,
        "phrase": "juj"
      }
    ]
  },
  {
    "text": "madrid",
    "tokenizedText": [
      "madrid"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 0.52
      },
      {
        "name": "WeatherInPlace",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "search for airport",
    "tokenizedText": [
      "search",
      "for",
      "airport"
    ],
    "intentPredictions": [
      {
        "name": "FindAirportByCode",
        "score": 1
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "what's the time in miami?",
    "tokenizedText": [
      "what",
      "'",
      "s",
      "the",
      "time",
      "in",
      "miami",
      "?"
    ],
    "intentPredictions": [
      {
        "name": "TimeInPlace",
        "score": 1
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Renamed Entity",
        "startTokenIndex": 6,
        "endTokenIndex": 6,
        "phrase": "miami"
      },
      {
        "entityName": "geography",
        "startTokenIndex": 6,
        "endTokenIndex": 6,
        "phrase": "miami"
      }
    ]
  },
  {
    "text": "next monday",
    "tokenizedText": [
      "next",
      "monday"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 0.3
      },
      {
        "name": "FindAirportByCode",
        "score": 0.01
      },
      {
        "name": "WeatherInPlace",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "datetime",
        "startTokenIndex": 0,
        "endTokenIndex": 1,
        "phrase": "next monday"
      }
    ]
  },
  {
    "text": "search hotels, seattle",
    "tokenizedText": [
      "search",
      "hotels",
      ",",
      "seattle"
    ],
    "intentPredictions": [
      {
        "name": "FindHotels",
        "score": 1
      },
      {
        "name": "None",
        "score": 0.02
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "geography",
        "startTokenIndex": 3,
        "endTokenIndex": 3,
        "phrase": "seattle"
      }
    ]
  },
  {
    "text": "change location to madrid",
    "tokenizedText": [
      "change",
      "location",
      "to",
      "madrid"
    ],
    "intentPredictions": [
      {
        "name": "FindHotels-ChangeLocation",
        "score": 1
      },
      {
        "name": "None",
        "score": 0.03
      },
      {
        "name": "FindAirportByCode",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Renamed Entity",
        "startTokenIndex": 3,
        "endTokenIndex": 3,
        "phrase": "madrid"
      }
    ]
  },
  {
    "text": "search hotels, \"next day\"",
    "tokenizedText": [
      "search",
      "hotels",
      ",",
      "\"",
      "next",
      "day",
      "\""
    ],
    "intentPredictions": [
      {
        "name": "FindHotels",
        "score": 0.99
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "find a deluxe room in a 3 stars hotel in barcelona please",
    "tokenizedText": [
      "find",
      "a",
      "deluxe",
      "room",
      "in",
      "a",
      "3",
      "stars",
      "hotel",
      "in",
      "barcelona",
      "please"
    ],
    "intentPredictions": [
      {
        "name": "FindHotels",
        "score": 1
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "RoomType",
        "startTokenIndex": 2,
        "endTokenIndex": 2,
        "phrase": "deluxe"
      },
      {
        "entityName": "Category",
        "startTokenIndex": 6,
        "endTokenIndex": 7,
        "phrase": "3 stars"
      },
      {
        "entityName": "Renamed Entity",
        "startTokenIndex": 10,
        "endTokenIndex": 10,
        "phrase": "barcelona"
      },
      {
        "entityName": "geography",
        "startTokenIndex": 10,
        "endTokenIndex": 10,
        "phrase": "barcelona"
      }
    ]
  },
  {
    "text": "time miami",
    "tokenizedText": [
      "time",
      "miami"
    ],
    "intentPredictions": [
      {
        "name": "TimeInPlace",
        "score": 1
      },
      {
        "name": "None",
        "score": 0.14
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "find hotel in barcelona from today",
    "tokenizedText": [
      "find",
      "hotel",
      "in",
      "barcelona",
      "from",
      "today"
    ],
    "intentPredictions": [
      {
        "name": "FindHotels",
        "score": 1
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Renamed Entity",
        "startTokenIndex": 3,
        "endTokenIndex": 3,
        "phrase": "barcelona"
      },
      {
        "entityName": "Checkin",
        "startTokenIndex": 5,
        "endTokenIndex": 5,
        "phrase": "today"
      },
      {
        "entityName": "datetime",
        "startTokenIndex": 5,
        "endTokenIndex": 5,
        "phrase": "today"
      }
    ]
  },
  {
    "text": "search for 5 start hotels in jujuy",
    "tokenizedText": [
      "search",
      "for",
      "5",
      "start",
      "hotels",
      "in",
      "jujuy"
    ],
    "intentPredictions": [
      {
        "name": "FindHotels",
        "score": 1
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "datetime",
        "startTokenIndex": 2,
        "endTokenIndex": 2,
        "phrase": "5"
      },
      {
        "entityName": "Category",
        "startTokenIndex": 2,
        "endTokenIndex": 3,
        "phrase": "5 start"
      },
      {
        "entityName": "Renamed Entity",
        "startTokenIndex": 6,
        "endTokenIndex": 6,
        "phrase": "jujuy"
      }
    ]
  },
  {
    "text": "search hotels, past tomorrow",
    "tokenizedText": [
      "search",
      "hotels",
      ",",
      "past",
      "tomorrow"
    ],
    "intentPredictions": [
      {
        "name": "FindHotels",
        "score": 1
      },
      {
        "name": "None",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "datetime",
        "startTokenIndex": 4,
        "endTokenIndex": 4,
        "phrase": "tomorrow"
      }
    ]
  },
  {
    "text": "loz",
    "tokenizedText": [
      "loz"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 1
      },
      {
        "name": "FindAirportByCode",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Code",
        "startTokenIndex": 0,
        "endTokenIndex": 0,
        "phrase": "loz"
      }
    ]
  },
  {
    "text": "show me the weather",
    "tokenizedText": [
      "show",
      "me",
      "the",
      "weather"
    ],
    "intentPredictions": [
      {
        "name": "WeatherInPlace",
        "score": 1
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "dme airport",
    "tokenizedText": [
      "dme",
      "airport"
    ],
    "intentPredictions": [
      {
        "name": "FindAirportByCode",
        "score": 0.99
      },
      {
        "name": "None",
        "score": 0.04
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Code",
        "startTokenIndex": 0,
        "endTokenIndex": 0,
        "phrase": "dme"
      }
    ]
  },
  {
    "text": "find zzz airport",
    "tokenizedText": [
      "find",
      "zzz",
      "airport"
    ],
    "intentPredictions": [
      {
        "name": "FindAirportByCode",
        "score": 1
      },
      {
        "name": "None",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Code",
        "startTokenIndex": 1,
        "endTokenIndex": 1,
        "phrase": "zzz"
      }
    ]
  },
  {
    "text": "change location to miami",
    "tokenizedText": [
      "change",
      "location",
      "to",
      "miami"
    ],
    "intentPredictions": [
      {
        "name": "FindHotels-ChangeLocation",
        "score": 1
      },
      {
        "name": "None",
        "score": 0.08
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Renamed Entity",
        "startTokenIndex": 3,
        "endTokenIndex": 3,
        "phrase": "miami"
      },
      {
        "entityName": "geography",
        "startTokenIndex": 3,
        "endTokenIndex": 3,
        "phrase": "miami"
      }
    ]
  },
  {
    "text": "find hotel from today till next monday",
    "tokenizedText": [
      "find",
      "hotel",
      "from",
      "today",
      "till",
      "next",
      "monday"
    ],
    "intentPredictions": [
      {
        "name": "FindHotels",
        "score": 1
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Checkin",
        "startTokenIndex": 3,
        "endTokenIndex": 3,
        "phrase": "today"
      },
      {
        "entityName": "datetime",
        "startTokenIndex": 3,
        "endTokenIndex": 3,
        "phrase": "today"
      },
      {
        "entityName": "Checkout",
        "startTokenIndex": 5,
        "endTokenIndex": 6,
        "phrase": "next monday"
      },
      {
        "entityName": "datetime",
        "startTokenIndex": 5,
        "endTokenIndex": 6,
        "phrase": "next monday"
      }
    ]
  },
  {
    "text": "sorry, find me airport with code bcn",
    "tokenizedText": [
      "sorry",
      ",",
      "find",
      "me",
      "airport",
      "with",
      "code",
      "bcn"
    ],
    "intentPredictions": [
      {
        "name": "FindAirportByCode",
        "score": 1
      },
      {
        "name": "FindHotels",
        "score": 0.02
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Code",
        "startTokenIndex": 7,
        "endTokenIndex": 7,
        "phrase": "bcn"
      }
    ]
  },
  {
    "text": "actionresult = \"weather in aisjj3o9f2\"",
    "tokenizedText": [
      "actionresult",
      "=",
      "\"",
      "weather",
      "in",
      "aisjj3o9f2",
      "\""
    ],
    "intentPredictions": [
      {
        "name": "WeatherInPlace",
        "score": 0.82
      },
      {
        "name": "FindHotels",
        "score": 0.02
      },
      {
        "name": "None",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Renamed Entity",
        "startTokenIndex": 5,
        "endTokenIndex": 5,
        "phrase": "aisjj3o9f2"
      }
    ]
  },
  {
    "text": "[object object]",
    "tokenizedText": [
      "[",
      "object",
      "object",
      "]"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 0.06
      },
      {
        "name": "FindHotels",
        "score": 0.05
      },
      {
        "name": "FindAirportByCode",
        "score": 0.01
      },
      {
        "name": "WeatherInPlace",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "05-27-2017",
    "tokenizedText": [
      "05",
      "-",
      "27",
      "-",
      "2017"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 0.84
      },
      {
        "name": "FindHotels",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "datetime",
        "startTokenIndex": 0,
        "endTokenIndex": 4,
        "phrase": "05-27-2017"
      }
    ]
  },
  {
    "text": "change hotel location",
    "tokenizedText": [
      "change",
      "hotel",
      "location"
    ],
    "intentPredictions": [
      {
        "name": "FindHotels-ChangeLocation",
        "score": 1
      },
      {
        "name": "FindHotels",
        "score": 0.03
      },
      {
        "name": "None",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "asdttt",
    "tokenizedText": [
      "asdttt"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 1
      },
      {
        "name": "FindAirportByCode",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "whats the time in miami",
    "tokenizedText": [
      "whats",
      "the",
      "time",
      "in",
      "miami"
    ],
    "intentPredictions": [
      {
        "name": "TimeInPlace",
        "score": 1
      },
      {
        "name": "WeatherInPlace",
        "score": 0.01
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Renamed Entity",
        "startTokenIndex": 4,
        "endTokenIndex": 4,
        "phrase": "miami"
      },
      {
        "entityName": "geography",
        "startTokenIndex": 4,
        "endTokenIndex": 4,
        "phrase": "miami"
      }
    ]
  },
  {
    "text": "time in brasil",
    "tokenizedText": [
      "time",
      "in",
      "brasil"
    ],
    "intentPredictions": [
      {
        "name": "TimeInPlace",
        "score": 1
      },
      {
        "name": "None",
        "score": 0.01
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Renamed Entity",
        "startTokenIndex": 2,
        "endTokenIndex": 2,
        "phrase": "brasil"
      }
    ]
  },
  {
    "text": "mia",
    "tokenizedText": [
      "mia"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 0.65
      },
      {
        "name": "FindAirportByCode",
        "score": 0.02
      },
      {
        "name": "WeatherInPlace",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "3-3-2017",
    "tokenizedText": [
      "3",
      "-",
      "3",
      "-",
      "2017"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 0.87
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "datetime",
        "startTokenIndex": 0,
        "endTokenIndex": 4,
        "phrase": "3-3-2017"
      }
    ]
  },
  {
    "text": "how is the weather in buenos aires?",
    "tokenizedText": [
      "how",
      "is",
      "the",
      "weather",
      "in",
      "buenos",
      "aires",
      "?"
    ],
    "intentPredictions": [
      {
        "name": "WeatherInPlace",
        "score": 0.97
      },
      {
        "name": "FindHotels",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Renamed Entity",
        "startTokenIndex": 5,
        "endTokenIndex": 6,
        "phrase": "buenos aires"
      },
      {
        "entityName": "geography",
        "startTokenIndex": 5,
        "endTokenIndex": 6,
        "phrase": "buenos aires"
      },
      {
        "entityName": "geography",
        "startTokenIndex": 5,
        "endTokenIndex": 6,
        "phrase": "buenos aires"
      },
      {
        "entityName": "geography",
        "startTokenIndex": 5,
        "endTokenIndex": 6,
        "phrase": "buenos aires"
      }
    ]
  },
  {
    "text": "n",
    "tokenizedText": [
      "n"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 0.98
      },
      {
        "name": "FindAirportByCode",
        "score": 0.01
      },
      {
        "name": "WeatherInPlace",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "find aaa airport",
    "tokenizedText": [
      "find",
      "aaa",
      "airport"
    ],
    "intentPredictions": [
      {
        "name": "FindAirportByCode",
        "score": 1
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Code",
        "startTokenIndex": 1,
        "endTokenIndex": 1,
        "phrase": "aaa"
      }
    ]
  },
  {
    "text": "find airport lhr",
    "tokenizedText": [
      "find",
      "airport",
      "lhr"
    ],
    "intentPredictions": [
      {
        "name": "FindAirportByCode",
        "score": 0.99
      },
      {
        "name": "None",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Code",
        "startTokenIndex": 2,
        "endTokenIndex": 2,
        "phrase": "lhr"
      }
    ]
  },
  {
    "text": "juj",
    "tokenizedText": [
      "juj"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 1
      },
      {
        "name": "FindAirportByCode",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Code",
        "startTokenIndex": 0,
        "endTokenIndex": 0,
        "phrase": "juj"
      }
    ]
  },
  {
    "text": "adweqwe",
    "tokenizedText": [
      "adweqwe"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 1
      },
      {
        "name": "FindAirportByCode",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "find hotel in madrid for today",
    "tokenizedText": [
      "find",
      "hotel",
      "in",
      "madrid",
      "for",
      "today"
    ],
    "intentPredictions": [
      {
        "name": "FindHotels",
        "score": 1
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Renamed Entity",
        "startTokenIndex": 3,
        "endTokenIndex": 3,
        "phrase": "madrid"
      },
      {
        "entityName": "geography",
        "startTokenIndex": 3,
        "endTokenIndex": 3,
        "phrase": "madrid"
      },
      {
        "entityName": "Checkin",
        "startTokenIndex": 5,
        "endTokenIndex": 5,
        "phrase": "today"
      },
      {
        "entityName": "datetime",
        "startTokenIndex": 5,
        "endTokenIndex": 5,
        "phrase": "today"
      }
    ]
  },
  {
    "text": "find airport zzz",
    "tokenizedText": [
      "find",
      "airport",
      "zzz"
    ],
    "intentPredictions": [
      {
        "name": "FindAirportByCode",
        "score": 1
      },
      {
        "name": "None",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Code",
        "startTokenIndex": 2,
        "endTokenIndex": 2,
        "phrase": "zzz"
      }
    ]
  },
  {
    "text": "search hotels, \"past tomorrow\"",
    "tokenizedText": [
      "search",
      "hotels",
      ",",
      "\"",
      "past",
      "tomorrow",
      "\""
    ],
    "intentPredictions": [
      {
        "name": "FindHotels",
        "score": 1
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "datetime",
        "startTokenIndex": 5,
        "endTokenIndex": 5,
        "phrase": "tomorrow"
      }
    ]
  },
  {
    "text": "search for 5 stars hotels in barcelo",
    "tokenizedText": [
      "search",
      "for",
      "5",
      "stars",
      "hotels",
      "in",
      "barcelo"
    ],
    "intentPredictions": [
      {
        "name": "FindHotels",
        "score": 1
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Category",
        "startTokenIndex": 2,
        "endTokenIndex": 3,
        "phrase": "5 stars"
      },
      {
        "entityName": "Renamed Entity",
        "startTokenIndex": 6,
        "endTokenIndex": 6,
        "phrase": "barcelo"
      }
    ]
  },
  {
    "text": "airport",
    "tokenizedText": [
      "airport"
    ],
    "intentPredictions": [
      {
        "name": "FindAirportByCode",
        "score": 1
      },
      {
        "name": "None",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "change location",
    "tokenizedText": [
      "change",
      "location"
    ],
    "intentPredictions": [
      {
        "name": "FindHotels-ChangeLocation",
        "score": 1
      },
      {
        "name": "None",
        "score": 0.19
      },
      {
        "name": "FindAirportByCode",
        "score": 0.02
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": []
  },
  {
    "text": "11/11/2017",
    "tokenizedText": [
      "11",
      "/",
      "11",
      "/",
      "2017"
    ],
    "intentPredictions": [
      {
        "name": "None",
        "score": 0.9
      },
      {
        "name": "FindHotels",
        "score": 0.01
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "WeatherInPlace",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "datetime",
        "startTokenIndex": 0,
        "endTokenIndex": 4,
        "phrase": "11/11/2017"
      }
    ]
  },
  {
    "text": "tell me the weather in new york",
    "tokenizedText": [
      "tell",
      "me",
      "the",
      "weather",
      "in",
      "new",
      "york"
    ],
    "intentPredictions": [
      {
        "name": "WeatherInPlace",
        "score": 1
      },
      {
        "name": "TimeInPlace",
        "score": 0
      },
      {
        "name": "None",
        "score": 0
      },
      {
        "name": "FindAirportByCode",
        "score": 0
      },
      {
        "name": "FindHotels-ChangeLocation",
        "score": 0
      },
      {
        "name": "FindHotels",
        "score": 0
      }
    ],
    "entityPredictions": [
      {
        "entityName": "Renamed Entity",
        "startTokenIndex": 5,
        "endTokenIndex": 6,
        "phrase": "new york"
      },
      {
        "entityName": "geography",
        "startTokenIndex": 5,
        "endTokenIndex": 6,
        "phrase": "new york"
      },
      {
        "entityName": "Retrieve Sample List",
        "startTokenIndex": 5,
        "endTokenIndex": 6,
        "phrase": "new york"
      }
    ]
  }
]

定义

EntitiesSuggestionExample

预测/建议实体。

EntityPrediction

建议的实体。

ErrorResponse

在 API 上调用操作时出现错误响应。

IntentPrediction

建议的意向。

EntitiesSuggestionExample

预测/建议实体。

Name Type Description
entityPredictions

预测/建议的实体。

intentPredictions

预测/建议的意向。

text
  • string

话语。 例如,“西雅图天气怎么样?”

tokenizedText
  • string[]

话语已标记化。

EntityPrediction

建议的实体。

Name Type Description
children

建议的实体。

endTokenIndex
  • integer

提取实体结束的话语中的索引。

entityName
  • string

实体的名称

phrase
  • string

构成实体的实际令牌 () 。

startTokenIndex
  • integer

提取实体启动的话语中的索引。

ErrorResponse

在 API 上调用操作时出现错误响应。

Name Type Description
errorType
  • string

IntentPrediction

建议的意向。

Name Type Description
name
  • string

意向的名称

score
  • number

基于预测模型的意向分数。