你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Text Analysis Runtime - Analyze Text
请求对文档集合进行文本分析。
POST {Endpoint}/language/:analyze-text?api-version=2023-04-01
POST {Endpoint}/language/:analyze-text?api-version=2023-04-01&showStats={showStats}
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
Endpoint
|
path | True |
string |
支持的认知服务终结点 (例如 https://.api.cognitiveservices.azure.com). |
api-version
|
query | True |
string |
要用于此操作的 API 版本。 |
show
|
query |
boolean |
(可选) 如果设置为 true,则响应将包含请求和文档级别的统计信息。 |
请求头
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
请求正文
请求正文可以为下列任一内容:
名称 | 说明 |
---|---|
Analyze |
包含分析文本实体链接输入。 |
Analyze |
实体识别分析文本输入任务请求。 |
Analyze |
包含分析文本 KeyPhraseExtraction 任务输入。 |
Analyze |
包含语言检测文档分析任务输入。 |
Analyze |
包含分析文本 PIIEntityRecognition 任务输入。 |
Analyze |
包含分析文本 SentimentAnalysis 任务输入。 |
AnalyzeTextEntityLinkingInput
包含分析文本实体链接输入。
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
kind | True |
string:
Entity |
要执行的任务类型。 |
analysisInput |
包含要由服务处理的分析输入。 |
||
parameters |
任务参数。 |
AnalyzeTextEntityRecognitionInput
实体识别分析文本输入任务请求。
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
kind | True |
string:
Entity |
要执行的任务类型。 |
analysisInput |
要分析的输入。 |
||
parameters |
任务参数。 |
AnalyzeTextKeyPhraseExtractionInput
包含分析文本 KeyPhraseExtraction 任务输入。
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
kind | True |
string:
Key |
要执行的任务类型。 |
analysisInput |
包含输入文档。 |
||
parameters |
关键短语提取任务参数。 |
AnalyzeTextLanguageDetectionInput
包含语言检测文档分析任务输入。
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
kind | True |
string:
Language |
要执行的任务类型。 |
analysisInput |
要分析的文档。 |
||
parameters |
任务参数。 |
AnalyzeTextPiiEntitiesRecognitionInput
包含分析文本 PIIEntityRecognition 任务输入。
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
kind | True |
string:
Pii |
要执行的任务类型。 |
analysisInput |
包含输入文档。 |
||
parameters |
Pii 任务参数。 |
AnalyzeTextSentimentAnalysisInput
包含分析文本 SentimentAnalysis 任务输入。
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
kind | True |
string:
Sentiment |
要执行的任务类型。 |
analysisInput |
包含输入文档。 |
||
parameters |
情绪分析任务参数。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK | AnalyzeTextTaskResult: |
请求已成功。 |
Other Status Codes |
意外的错误响应。 Headers x-ms-error-code: string |
安全性
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
示例
SuccessfulEntityLinkingRequest
Sample Request
POST {Endpoint}/language/:analyze-text?api-version=2023-04-01
{
"kind": "EntityLinking",
"parameters": {
"modelVersion": "latest"
},
"analysisInput": {
"documents": [
{
"id": "1",
"language": "en",
"text": "Microsoft was founded by Bill Gates and Paul Allen."
},
{
"id": "2",
"language": "en",
"text": "Pike place market is my favorite Seattle attraction."
}
]
}
}
Sample Response
{
"kind": "EntityLinkingResults",
"results": {
"documents": [
{
"entities": [
{
"dataSource": "Wikipedia",
"id": "Bill Gates",
"language": "en",
"matches": [
{
"confidenceScore": 0.52,
"length": 10,
"offset": 25,
"text": "Bill Gates"
}
],
"name": "Bill Gates",
"url": "https://en.wikipedia.org/wiki/Bill_Gates"
},
{
"dataSource": "Wikipedia",
"id": "Paul Allen",
"language": "en",
"matches": [
{
"confidenceScore": 0.54,
"length": 10,
"offset": 40,
"text": "Paul Allen"
}
],
"name": "Paul Allen",
"url": "https://en.wikipedia.org/wiki/Paul_Allen"
},
{
"dataSource": "Wikipedia",
"id": "Microsoft",
"language": "en",
"matches": [
{
"confidenceScore": 0.49,
"length": 9,
"offset": 0,
"text": "Microsoft"
}
],
"name": "Microsoft",
"url": "https://en.wikipedia.org/wiki/Microsoft"
}
],
"id": "1",
"warnings": []
},
{
"entities": [
{
"dataSource": "Wikipedia",
"id": "Pike Place Market",
"language": "en",
"matches": [
{
"confidenceScore": 0.86,
"length": 17,
"offset": 0,
"text": "Pike place market"
}
],
"name": "Pike Place Market",
"url": "https://en.wikipedia.org/wiki/Pike_Place_Market"
},
{
"dataSource": "Wikipedia",
"id": "Seattle",
"language": "en",
"matches": [
{
"confidenceScore": 0.27,
"length": 7,
"offset": 33,
"text": "Seattle"
}
],
"name": "Seattle",
"url": "https://en.wikipedia.org/wiki/Seattle"
}
],
"id": "2",
"warnings": []
}
],
"errors": [],
"modelVersion": "2020-02-01"
}
}
SuccessfulEntityRecognitionRequest
Sample Request
POST {Endpoint}/language/:analyze-text?api-version=2023-04-01
{
"kind": "EntityRecognition",
"parameters": {
"modelVersion": "latest"
},
"analysisInput": {
"documents": [
{
"id": "1",
"language": "en",
"text": "Microsoft was founded by Bill Gates and Paul Allen."
},
{
"id": "2",
"language": "en",
"text": "Pike place market is my favorite Seattle attraction."
}
]
}
}
Sample Response
{
"kind": "EntityRecognitionResults",
"results": {
"documents": [
{
"entities": [
{
"category": "Organization",
"confidenceScore": 0.84,
"length": 9,
"offset": 0,
"text": "Microsoft"
},
{
"category": "Person",
"confidenceScore": 0.85,
"length": 10,
"offset": 25,
"text": "Bill Gates"
},
{
"category": "Person",
"confidenceScore": 0.9,
"length": 10,
"offset": 40,
"text": "Paul Allen"
}
],
"id": "1",
"warnings": []
},
{
"entities": [
{
"category": "Location",
"confidenceScore": 0.55,
"length": 7,
"offset": 33,
"subcategory": "GPE",
"text": "Seattle"
}
],
"id": "2",
"warnings": []
}
],
"errors": [],
"modelVersion": "2020-04-01"
}
}
SuccessfulKeyPhraseExtractionRequest
Sample Request
POST {Endpoint}/language/:analyze-text?api-version=2023-04-01
{
"kind": "KeyPhraseExtraction",
"parameters": {
"modelVersion": "latest"
},
"analysisInput": {
"documents": [
{
"id": "1",
"language": "en",
"text": "Microsoft was founded by Bill Gates and Paul Allen."
},
{
"id": "2",
"language": "en",
"text": "Text Analytics is one of the Azure Cognitive Services."
},
{
"id": "3",
"language": "en",
"text": "My cat might need to see a veterinarian."
}
]
}
}
Sample Response
{
"kind": "KeyPhraseExtractionResults",
"results": {
"documents": [
{
"id": "1",
"keyPhrases": [
"Bill Gates",
"Paul Allen",
"Microsoft"
],
"warnings": []
},
{
"id": "2",
"keyPhrases": [
"Azure Cognitive Services",
"Text Analytics"
],
"warnings": []
},
{
"id": "3",
"keyPhrases": [
"cat",
"veterinarian"
],
"warnings": []
}
],
"errors": [],
"modelVersion": "2021-06-01"
}
}
SuccessfulLanguageDetectionRequest
Sample Request
POST {Endpoint}/language/:analyze-text?api-version=2023-04-01
{
"kind": "LanguageDetection",
"parameters": {
"modelVersion": "latest"
},
"analysisInput": {
"documents": [
{
"id": "1",
"text": "Hello world"
},
{
"id": "2",
"text": "Bonjour tout le monde"
},
{
"id": "3",
"text": "Hola mundo"
},
{
"id": "4",
"text": "Tumhara naam kya hai?"
}
]
}
}
Sample Response
{
"kind": "LanguageDetectionResults",
"results": {
"documents": [
{
"detectedLanguage": {
"confidenceScore": 1,
"iso6391Name": "en",
"name": "English"
},
"id": "1",
"warnings": []
},
{
"detectedLanguage": {
"confidenceScore": 1,
"iso6391Name": "fr",
"name": "French"
},
"id": "2",
"warnings": []
},
{
"detectedLanguage": {
"confidenceScore": 1,
"iso6391Name": "es",
"name": "Spanish"
},
"id": "3",
"warnings": []
},
{
"detectedLanguage": {
"confidenceScore": 1,
"iso6391Name": "hi",
"name": "Hindi"
},
"id": "4",
"warnings": []
}
],
"errors": [],
"modelVersion": "2021-01-05"
}
}
SuccessfulPiiEntityRecognitionRequest
Sample Request
POST {Endpoint}/language/:analyze-text?api-version=2023-04-01
{
"kind": "PiiEntityRecognition",
"parameters": {
"modelVersion": "latest"
},
"analysisInput": {
"documents": [
{
"id": "1",
"language": "en",
"text": "My SSN is 859-98-0987"
},
{
"id": "2",
"language": "en",
"text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check."
},
{
"id": "3",
"language": "en",
"text": "Is 998.214.865-68 your Brazilian CPF number?"
}
]
}
}
Sample Response
{
"kind": "PiiEntityRecognitionResults",
"results": {
"documents": [
{
"id": "1",
"redactedText": "My SSN is ***********",
"entities": [
{
"category": "USSocialSecurityNumber",
"confidenceScore": 0.65,
"length": 11,
"offset": 28,
"text": "859-98-0987"
}
],
"warnings": []
},
{
"id": "2",
"redactedText": "Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.",
"entities": [
{
"category": "ABARoutingNumber",
"confidenceScore": 0.75,
"length": 9,
"offset": 18,
"text": "111000025"
}
],
"warnings": []
},
{
"id": "3",
"redactedText": "Is ************** your Brazilian CPF number?",
"entities": [
{
"category": "BRCPFNumber",
"confidenceScore": 0.85,
"length": 14,
"offset": 3,
"text": "998.214.865-68"
}
],
"warnings": []
}
],
"errors": [],
"modelVersion": "2021-01-15"
}
}
SuccessfulSentimentAnalysisRequest
Sample Request
POST {Endpoint}/language/:analyze-text?api-version=2023-04-01
{
"kind": "SentimentAnalysis",
"parameters": {
"modelVersion": "latest"
},
"analysisInput": {
"documents": [
{
"id": "1",
"language": "en",
"text": "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful."
}
]
}
}
Sample Response
{
"kind": "SentimentAnalysisResults",
"results": {
"documents": [
{
"confidenceScores": {
"negative": 0,
"neutral": 0,
"positive": 1
},
"id": "1",
"sentences": [
{
"targets": [
{
"confidenceScores": {
"negative": 0,
"positive": 1
},
"length": 10,
"offset": 6,
"relations": [
{
"ref": "#/documents/0/sentences/0/assessments/0",
"relationType": "assessment"
}
],
"sentiment": "positive",
"text": "atmosphere"
}
],
"confidenceScores": {
"negative": 0,
"neutral": 0,
"positive": 1
},
"length": 17,
"offset": 0,
"assessments": [
{
"confidenceScores": {
"negative": 0,
"positive": 1
},
"isNegated": false,
"length": 5,
"offset": 0,
"sentiment": "positive",
"text": "great"
}
],
"sentiment": "positive",
"text": "Great atmosphere."
},
{
"targets": [
{
"confidenceScores": {
"negative": 0.01,
"positive": 0.99
},
"length": 11,
"offset": 37,
"relations": [
{
"ref": "#/documents/0/sentences/1/assessments/0",
"relationType": "assessment"
}
],
"sentiment": "positive",
"text": "restaurants"
},
{
"confidenceScores": {
"negative": 0.01,
"positive": 0.99
},
"length": 6,
"offset": 50,
"relations": [
{
"ref": "#/documents/0/sentences/1/assessments/0",
"relationType": "assessment"
}
],
"sentiment": "positive",
"text": "hotels"
}
],
"confidenceScores": {
"negative": 0.01,
"neutral": 0.86,
"positive": 0.13
},
"length": 52,
"offset": 18,
"assessments": [
{
"confidenceScores": {
"negative": 0.01,
"positive": 0.99
},
"isNegated": false,
"length": 15,
"offset": 18,
"sentiment": "positive",
"text": "Close to plenty"
}
],
"sentiment": "neutral",
"text": "Close to plenty of restaurants, hotels, and transit!"
}
],
"sentiment": "positive",
"warnings": []
}
],
"errors": [],
"modelVersion": "2021-10-01"
}
}
定义
AnalyzeTextEntityLinkingInput
包含分析文本实体链接输入。
名称 | 类型 | 说明 |
---|---|---|
analysisInput |
包含要由服务处理的分析输入。 |
|
kind |
string:
Entity |
要执行的任务类型。 |
parameters |
任务参数。 |
AnalyzeTextEntityRecognitionInput
实体识别分析文本输入任务请求。
名称 | 类型 | 说明 |
---|---|---|
analysisInput |
要分析的输入。 |
|
kind |
string:
Entity |
要执行的任务类型。 |
parameters |
任务参数。 |
AnalyzeTextKeyPhraseExtractionInput
包含分析文本 KeyPhraseExtraction 任务输入。
名称 | 类型 | 说明 |
---|---|---|
analysisInput |
包含输入文档。 |
|
kind |
string:
Key |
要执行的任务类型。 |
parameters |
关键短语提取任务参数。 |
AnalyzeTextLanguageDetectionInput
包含语言检测文档分析任务输入。
名称 | 类型 | 说明 |
---|---|---|
analysisInput |
要分析的文档。 |
|
kind |
string:
Language |
要执行的任务类型。 |
parameters |
任务参数。 |
AnalyzeTextPiiEntitiesRecognitionInput
包含分析文本 PIIEntityRecognition 任务输入。
名称 | 类型 | 说明 |
---|---|---|
analysisInput |
包含输入文档。 |
|
kind |
string:
Pii |
要执行的任务类型。 |
parameters |
Pii 任务参数。 |
AnalyzeTextSentimentAnalysisInput
包含分析文本 SentimentAnalysis 任务输入。
名称 | 类型 | 说明 |
---|---|---|
analysisInput |
包含输入文档。 |
|
kind |
string:
Sentiment |
要执行的任务类型。 |
parameters |
情绪分析任务参数。 |
AnalyzeTextTaskKind
支持的分析文本任务的类型。
名称 | 类型 | 说明 |
---|---|---|
EntityLinking |
string |
实体链接任务 |
EntityRecognition |
string |
实体识别任务 |
KeyPhraseExtraction |
string |
关键短语提取任务 |
LanguageDetection |
string |
语言检测任务 |
PiiEntityRecognition |
string |
PII 实体识别任务 |
SentimentAnalysis |
string |
情绪分析任务 |
AnalyzeTextTaskResultsKind
分析文本任务返回的响应对象的类型。
名称 | 类型 | 说明 |
---|---|---|
EntityLinkingResults |
string |
实体链接结果 |
EntityRecognitionResults |
string |
实体识别结果 |
KeyPhraseExtractionResults |
string |
关键短语提取结果 |
LanguageDetectionResults |
string |
语言检测结果 |
PiiEntityRecognitionResults |
string |
PII 实体识别结果 |
SentimentAnalysisResults |
string |
情绪分析结果 |
DetectedLanguage
包含文本检测到的语言的详细信息。
名称 | 类型 | 说明 |
---|---|---|
confidenceScore |
number |
介于 0 和 1 之间的置信度分数。 接近 1 的分数表示 100% 确定所识别的语言是真实的。 |
iso6391Name |
string |
根据 ISO 639-1 标准 (检测到的语言的双字母表示形式,例如 en、fr) 。 |
name |
string |
检测到的语言的长名称 (例如英语、法语) 。 |
DocumentError
包含作业执行期间遇到的错误的详细信息。
名称 | 类型 | 说明 |
---|---|---|
error |
遇到错误。 |
|
id |
string |
输入文档的 ID。 |
DocumentSentimentValue
预测的文档情绪 (负面、中性、正面或混合) 。
名称 | 类型 | 说明 |
---|---|---|
mixed |
string |
混合语句 |
negative |
string |
Negative 语句 |
neutral |
string |
中性语句 |
positive |
string |
正语句 |
DocumentStatistics
如果在请求中指定 showStats=true,则此字段将包含有关文档有效负载的信息。
名称 | 类型 | 说明 |
---|---|---|
charactersCount |
integer |
文档中识别的文本元素数。 |
transactionsCount |
integer |
文档的事务数。 |
DocumentWarning
包含已处理文档遇到的警告的 warnings 对象。
名称 | 类型 | 说明 |
---|---|---|
code |
警告代码。 |
|
message |
string |
警告消息。 |
targetRef |
string |
指示目标对象的 JSON 指针引用。 |
EntitiesDocumentResult
包含文档的实体识别任务结果。
名称 | 类型 | 说明 |
---|---|---|
entities |
Entity[] |
文档中已识别的实体。 |
id |
string |
唯一的非空文档标识符。 |
statistics |
如果在请求中指定了 showStats=true,则此字段将包含有关文档有效负载的信息。 |
|
warnings |
处理文档时遇到的警告。 |
EntitiesResult
包含实体识别任务结果。
名称 | 类型 | 说明 |
---|---|---|
documents |
按文档响应 |
|
errors |
按文档 ID 显示的错误。 |
|
modelVersion |
string |
此字段指示用于评分的模型。 |
statistics |
如果在请求中指定了 showStats=true,则此字段将包含有关请求有效负载的信息。 |
EntitiesTaskParameters
实体识别任务支持的参数。
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
loggingOptOut |
boolean |
False |
日志记录选择退出 |
modelVersion |
string |
latest |
模型版本 |
stringIndexType | TextElements_v8 |
(可选的) 参数,以提供用于解释字符串偏移量的字符串索引类型。 默认为 TextElements (Graphemes) 。 |
EntitiesTaskResult
包含实体任务
名称 | 类型 | 说明 |
---|---|---|
kind |
string:
Entity |
任务结果的类型。 |
results |
实体识别的结果。 |
Entity
定义包含实体类别和检测到的实体文本等的检测到的实体对象。
名称 | 类型 | 说明 |
---|---|---|
category |
string |
实体类型。 |
confidenceScore |
number |
提取的实体的置信度分数介于 0 和 1 之间。 |
length |
integer |
实体文本的长度。 使用不同的“stringIndexType”值可能会影响返回的长度。 |
offset |
integer |
实体文本的起始位置。 使用不同的“stringIndexType”值可能会影响返回的偏移量。 |
subcategory |
string |
(可选) 实体子类型。 |
text |
string |
请求中显示的实体文本。 |
EntityLinkingResult
实体链接结果。
名称 | 类型 | 说明 |
---|---|---|
documents |
按文档响应 |
|
errors |
按文档 ID 显示的错误。 |
|
modelVersion |
string |
此字段指示用于评分的模型。 |
statistics |
如果在请求中指定了 showStats=true,则此字段将包含有关请求有效负载的信息。 |
EntityLinkingTaskParameters
实体链接任务支持的参数。
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
loggingOptOut |
boolean |
False |
日志记录选择退出 |
modelVersion |
string |
latest |
模型版本 |
stringIndexType | TextElements_v8 |
可选参数,用于提供用于解释字符串偏移量的字符串索引类型。 默认为 TextElements (Graphemes) 。 |
EntityLinkingTaskResult
包含分析文本实体链接任务结果。
名称 | 类型 | 说明 |
---|---|---|
kind |
string:
Entity |
任务结果的类型。 |
results |
实体链接结果。 |
Error
当服务在处理请求期间遇到某些错误时返回的错误响应对象。
名称 | 类型 | 说明 |
---|---|---|
code |
服务器定义的一组错误代码中的一个。 |
|
details |
Error[] |
有关导致此项报告错误的特定错误的详细信息数组。 |
innererror |
一个 对象,该对象包含比当前对象更具体的错误信息。 |
|
message |
string |
错误的用户可读表示形式。 |
target |
string |
错误的目标。 |
ErrorCode
用户可读的错误代码。
名称 | 类型 | 说明 |
---|---|---|
AzureCognitiveSearchIndexLimitReached |
string |
Azure 认知搜索索引达到限制错误 |
AzureCognitiveSearchIndexNotFound |
string |
找不到Azure 认知搜索索引错误 |
AzureCognitiveSearchNotFound |
string |
找不到Azure 认知搜索错误 |
AzureCognitiveSearchThrottling |
string |
Azure 认知搜索限制错误 |
Conflict |
string |
冲突错误 |
Forbidden |
string |
禁止访问错误 |
InternalServerError |
string |
内部服务器错误 |
InvalidArgument |
string |
参数无效错误 |
InvalidRequest |
string |
无效请求错误 |
NotFound |
string |
“找不到”错误 |
OperationNotFound |
string |
找不到操作错误 |
ProjectNotFound |
string |
找不到项目错误 |
QuotaExceeded |
string |
超过配额错误 |
ServiceUnavailable |
string |
服务不可用错误 |
Timeout |
string |
超时错误 |
TooManyRequests |
string |
请求过多错误 |
Unauthorized |
string |
未经授权的访问错误 |
Warning |
string |
警告错误 |
ErrorResponse
错误响应。
名称 | 类型 | 说明 |
---|---|---|
error |
错误对象。 |
InnerErrorCode
用户可读的错误代码。
名称 | 类型 | 说明 |
---|---|---|
AzureCognitiveSearchNotFound |
string |
找不到Azure 认知搜索错误 |
AzureCognitiveSearchThrottling |
string |
Azure 认知搜索限制错误 |
EmptyRequest |
string |
空请求错误 |
ExtractionFailure |
string |
提取失败错误 |
InvalidCountryHint |
string |
国家/地区提示错误无效 |
InvalidDocument |
string |
无效的文档错误 |
InvalidDocumentBatch |
string |
无效的文档批处理错误 |
InvalidParameterValue |
string |
参数值无效错误 |
InvalidRequest |
string |
无效请求错误 |
InvalidRequestBodyFormat |
string |
请求正文格式无效错误 |
KnowledgeBaseNotFound |
string |
找不到知识库错误 |
MissingInputDocuments |
string |
缺少输入文档错误 |
ModelVersionIncorrect |
string |
模型版本错误 |
UnsupportedLanguageCode |
string |
不支持的语言代码错误 |
InnerErrorModel
包含有关错误的更具体信息的对象。 根据 Microsoft One API 指南 - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses。
名称 | 类型 | 说明 |
---|---|---|
code |
服务器定义的一组错误代码中的一个。 |
|
details |
object |
错误详细信息。 |
innererror |
一个 对象,该对象包含比当前对象更具体的错误信息。 |
|
message |
string |
错误消息。 |
target |
string |
错误目标。 |
KeyPhraseResult
包含 KeyPhraseResult。
名称 | 类型 | 说明 |
---|---|---|
documents |
按文档响应 |
|
errors |
按文档 ID 显示的错误。 |
|
modelVersion |
string |
此字段指示用于评分的模型。 |
statistics |
如果在请求中指定了 showStats=true,则此字段将包含有关请求有效负载的信息。 |
KeyPhrasesDocumentResult
包含文档的关键短语提取结果。
名称 | 类型 | 说明 |
---|---|---|
id |
string |
唯一的非空文档标识符。 |
keyPhrases |
string[] |
具有代表性的字词或短语的列表。 返回的关键短语数与输入文档中的单词数成正比。 |
statistics |
如果在请求中指定了 showStats=true,则此字段将包含有关文档有效负载的信息。 |
|
warnings |
处理文档时遇到的警告。 |
KeyPhraseTaskParameters
关键短语提取任务支持的参数。
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
loggingOptOut |
boolean |
False |
日志记录选择退出 |
modelVersion |
string |
latest |
模型版本 |
KeyPhraseTaskResult
包含分析文本 KeyPhraseExtraction 任务结果。
名称 | 类型 | 说明 |
---|---|---|
kind |
string:
Key |
任务结果的类型。 |
results |
关键短语提取结果的列表 |
LanguageDetectionAnalysisInput
包含语言检测文档分析输入。
名称 | 类型 | 说明 |
---|---|---|
documents |
要分析的文档列表。 |
LanguageDetectionDocumentResult
包含文档的语言检测。
名称 | 类型 | 说明 |
---|---|---|
detectedLanguage |
检测到的语言。 |
|
id |
string |
唯一的非空文档标识符。 |
statistics |
如果在请求中指定了 showStats=true,则此字段将包含有关文档有效负载的信息。 |
|
warnings |
处理文档时遇到的警告。 |
LanguageDetectionResult
包含请求的语言检测结果。
名称 | 类型 | 说明 |
---|---|---|
documents |
每个输入文档的语言检测结果枚举。 |
|
errors |
按文档 ID 显示的错误。 |
|
modelVersion |
string |
此字段指示用于评分的模型。 |
statistics |
如果在请求中指定了 showStats=true,则此字段将包含有关请求有效负载的信息。 |
LanguageDetectionTaskParameters
语言检测任务支持的参数。
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
loggingOptOut |
boolean |
False |
日志记录选择退出 |
modelVersion |
string |
latest |
模型版本 |
LanguageDetectionTaskResult
包含请求的语言检测任务结果。
名称 | 类型 | 说明 |
---|---|---|
kind |
string:
Language |
任务结果的类型。 |
results |
包含语言检测结果。 |
LanguageInput
包含语言检测输入。
名称 | 类型 | 说明 |
---|---|---|
countryHint |
string |
帮助文本的语言检测的国家/地区提示。 |
id |
string |
唯一的非空文档标识符。 |
text |
string |
要处理的输入文本。 |
LinkedEntitiesDocumentResult
实体链接文档结果。
名称 | 类型 | 说明 |
---|---|---|
entities |
文档中已识别的已知实体。 |
|
id |
string |
唯一的非空文档标识符。 |
statistics |
如果在请求中指定了 showStats=true,则此字段将包含有关文档有效负载的信息。 |
|
warnings |
处理文档时遇到的警告。 |
LinkedEntity
包含检测到的实体以及关联的源/链接的 LinkedEntity 对象。
名称 | 类型 | 说明 |
---|---|---|
bingId |
string |
必应实体搜索 API 已识别实体的唯一标识符。 |
dataSource |
string |
用于提取实体链接的数据源,例如 Wiki/必应等。 |
id |
string |
数据源中已识别的实体的唯一标识符。 |
language |
string |
数据源中使用的语言。 |
matches |
Match[] |
此实体显示在文本中的实例列表。 |
name |
string |
实体链接形式名称。 |
url |
string |
数据源中实体页面的 URL。 |
Match
包含具有偏移量和长度的检测到的实体文本的 Match 对象。
名称 | 类型 | 说明 |
---|---|---|
confidenceScore |
number |
如果识别出已知项,则将返回一个十进制数,表示介于 0 和 1 之间的置信度。 |
length |
integer |
实体匹配文本的长度。 |
offset |
integer |
实体匹配文本的起始位置。 |
text |
string |
请求中显示的实体文本。 |
MultiLanguageAnalysisInput
要由服务分析的输入文档的集合。
名称 | 类型 | 说明 |
---|---|---|
documents |
要分析的输入文档。 |
MultiLanguageInput
包含要由服务分析的输入文档。
名称 | 类型 | 说明 |
---|---|---|
id |
string |
唯一的非空文档标识符。 |
language |
string |
(可选) 这是语言的 2 个字母 ISO 639-1 表示形式。 例如,对英语使用“en”;西班牙语等的“es”。如果未设置,则默认使用英语的“en”。 (关注仅适用于 2023-04-15-preview 及更高版本) 对于自动语言检测,请使用“auto”。 如果未设置,则默认使用英语的“en”。 |
text |
string |
要处理的输入文本。 |
PiiCategory
(可选) 描述要返回的 PII 类别
名称 | 类型 | 说明 |
---|---|---|
ABARoutingNumber |
string |
ABA 路由编号 |
ARNationalIdentityNumber |
string |
AR 国家/地区标识号 |
ATIdentityCard |
string |
AT Identity Card |
ATTaxIdentificationNumber |
string |
AT 税务标识号 |
ATValueAddedTaxNumber |
string |
AT 增值税号 |
AUBankAccountNumber |
string |
AT Identity Card |
AUBusinessNumber |
string |
AU 业务号码 |
AUCompanyNumber |
string |
AU 公司编号 |
AUDriversLicenseNumber |
string |
AU 驾照编号 |
AUMedicalAccountNumber |
string |
AU 医疗帐号 |
AUPassportNumber |
string |
AU Passport Number |
AUTaxFileNumber |
string |
AU 税务文件编号 |
Address |
string |
地址 |
Age |
string |
Age |
All |
string |
所有 PII 类别。 |
AzureDocumentDBAuthKey |
string |
Azure Document DB 身份验证密钥 |
AzureIAASDatabaseConnectionAndSQLString |
string |
Azure IAAS 数据库连接和 SQL 字符串 |
AzureIoTConnectionString |
string |
Azure IoT 连接字符串 |
AzurePublishSettingPassword |
string |
Azure 发布设置密码 |
AzureRedisCacheString |
string |
Azure Redis 缓存字符串 |
AzureSAS |
string |
Azure SAS |
AzureServiceBusString |
string |
Azure 服务总线 字符串 |
AzureStorageAccountGeneric |
string |
Azure 存储帐户通用 |
AzureStorageAccountKey |
string |
Azure 存储帐户密钥 |
BENationalNumber |
string |
BE 国家号码 |
BENationalNumberV2 |
string |
BE National Number V2 |
BEValueAddedTaxNumber |
string |
BE 增值税号 |
BGUniformCivilNumber |
string |
BG 统一民事号码 |
BRCPFNumber |
string |
BR CPF 编号 |
BRLegalEntityNumber |
string |
BR 法律实体编号 |
BRNationalIDRG |
string |
BR National ID RG |
CABankAccountNumber |
string |
CA 银行帐号 |
CADriversLicenseNumber |
string |
CA 驾照编号 |
CAHealthServiceNumber |
string |
CA 运行状况服务编号 |
CAPassportNumber |
string |
CA 护照号码 |
CAPersonalHealthIdentification |
string |
CA 个人健康识别 |
CASocialInsuranceNumber |
string |
CA 社会保险号码 |
CHSocialSecurityNumber |
string |
CH 社会安全号码 |
CLIdentityCardNumber |
string |
CL Identity Card Number |
CNResidentIdentityCardNumber |
string |
CN 居民身份证号码 |
CYIdentityCard |
string |
CY Identity Card |
CYTaxIdentificationNumber |
string |
CY 税务标识号 |
CZPersonalIdentityNumber |
string |
CZ 个人标识号 |
CZPersonalIdentityV2 |
string |
CZ 个人标识 V2 |
CreditCardNumber |
string |
信用卡号 |
DEDriversLicenseNumber |
string |
DE Driver's License Number |
DEIdentityCardNumber |
string |
DE Identity Card Number |
DEPassportNumber |
string |
DE Passport 号码 |
DETaxIdentificationNumber |
string |
DE 税务标识号 |
DEValueAddedNumber |
string |
DE 增值编号 |
DKPersonalIdentificationNumber |
string |
DK 个人标识号 |
DKPersonalIdentificationV2 |
string |
DK 个人标识 V2 |
Date |
string |
日期 |
Default |
string |
语言的默认 PII 类别。 |
DrugEnforcementAgencyNumber |
string |
缉毒署编号 |
EEPersonalIdentificationCode |
string |
EE 个人标识代码 |
ESDNI |
string |
ES DNI |
ESSocialSecurityNumber |
string |
ES 社会安全号码 |
ESTaxIdentificationNumber |
string |
ES 税务标识号 |
EUDebitCardNumber |
string |
欧盟借记卡号码 |
EUDriversLicenseNumber |
string |
欧盟驾驶执照号码 |
EUGPSCoordinates |
string |
欧盟 GPS 坐标 |
EUNationalIdentificationNumber |
string |
欧盟身份证号码 |
EUPassportNumber |
string |
欧盟护照号码 |
EUSocialSecurityNumber |
string |
欧盟社会安全号码 |
EUTaxIdentificationNumber |
string |
欧盟税务标识号 |
string |
电子邮件 |
|
FIEuropeanHealthNumber |
string |
FI 欧洲健康号码 |
FINationalID |
string |
FI National ID |
FINationalIDV2 |
string |
FI National ID V2 |
FIPassportNumber |
string |
FI 护照号码 |
FRDriversLicenseNumber |
string |
FR 驾照编号 |
FRHealthInsuranceNumber |
string |
FR 健康保险号码 |
FRNationalID |
string |
FR National ID |
FRPassportNumber |
string |
FR 护照号码 |
FRSocialSecurityNumber |
string |
FR 社会安全号码 |
FRTaxIdentificationNumber |
string |
FR 税务标识号 |
FRValueAddedTaxNumber |
string |
FR 增值税号 |
GRNationalIDCard |
string |
GR 国家/地区身份证 |
GRNationalIDV2 |
string |
GR 国家/地区 ID V2 |
GRTaxIdentificationNumber |
string |
GR 税务标识号 |
HKIdentityCardNumber |
string |
香港身份证号码 |
HRIdentityCardNumber |
string |
HR 身份证号码 |
HRNationalIDNumber |
string |
HR 国家/地区 ID 号 |
HRPersonalIdentificationNumber |
string |
HR 个人标识号 |
HRPersonalIdentificationOIBNumberV2 |
string |
HR 个人标识 OIB 编号 V2 |
HUPersonalIdentificationNumber |
string |
HU 个人标识号 |
HUTaxIdentificationNumber |
string |
HU 税务标识号 |
HUValueAddedNumber |
string |
HU 增值编号 |
IDIdentityCardNumber |
string |
ID 身份证号码 |
IEPersonalPublicServiceNumber |
string |
IE 个人公共服务号码 |
IEPersonalPublicServiceNumberV2 |
string |
IE 个人公共服务号码 V2 |
ILBankAccountNumber |
string |
IL 银行帐号 |
ILNationalID |
string |
IL National ID |
INPermanentAccount |
string |
IN 永久帐户 |
INUniqueIdentificationNumber |
string |
IN 唯一标识号 |
IPAddress |
string |
IP 地址 |
ITDriversLicenseNumber |
string |
IT Driver's License Number |
ITFiscalCode |
string |
IT 会计代码 |
ITValueAddedTaxNumber |
string |
IT 增值税号 |
InternationalBankingAccountNumber |
string |
国际银行帐号 |
JPBankAccountNumber |
string |
JP 银行帐号 |
JPDriversLicenseNumber |
string |
JP 驾驶执照号 |
JPMyNumberCorporate |
string |
JP 我的号码公司 |
JPMyNumberPersonal |
string |
JP 我的号码个人 |
JPPassportNumber |
string |
JP 护照号码 |
JPResidenceCardNumber |
string |
JP 居住卡号码 |
JPResidentRegistrationNumber |
string |
JP 居民注册号 |
JPSocialInsuranceNumber |
string |
JP 社会保险号 |
KRResidentRegistrationNumber |
string |
KR 居民注册号 |
LTPersonalCode |
string |
LT 个人代码 |
LUNationalIdentificationNumberNatural |
string |
LU 国家标识号自然 |
LUNationalIdentificationNumberNonNatural |
string |
LU 国民标识号非自然 |
LVPersonalCode |
string |
LV 个人代码 |
MTIdentityCardNumber |
string |
MT 标识卡号 |
MTTaxIDNumber |
string |
MT 税务 ID 号 |
MYIdentityCardNumber |
string |
MY Identity Card Number |
NLCitizensServiceNumber |
string |
NL 公民服务号码 |
NLCitizensServiceNumberV2 |
string |
NL 公民服务编号 V2 |
NLTaxIdentificationNumber |
string |
NL 税务标识号 |
NLValueAddedTaxNumber |
string |
NL 增值税号 |
NOIdentityNumber |
string |
NO 标识号 |
NZBankAccountNumber |
string |
NZ 银行帐号 |
NZDriversLicenseNumber |
string |
NZ 驾驶执照号码 |
NZInlandRevenueNumber |
string |
NZ Inland Revenue Number |
NZMinistryOfHealthNumber |
string |
新西兰卫生部编号 |
NZSocialWelfareNumber |
string |
新西兰社会福利号码 |
Organization |
string |
组织 |
PHUnifiedMultiPurposeIDNumber |
string |
PH 统一多用途 ID 号 |
PLIdentityCard |
string |
PL Identity Card |
PLNationalID |
string |
PL 国家/地区 ID |
PLNationalIDV2 |
string |
PL National ID V2 |
PLPassportNumber |
string |
PL Passport 号码 |
PLREGONNumber |
string |
PL REGON 编号 |
PLTaxIdentificationNumber |
string |
PL 税务标识号 |
PTCitizenCardNumber |
string |
PT 公民卡号 |
PTCitizenCardNumberV2 |
string |
PT 公民卡号 V2 |
PTTaxIdentificationNumber |
string |
PT 税务标识号 |
Person |
string |
人员 |
PhoneNumber |
string |
电话号码 |
ROPersonalNumericalCode |
string |
RO 个人数字代码 |
RUPassportNumberDomestic |
string |
RU 护照号码国内 |
RUPassportNumberInternational |
string |
RU 护照号码国际 |
SANationalID |
string |
SA 国家/地区 ID |
SENationalID |
string |
SE National ID |
SENationalIDV2 |
string |
SE National ID V2 |
SEPassportNumber |
string |
SE Passport 号码 |
SETaxIdentificationNumber |
string |
SE 税务标识号 |
SGNationalRegistrationIdentityCardNumber |
string |
SG 国家注册身份证号 |
SITaxIdentificationNumber |
string |
SI 税务标识号 |
SIUniqueMasterCitizenNumber |
string |
SI 唯一主公民号 |
SKPersonalNumber |
string |
SK 个人号码 |
SQLServerConnectionString |
string |
SQL Server 连接字符串 |
SWIFTCode |
string |
SWIFT 代码 |
THPopulationIdentificationCode |
string |
TH 人口标识代码 |
TRNationalIdentificationNumber |
string |
TR 国家/地区标识号 |
TWNationalID |
string |
TW 国家/地区 ID |
TWPassportNumber |
string |
TW Passport 号码 |
TWResidentCertificate |
string |
TW 居民证书 |
UAPassportNumberDomestic |
string |
UA 护照号码国内 |
UAPassportNumberInternational |
string |
UA 护照号码国际 |
UKDriversLicenseNumber |
string |
英国驾驶执照号码 |
UKElectoralRollNumber |
string |
英国选举人名册编号 |
UKNationalHealthNumber |
string |
英国国民健康号 |
UKNationalInsuranceNumber |
string |
英国国民保险号 |
UKUniqueTaxpayerNumber |
string |
英国唯一纳税人编号 |
URL |
string |
URL |
USBankAccountNumber |
string |
美国银行帐号 |
USDriversLicenseNumber |
string |
美国驾驶执照号 |
USIndividualTaxpayerIdentification |
string |
美国个人纳税人身份识别 |
USSocialSecurityNumber |
string |
美国社会安全号码 |
USUKPassportNumber |
string |
美国英国护照号码 |
ZAIdentificationNumber |
string |
ZA 标识号 |
PiiDomain
PII 任务的域
名称 | 类型 | 说明 |
---|---|---|
none |
string |
指示未指定域。 |
phi |
string |
指示应编辑“个人健康信息”域中的实体。 |
PiiEntitiesDocumentResult
包含 PII 结果。
名称 | 类型 | 说明 |
---|---|---|
entities |
Entity[] |
文档中已识别的实体。 |
id |
string |
唯一的非空文档标识符。 |
redactedText |
string |
返回经过修订的文本。 |
statistics |
如果在请求中指定了 showStats=true,则此字段将包含有关文档有效负载的信息。 |
|
warnings |
处理文档时遇到的警告。 |
PiiResult
包含 PiiResult。
名称 | 类型 | 说明 |
---|---|---|
documents |
按文档响应 |
|
errors |
按文档 ID 显示的错误。 |
|
modelVersion |
string |
此字段指示用于评分的模型。 |
statistics |
如果在请求中指定了 showStats=true,则此字段将包含有关请求有效负载的信息。 |
PiiTaskParameters
PII 实体识别任务支持的参数。
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
domain | none |
PII 任务的域 |
|
loggingOptOut |
boolean |
False |
日志记录选择退出 |
modelVersion |
string |
latest |
模型版本 |
piiCategories |
响应中要返回的 PII 类别的枚举。 |
||
stringIndexType | TextElements_v8 |
用于分析的 StringIndexType。 |
PiiTaskResult
包含分析文本 PIIEntityRecognition LRO 任务。
名称 | 类型 | 说明 |
---|---|---|
kind |
string:
Pii |
任务结果的类型。 |
results |
pii 结果列表 |
RequestStatistics
如果在请求中指定了 showStats=true,则此字段将包含有关请求有效负载的信息。
名称 | 类型 | 说明 |
---|---|---|
documentsCount |
integer |
请求中提交的文档数。 |
erroneousDocumentsCount |
integer |
无效文档的数目。 这包括空的、过大限制或不支持的语言文档。 |
transactionsCount |
integer |
请求的事务数。 |
validDocumentsCount |
integer |
有效文档数。 这不包括空的、过大限制或不支持的语言文档。 |
SentenceAssessment
表示句子评估及其相关的评估或目标对象。
名称 | 类型 | 说明 |
---|---|---|
confidenceScores |
表示所有情绪类的置信度分数:正和负。 |
|
isNegated |
boolean |
表示评估是否被否定的指示器。 |
length |
integer |
目标的长度。 |
offset |
integer |
与句子开头的目标偏移量。 |
sentiment |
句子的情绪。 |
|
text |
string |
检测到的目标文本。 |
SentenceSentiment
文档的句子情绪。
名称 | 类型 | 说明 |
---|---|---|
assessments |
句子的评估数组。 |
|
confidenceScores |
所有类的句子的情绪置信度分数介于 0 和 1 之间。 |
|
length |
integer |
目标的长度。 |
offset |
integer |
与句子开头的目标偏移量。 |
sentiment |
句子的预测情绪。 |
|
targets |
句子的句子目标的数组。 |
|
text |
string |
句子文本。 |
SentenceSentimentValue
句子的预测情绪。
名称 | 类型 | 说明 |
---|---|---|
negative |
string |
负面情绪 |
neutral |
string |
中性情绪 |
positive |
string |
积极情绪 |
SentenceTarget
表示句子目标及其相关的评估或目标对象。
名称 | 类型 | 说明 |
---|---|---|
confidenceScores |
表示所有情绪类的置信度分数:正和负。 |
|
length |
integer |
目标的长度。 |
offset |
integer |
与句子开头的目标偏移量。 |
relations |
与目标相关的评估或目标对象的数组。 |
|
sentiment |
句子的情绪。 |
|
text |
string |
检测到的目标文本。 |
SentimentAnalysisTaskParameters
情绪分析任务支持的参数。
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
loggingOptOut |
boolean |
False |
日志记录选择退出 |
modelVersion |
string |
latest |
模型版本 |
opinionMining |
boolean |
False |
是否在请求中使用观点挖掘。 |
stringIndexType | TextElements_v8 |
指定用于解释字符串偏移量的方法。 |
SentimentConfidenceScores
表示所有情绪类的置信度分数介于 0 和 1 之间:积极、中性、消极。
名称 | 类型 | 说明 |
---|---|---|
negative |
number |
负面情绪的置信度分数 |
neutral |
number |
中性情绪的置信度分数 |
positive |
number |
积极情绪的置信度分数 |
SentimentDocumentResult
一个对象,表示每个文档的预生成情绪分析结果。
名称 | 类型 | 说明 |
---|---|---|
confidenceScores |
所有类的句子的情绪置信度分数介于 0 和 1 之间。 |
|
id |
string |
唯一的非空文档标识符。 |
sentences |
文档的句子情绪。 |
|
sentiment |
预测的文档情绪 (负面、中性、正面或混合) 。 |
|
statistics |
如果在请求中指定了 showStats=true,则此字段将包含有关文档有效负载的信息。 |
|
warnings |
处理文档时遇到的警告。 |
SentimentResponse
输入文档的情绪分析结果。
名称 | 类型 | 说明 |
---|---|---|
documents |
输入中每个文档的情绪分析结果。 |
|
errors |
按文档 ID 显示的错误。 |
|
modelVersion |
string |
此字段指示用于评分的模型。 |
statistics |
如果在请求中指定了 showStats=true,则此字段将包含有关请求有效负载的信息。 |
SentimentTaskResult
包含分析文本 SentimentAnalysis LRO 任务结果。
名称 | 类型 | 说明 |
---|---|---|
kind |
string:
Sentiment |
任务结果的类型。 |
results |
情绪分析结果 |
StringIndexType
字符串索引类型
名称 | 类型 | 说明 |
---|---|---|
TextElements_v8 |
string |
返回的偏移量和长度值将对应于 TextElements (Graphemes 和 Grapheme 群集,) 确认为 Unicode 8.0.0 标准。 如果应用程序是使用 .Net Framework 或 .Net Core 编写的,并且将使用 StringInfo,请使用此选项。 |
UnicodeCodePoint |
string |
返回的偏移量和长度值将对应于 Unicode 码位。 如果应用程序是以支持 Unicode 的语言(例如 Python)编写的,请使用此选项。 |
Utf16CodeUnit |
string |
返回的偏移量和长度值对应于 UTF-16 代码单元。 如果应用程序是以支持 Unicode 的语言(例如 Java、JavaScript)编写的,请使用此选项。 |
TargetConfidenceScoreLabel
表示所有情绪类的置信度分数:正和负。
名称 | 类型 | 说明 |
---|---|---|
negative |
number |
负面情绪的置信度分数 |
positive |
number |
积极情绪的置信度分数 |
TargetRelation
表示评估和/或目标之间的关系。
名称 | 类型 | 说明 |
---|---|---|
ref |
string |
指示链接对象的 JSON 指针。 |
relationType |
与目标相关的类型。 |
TargetRelationType
与目标相关的类型。
名称 | 类型 | 说明 |
---|---|---|
assessment |
string |
评估关系。 |
target |
string |
目标关系。 |
TokenSentimentValue
句子的预测情绪。
名称 | 类型 | 说明 |
---|---|---|
mixed |
string |
混合情绪 |
negative |
string |
负面情绪 |
positive |
string |
积极情绪 |
WarningCodeValue
定义警告代码的列表。
名称 | 类型 | 说明 |
---|---|---|
DocumentTruncated |
string |
文档截断警告 |
LongWordsInDocument |
string |
文档中的长字警告 |