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

Question Answering Projects - Get Synonyms

获取项目的所有同义词。

GET {Endpoint}/language/query-knowledgebases/projects/{projectName}/synonyms?api-version=2021-10-01
GET {Endpoint}/language/query-knowledgebases/projects/{projectName}/synonyms?api-version=2021-10-01&top={top}&skip={skip}&maxpagesize={maxpagesize}

URI 参数

名称 必需 类型 说明
Endpoint
path True

string

支持的认知服务终结点(例如 https://.api.cognitiveservices.azure.com).

projectName
path True

string

maxLength: 100

要使用的项目的名称。

api-version
query True

string

客户端 API 版本。

maxpagesize
query

integer (int32)

单个响应中要包含的最大资源数。

skip
query

integer (int32)

要返回的第一个资源的集合中的偏移量。

top
query

integer (int32)

要从集合返回的最大资源数。

请求头

名称 必需 类型 说明
Ocp-Apim-Subscription-Key True

string

响应

名称 类型 说明
200 OK

SynonymAssets

项目的所有同义词。

Other Status Codes

ErrorResponse

错误响应。

安全性

Ocp-Apim-Subscription-Key

类型: apiKey
在: header

示例

Successful query

示例请求

GET {Endpoint}/language/query-knowledgebases/projects/proj1/synonyms?api-version=2021-10-01

示例响应

{
  "value": [
    {
      "alterations": [
        "qnamaker",
        "qna maker"
      ]
    },
    {
      "alterations": [
        "botframework",
        "bot framework"
      ]
    }
  ]
}

定义

名称 说明
Error

错误对象。

ErrorCode

人工可读错误代码。

ErrorResponse

错误响应。

InnerErrorCode

人工可读错误代码。

InnerErrorModel

包含有关错误的更具体信息的对象。 根据Microsoft一个 API 指南 - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses

SynonymAssets

此项目的所有同义词资产。

WordAlterations

单词更改的集合。

Error

错误对象。

名称 类型 说明
code

ErrorCode

服务器定义的错误代码集之一。

details

Error[]

导致此报告错误的特定错误的详细信息数组。

innererror

InnerErrorModel

包含与当前对象有关错误的更具体信息的对象。

message

string

错误的人工可读表示形式。

target

string

错误的目标。

ErrorCode

人工可读错误代码。

说明
AzureCognitiveSearchIndexLimitReached
AzureCognitiveSearchIndexNotFound
AzureCognitiveSearchNotFound
AzureCognitiveSearchThrottling
Forbidden
InternalServerError
InvalidArgument
InvalidRequest
NotFound
OperationNotFound
ProjectNotFound
ServiceUnavailable
TooManyRequests
Unauthorized

ErrorResponse

错误响应。

名称 类型 说明
error

Error

错误对象。

InnerErrorCode

人工可读错误代码。

说明
AzureCognitiveSearchNotFound
AzureCognitiveSearchThrottling
ExtractionFailure
InvalidParameterValue
InvalidRequest
KnowledgeBaseNotFound

InnerErrorModel

包含有关错误的更具体信息的对象。 根据Microsoft一个 API 指南 - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses

名称 类型 说明
code

InnerErrorCode

服务器定义的错误代码集之一。

details

object

错误详细信息。

innererror

InnerErrorModel

包含与当前对象有关错误的更具体信息的对象。

message

string

错误信息。

target

string

错误目标。

SynonymAssets

此项目的所有同义词资产。

名称 类型 说明
nextLink

string

value

WordAlterations[]

同义词的集合。

WordAlterations

单词更改的集合。

名称 类型 说明
alterations

string[]

单词更改的集合。