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 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
Endpoint
|
path | True |
string |
支援的認知服務端點 (例如 https://.api.cognitiveservices.azure.com). |
api-version
|
query | True |
string |
用於此作業的 API 版本。 |
show
|
query |
boolean |
(選擇性) 如果設定為 true,回應將會包含要求和檔層級統計數據。 |
要求標頭
名稱 | 必要 | 類型 | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
要求本文
要求主體可以是下列其中一項:
名稱 | Description |
---|---|
Analyze |
包含分析文字實體連結輸入。 |
Analyze |
實體辨識會分析文字輸入工作要求。 |
Analyze |
包含分析文字 KeyPhraseExtraction 工作輸入。 |
Analyze |
包含語言偵測檔分析工作輸入。 |
Analyze |
包含分析文字 PIIEntityRecognition 工作輸入。 |
Analyze |
包含分析文字 SentimentAnalysis 工作輸入。 |
AnalyzeTextEntityLinkingInput
包含分析文字實體連結輸入。
名稱 | 必要 | 類型 | Description |
---|---|---|---|
kind | True |
string:
Entity |
要執行的工作種類。 |
analysisInput |
包含服務要處理的分析輸入。 |
||
parameters |
工作參數。 |
AnalyzeTextEntityRecognitionInput
實體辨識會分析文字輸入工作要求。
名稱 | 必要 | 類型 | Description |
---|---|---|---|
kind | True |
string:
Entity |
要執行的工作種類。 |
analysisInput |
要分析的輸入。 |
||
parameters |
工作參數。 |
AnalyzeTextKeyPhraseExtractionInput
包含分析文字 KeyPhraseExtraction 工作輸入。
名稱 | 必要 | 類型 | Description |
---|---|---|---|
kind | True |
string:
Key |
要執行的工作種類。 |
analysisInput |
包含輸入檔。 |
||
parameters |
關鍵片語擷取工作參數。 |
AnalyzeTextLanguageDetectionInput
包含語言偵測檔分析工作輸入。
名稱 | 必要 | 類型 | Description |
---|---|---|---|
kind | True |
string:
Language |
要執行的工作種類。 |
analysisInput |
要分析的檔。 |
||
parameters |
工作參數。 |
AnalyzeTextPiiEntitiesRecognitionInput
包含分析文字 PIIEntityRecognition 工作輸入。
名稱 | 必要 | 類型 | Description |
---|---|---|---|
kind | True |
string:
Pii |
要執行的工作種類。 |
analysisInput |
包含輸入檔。 |
||
parameters |
Pii 工作參數。 |
AnalyzeTextSentimentAnalysisInput
包含分析文字 SentimentAnalysis 工作輸入。
名稱 | 必要 | 類型 | Description |
---|---|---|---|
kind | True |
string:
Sentiment |
要執行的工作種類。 |
analysisInput |
包含輸入檔。 |
||
parameters |
情感分析工作參數。 |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK | AnalyzeTextTaskResult: |
要求已成功。 |
Other Status Codes |
未預期的錯誤回應。 標題 x-ms-error-code: string |
安全性
Ocp-Apim-Subscription-Key
類型:
apiKey
位於:
header
範例
SuccessfulEntityLinkingRequest
範例要求
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."
}
]
}
}
範例回覆
{
"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
範例要求
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."
}
]
}
}
範例回覆
{
"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
範例要求
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."
}
]
}
}
範例回覆
{
"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
範例要求
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?"
}
]
}
}
範例回覆
{
"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
範例要求
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?"
}
]
}
}
範例回覆
{
"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
範例要求
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."
}
]
}
}
範例回覆
{
"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
包含分析文字實體連結輸入。
名稱 | 類型 | Description |
---|---|---|
analysisInput |
包含服務要處理的分析輸入。 |
|
kind |
string:
Entity |
要執行的工作種類。 |
parameters |
工作參數。 |
AnalyzeTextEntityRecognitionInput
實體辨識會分析文字輸入工作要求。
名稱 | 類型 | Description |
---|---|---|
analysisInput |
要分析的輸入。 |
|
kind |
string:
Entity |
要執行的工作種類。 |
parameters |
工作參數。 |
AnalyzeTextKeyPhraseExtractionInput
包含分析文字 KeyPhraseExtraction 工作輸入。
名稱 | 類型 | Description |
---|---|---|
analysisInput |
包含輸入檔。 |
|
kind |
string:
Key |
要執行的工作種類。 |
parameters |
關鍵片語擷取工作參數。 |
AnalyzeTextLanguageDetectionInput
包含語言偵測檔分析工作輸入。
名稱 | 類型 | Description |
---|---|---|
analysisInput |
要分析的檔。 |
|
kind |
string:
Language |
要執行的工作種類。 |
parameters |
工作參數。 |
AnalyzeTextPiiEntitiesRecognitionInput
包含分析文字 PIIEntityRecognition 工作輸入。
名稱 | 類型 | Description |
---|---|---|
analysisInput |
包含輸入檔。 |
|
kind |
string:
Pii |
要執行的工作種類。 |
parameters |
Pii 工作參數。 |
AnalyzeTextSentimentAnalysisInput
包含分析文字 SentimentAnalysis 工作輸入。
名稱 | 類型 | Description |
---|---|---|
analysisInput |
包含輸入檔。 |
|
kind |
string:
Sentiment |
要執行的工作種類。 |
parameters |
情感分析工作參數。 |
AnalyzeTextTaskKind
支援的分析文字工作種類。
名稱 | 類型 | Description |
---|---|---|
EntityLinking |
string |
實體連結工作 |
EntityRecognition |
string |
實體辨識工作 |
KeyPhraseExtraction |
string |
關鍵片語擷取工作 |
LanguageDetection |
string |
語言偵測工作 |
PiiEntityRecognition |
string |
PII 實體辨識工作 |
SentimentAnalysis |
string |
情感分析工作 |
AnalyzeTextTaskResultsKind
分析文字工作傳回的回應物件種類。
名稱 | 類型 | Description |
---|---|---|
EntityLinkingResults |
string |
實體連結結果 |
EntityRecognitionResults |
string |
實體辨識結果 |
KeyPhraseExtractionResults |
string |
關鍵片語擷取結果 |
LanguageDetectionResults |
string |
語言偵測結果 |
PiiEntityRecognitionResults |
string |
PII 實體辨識結果 |
SentimentAnalysisResults |
string |
情感分析結果 |
DetectedLanguage
包含所偵測到文字語言的詳細數據。
名稱 | 類型 | Description |
---|---|---|
confidenceScore |
number |
0 到 1 之間的信賴分數。 接近 1 的分數表示 100% 確定已識別的語言為真實。 |
iso6391Name |
string |
根據 ISO 639-1 標準 (的兩個字母表示法,例如 en、fr) 。 |
name |
string |
偵測到的語言長名稱 (例如英文、法文) 。 |
DocumentError
包含作業執行期間所遇到的錯誤詳細數據。
名稱 | 類型 | Description |
---|---|---|
error |
發生錯誤。 |
|
id |
string |
輸入文件的識別碼。 |
DocumentSentimentValue
檔 (負面、中性、正面或混合) 的預測情感。
名稱 | 類型 | Description |
---|---|---|
mixed |
string |
混合語句 |
negative |
string |
負語句 |
neutral |
string |
中性語句 |
positive |
string |
正語句 |
DocumentStatistics
如果在要求中指定 showStats=true,則此字段將包含文件承載的相關信息。
名稱 | 類型 | Description |
---|---|---|
charactersCount |
integer |
檔中可辨識的文字元素數目。 |
transactionsCount |
integer |
檔的交易數目。 |
DocumentWarning
包含警告物件,其中包含已處理之檔的警告。
名稱 | 類型 | Description |
---|---|---|
code |
警告碼。 |
|
message |
string |
警告訊息。 |
targetRef |
string |
指出目標物件的 JSON 指標參考。 |
EntitiesDocumentResult
包含文件的實體辨識工作結果。
名稱 | 類型 | Description |
---|---|---|
entities |
Entity[] |
檔中已辨識的實體。 |
id |
string |
唯一、非空白的文件標識碼。 |
statistics |
如果在要求中指定 showStats=true,則此字段將包含文件承載的相關信息。 |
|
warnings |
處理檔時遇到的警告。 |
EntitiesResult
包含實體辨識工作結果。
名稱 | 類型 | Description |
---|---|---|
documents |
依文件回應 |
|
errors |
依文件識別碼的錯誤。 |
|
modelVersion |
string |
此欄位會指出用於評分的模型。 |
statistics |
如果在要求中指定 showStats=true,則此字段將包含要求承載的相關信息。 |
EntitiesTaskParameters
實體辨識工作支持的參數。
名稱 | 類型 | 預設值 | Description |
---|---|---|---|
loggingOptOut |
boolean |
False |
記錄退出宣告 |
modelVersion |
string |
latest |
模型版本 |
stringIndexType | TextElements_v8 |
(選擇性) 參數,以提供用來解譯字串位移的字串索引類型。 默認為 TextElements (Graphemes) 。 |
EntitiesTaskResult
包含實體工作
名稱 | 類型 | Description |
---|---|---|
kind |
string:
Entity |
工作結果的類型。 |
results |
實體辨識的結果。 |
Entity
定義偵測到的實體物件,其中包含偵測到的實體類別和實體文字等。
名稱 | 類型 | Description |
---|---|---|
category |
string |
實體類型。 |
confidenceScore |
number |
擷取實體的 0 到 1 之間的信賴分數。 |
length |
integer |
實體文字的長度。 使用不同的 『stringIndexType』 值可能會影響傳回的長度。 |
offset |
integer |
實體文字的開始位置。 使用不同的 『stringIndexType』 值可能會影響傳回的位移。 |
subcategory |
string |
(選擇性) 實體子類型。 |
text |
string |
要求中顯示的實體文字。 |
EntityLinkingResult
實體連結結果。
名稱 | 類型 | Description |
---|---|---|
documents |
依文件回應 |
|
errors |
依文件識別碼的錯誤。 |
|
modelVersion |
string |
此欄位會指出用於評分的模型。 |
statistics |
如果在要求中指定 showStats=true,則此字段將包含要求承載的相關信息。 |
EntityLinkingTaskParameters
實體連結工作支持的參數。
名稱 | 類型 | 預設值 | Description |
---|---|---|---|
loggingOptOut |
boolean |
False |
記錄退出宣告 |
modelVersion |
string |
latest |
模型版本 |
stringIndexType | TextElements_v8 |
選擇性參數,提供用來解譯字串位移的字串索引類型。 默認為 TextElements (Graphemes) 。 |
EntityLinkingTaskResult
包含分析文字實體連結工作結果。
名稱 | 類型 | Description |
---|---|---|
kind |
string:
Entity |
工作結果的類型。 |
results |
實體連結結果。 |
Error
當服務在處理要求期間遇到一些錯誤時,傳回的錯誤回應物件。
名稱 | 類型 | Description |
---|---|---|
code |
其中一組伺服器定義的錯誤碼。 |
|
details |
Error[] |
導致此錯誤之特定錯誤的詳細數據陣列。 |
innererror |
物件,包含比目前對象有關錯誤更具體的資訊。 |
|
message |
string |
人類可讀取的錯誤表示法。 |
target |
string |
錯誤的目標。 |
ErrorCode
人類可讀取的錯誤碼。
名稱 | 類型 | Description |
---|---|---|
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
錯誤回應。
名稱 | 類型 | Description |
---|---|---|
error |
error 物件。 |
InnerErrorCode
人類可讀取的錯誤碼。
名稱 | 類型 | Description |
---|---|---|
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。
名稱 | 類型 | Description |
---|---|---|
code |
其中一組伺服器定義的錯誤碼。 |
|
details |
object |
錯誤詳細數據。 |
innererror |
物件,包含比目前對象有關錯誤的更特定資訊。 |
|
message |
string |
錯誤訊息。 |
target |
string |
錯誤目標。 |
KeyPhraseResult
包含 KeyPhraseResult。
名稱 | 類型 | Description |
---|---|---|
documents |
依文件回應 |
|
errors |
依文件識別碼的錯誤。 |
|
modelVersion |
string |
此欄位會指出用於評分的模型。 |
statistics |
如果在要求中指定 showStats=true,則此字段將包含要求承載的相關信息。 |
KeyPhrasesDocumentResult
包含文件的關鍵片語擷取結果。
名稱 | 類型 | Description |
---|---|---|
id |
string |
唯一、非空白的文件標識碼。 |
keyPhrases |
string[] |
代表性單字或片語的清單。 傳迴的主要片語數目與輸入檔中的字數成正比。 |
statistics |
如果在要求中指定 showStats=true,則此字段將包含文件承載的相關信息。 |
|
warnings |
處理檔時遇到的警告。 |
KeyPhraseTaskParameters
關鍵片語擷取工作支持的參數。
名稱 | 類型 | 預設值 | Description |
---|---|---|---|
loggingOptOut |
boolean |
False |
記錄退出宣告 |
modelVersion |
string |
latest |
模型版本 |
KeyPhraseTaskResult
包含分析文字 KeyPhraseExtraction 工作結果。
名稱 | 類型 | Description |
---|---|---|
kind |
string:
Key |
工作結果的類型。 |
results |
關鍵片語擷取結果的清單 |
LanguageDetectionAnalysisInput
包含語言偵測檔分析輸入。
名稱 | 類型 | Description |
---|---|---|
documents |
要分析的檔案清單。 |
LanguageDetectionDocumentResult
包含文件的語言偵測。
名稱 | 類型 | Description |
---|---|---|
detectedLanguage |
偵測到的語言。 |
|
id |
string |
唯一、非空白的文件標識碼。 |
statistics |
如果在要求中指定 showStats=true,則此字段將包含文件承載的相關信息。 |
|
warnings |
處理檔時遇到的警告。 |
LanguageDetectionResult
包含要求的語言偵測結果。
名稱 | 類型 | Description |
---|---|---|
documents |
每個輸入文件的語言偵測結果列舉。 |
|
errors |
依文件識別碼的錯誤。 |
|
modelVersion |
string |
此欄位會指出用於評分的模型。 |
statistics |
如果在要求中指定 showStats=true,則此字段將包含要求承載的相關信息。 |
LanguageDetectionTaskParameters
語言偵測工作支持的參數。
名稱 | 類型 | 預設值 | Description |
---|---|---|---|
loggingOptOut |
boolean |
False |
記錄退出宣告 |
modelVersion |
string |
latest |
模型版本 |
LanguageDetectionTaskResult
包含要求的語言偵測工作結果。
名稱 | 類型 | Description |
---|---|---|
kind |
string:
Language |
工作結果的類型。 |
results |
包含語言偵測結果。 |
LanguageInput
包含語言偵測輸入。
名稱 | 類型 | Description |
---|---|---|
countryHint |
string |
協助語言偵測文字的國家/地區提示。 |
id |
string |
唯一的非空白文件標識碼。 |
text |
string |
要處理的輸入文字。 |
LinkedEntitiesDocumentResult
實體鏈接文件結果。
名稱 | 類型 | Description |
---|---|---|
entities |
檔中已辨識已知的實體。 |
|
id |
string |
唯一、非空白的文件標識碼。 |
statistics |
如果在要求中指定 showStats=true,則此字段將包含文件承載的相關信息。 |
|
warnings |
處理檔時遇到的警告。 |
LinkedEntity
LinkedEntity 物件,其中包含偵測到的實體與相關聯的來源/連結。
名稱 | 類型 | Description |
---|---|---|
bingId |
string |
已辨識實體的 Bing 實體搜尋 API 唯一識別碼。 |
dataSource |
string |
用來擷取實體鏈接的數據源,例如Wiki/Bing等。 |
id |
string |
數據源中已辨識實體的唯一標識符。 |
language |
string |
數據源中使用的語言。 |
matches |
Match[] |
此實體的實例清單會出現在文字中。 |
name |
string |
實體連結正式名稱。 |
url |
string |
數據源中實體頁面的 URL。 |
Match
Match 物件,其中包含具有位移和長度的偵測到實體文字。
名稱 | 類型 | Description |
---|---|---|
confidenceScore |
number |
如果辨識已知的專案,則會傳回十進位數,表示 0 到 1 之間的信賴等級。 |
length |
integer |
實體比對文字的長度。 |
offset |
integer |
實體比對文字的開始位置。 |
text |
string |
要求中顯示的實體文字。 |
MultiLanguageAnalysisInput
服務要分析的輸入檔集合。
名稱 | 類型 | Description |
---|---|---|
documents |
要分析的輸入檔。 |
MultiLanguageInput
包含服務要分析的輸入檔。
名稱 | 類型 | Description |
---|---|---|
id |
string |
唯一的非空白文件標識碼。 |
language |
string |
(選擇性) 這是語言的 2 個字母 ISO 639-1 表示法。 例如,使用 「en」 表示英文;西班牙文等的 “es”如果未設定,請使用英文的 「en」 作為預設值。 (下列專案僅適用於 2023-04-15-preview 和更新版本) For Auto Language Detection,請使用 “auto”。 如果未設定,請使用英文的 「en」 作為預設值。 |
text |
string |
要處理的輸入文字。 |
PiiCategory
(選擇性) 描述要傳回的 PII 類別
名稱 | 類型 | Description |
---|---|---|
ABARoutingNumber |
string |
ABA 路由號碼 |
ARNationalIdentityNumber |
string |
AR 國家身分識別號碼 |
ATIdentityCard |
string |
AT 識別卡 |
ATTaxIdentificationNumber |
string |
AT 稅務標識碼 |
ATValueAddedTaxNumber |
string |
AT 加值稅號 |
AUBankAccountNumber |
string |
AT 識別卡 |
AUBusinessNumber |
string |
AU 商務號碼 |
AUCompanyNumber |
string |
AU 公司號碼 |
AUDriversLicenseNumber |
string |
AU 驅動程式的授權號碼 |
AUMedicalAccountNumber |
string |
AU 醫療帳戶號碼 |
AUPassportNumber |
string |
AU Passport 號碼 |
AUTaxFileNumber |
string |
AU 稅務檔案編號 |
Address |
string |
位址 |
Age |
string |
年齡 |
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 National Number |
BENationalNumberV2 |
string |
BE National Number V2 |
BEValueAddedTaxNumber |
string |
BE 值加稅號碼 |
BGUniformCivilNumber |
string |
BG 統一公民編號 |
BRCPFNumber |
string |
BR CPF 編號 |
BRLegalEntityNumber |
string |
BR 法律實體編號 |
BRNationalIDRG |
string |
BR 國家/地區標識碼 RG |
CABankAccountNumber |
string |
CA 銀行帳戶號碼 |
CADriversLicenseNumber |
string |
CA 驅動程式的授權號碼 |
CAHealthServiceNumber |
string |
CA 健全狀況服務號碼 |
CAPassportNumber |
string |
CA Passport 號碼 |
CAPersonalHealthIdentification |
string |
CA 個人健康情況識別 |
CASocialInsuranceNumber |
string |
CA 社會保險號碼 |
CHSocialSecurityNumber |
string |
CH 社會安全號碼 |
CLIdentityCardNumber |
string |
CL 識別卡號碼 |
CNResidentIdentityCardNumber |
string |
CN 常駐身分識別卡號碼 |
CYIdentityCard |
string |
CY 身分識別卡 |
CYTaxIdentificationNumber |
string |
CY 稅務標識碼 |
CZPersonalIdentityNumber |
string |
CZ 個人身分識別號碼 |
CZPersonalIdentityV2 |
string |
CZ 個人身分識別 V2 |
CreditCardNumber |
string |
信用卡號碼 |
DEDriversLicenseNumber |
string |
DE 驅動程式的授權號碼 |
DEIdentityCardNumber |
string |
DE 身分識別卡號碼 |
DEPassportNumber |
string |
DE Passport 號碼 |
DETaxIdentificationNumber |
string |
DE 稅務標識碼 |
DEValueAddedNumber |
string |
DE Value Added Number |
DKPersonalIdentificationNumber |
string |
DK 個人識別碼 |
DKPersonalIdentificationV2 |
string |
DK 個人識別 V2 |
Date |
string |
Date |
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 國家/地區標識符 |
FINationalIDV2 |
string |
FI 國家/地區標識碼 V2 |
FIPassportNumber |
string |
FI Passport 號碼 |
FRDriversLicenseNumber |
string |
FR 驅動程式的授權號碼 |
FRHealthInsuranceNumber |
string |
FR 醫療保健號碼 |
FRNationalID |
string |
FR 國家/地區標識符 |
FRPassportNumber |
string |
FR Passport 號碼 |
FRSocialSecurityNumber |
string |
FR 社會安全號碼 |
FRTaxIdentificationNumber |
string |
FR 稅務標識碼 |
FRValueAddedTaxNumber |
string |
FR 值加稅號碼 |
GRNationalIDCard |
string |
GR 國家/地區標識符卡片 |
GRNationalIDV2 |
string |
GR 國家/地區標識碼 V2 |
GRTaxIdentificationNumber |
string |
GR 稅務標識碼 |
HKIdentityCardNumber |
string |
HK 識別卡號碼 |
HRIdentityCardNumber |
string |
HR 身分識別卡號碼 |
HRNationalIDNumber |
string |
HR 國家/地區標識符 |
HRPersonalIdentificationNumber |
string |
HR 個人識別碼 |
HRPersonalIdentificationOIBNumberV2 |
string |
HR 個人識別 OIB 數位 V2 |
HUPersonalIdentificationNumber |
string |
HU 個人識別碼 |
HUTaxIdentificationNumber |
string |
HU 稅務標識碼 |
HUValueAddedNumber |
string |
HU 加值號碼 |
IDIdentityCardNumber |
string |
標識碼識別卡號碼 |
IEPersonalPublicServiceNumber |
string |
IE 個人公用服務號碼 |
IEPersonalPublicServiceNumberV2 |
string |
IE 個人公用服務號碼 V2 |
ILBankAccountNumber |
string |
IL 銀行帳戶號碼 |
ILNationalID |
string |
IL 國家/地區標識符 |
INPermanentAccount |
string |
IN 永久帳戶 |
INUniqueIdentificationNumber |
string |
IN 唯一標識碼 |
IPAddress |
string |
IP 位址 |
ITDriversLicenseNumber |
string |
IT 驅動程式的授權號碼 |
ITFiscalCode |
string |
IT 會計程式代碼 |
ITValueAddedTaxNumber |
string |
IT 值加稅號碼 |
InternationalBankingAccountNumber |
string |
國際銀行帳戶號碼 |
JPBankAccountNumber |
string |
JP 銀行帳戶號碼 |
JPDriversLicenseNumber |
string |
JP 驅動程式的授權號碼 |
JPMyNumberCorporate |
string |
JP 我的數位公司 |
JPMyNumberPersonal |
string |
JP 我的號碼個人 |
JPPassportNumber |
string |
JP Passport 號碼 |
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 稅金標識碼 |
MYIdentityCardNumber |
string |
我的身分識別卡號碼 |
NLCitizensServiceNumber |
string |
NL 公民服務號碼 |
NLCitizensServiceNumberV2 |
string |
NL 公民服務號碼 V2 |
NLTaxIdentificationNumber |
string |
NL 稅務標識碼 |
NLValueAddedTaxNumber |
string |
NL 加值稅號 |
NOIdentityNumber |
string |
NO Identity Number |
NZBankAccountNumber |
string |
NZ 銀行帳戶號碼 |
NZDriversLicenseNumber |
string |
NZ 驅動程式的授權號碼 |
NZInlandRevenueNumber |
string |
NZ 內陸營收號碼 |
NZMinistryOfHealthNumber |
string |
NZ 健康狀態號碼 |
NZSocialWelfareNumber |
string |
NZ 社交關係號碼 |
Organization |
string |
組織 |
PHUnifiedMultiPurposeIDNumber |
string |
PH 整合多重用途標識碼 |
PLIdentityCard |
string |
PL 識別卡 |
PLNationalID |
string |
PL 國家識別碼 |
PLNationalIDV2 |
string |
PL 國家識別碼 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 Passport 號碼國內 |
RUPassportNumberInternational |
string |
RU Passport Number International |
SANationalID |
string |
SA 國家/地區標識符 |
SENationalID |
string |
SE 國家/地區標識符 |
SENationalIDV2 |
string |
SE 國家/地區標識碼 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 國家/地區標識符 |
TWPassportNumber |
string |
TW Passport 號碼 |
TWResidentCertificate |
string |
TW 駐留憑證 |
UAPassportNumberDomestic |
string |
UA Passport 號碼國內 |
UAPassportNumberInternational |
string |
UA Passport Number International |
UKDriversLicenseNumber |
string |
英國驅動程式的授權號碼 |
UKElectoralRollNumber |
string |
英國文庫捲動編號 |
UKNationalHealthNumber |
string |
英國國家/地區健康情況號碼 |
UKNationalInsuranceNumber |
string |
英國國家保險號碼 |
UKUniqueTaxpayerNumber |
string |
英國唯一的分頁碼 |
URL |
string |
URL |
USBankAccountNumber |
string |
美國銀行帳戶號碼 |
USDriversLicenseNumber |
string |
美國驅動程式的授權號碼 |
USIndividualTaxpayerIdentification |
string |
美國個人識別 |
USSocialSecurityNumber |
string |
美國社會安全號碼 |
USUKPassportNumber |
string |
美國英國 Passport 號碼 |
ZAIdentificationNumber |
string |
ZA 識別碼 |
PiiDomain
PII 工作的網域
名稱 | 類型 | Description |
---|---|---|
none |
string |
表示未指定網域。 |
phi |
string |
表示應該修訂個人健康情況資訊網域中的實體。 |
PiiEntitiesDocumentResult
包含 PII 結果。
名稱 | 類型 | Description |
---|---|---|
entities |
Entity[] |
檔中已辨識的實體。 |
id |
string |
唯一、非空白的文件標識碼。 |
redactedText |
string |
傳回已修訂的文字。 |
statistics |
如果在要求中指定 showStats=true,則此字段將包含文件承載的相關信息。 |
|
warnings |
處理檔時遇到的警告。 |
PiiResult
包含 PiiResult。
名稱 | 類型 | Description |
---|---|---|
documents |
依文件回應 |
|
errors |
依文件識別碼的錯誤。 |
|
modelVersion |
string |
此欄位會指出用於評分的模型。 |
statistics |
如果在要求中指定 showStats=true,則此字段將包含要求承載的相關信息。 |
PiiTaskParameters
PII 實體辨識工作支持的參數。
名稱 | 類型 | 預設值 | Description |
---|---|---|---|
domain | none |
PII 工作的網域 |
|
loggingOptOut |
boolean |
False |
記錄退出宣告 |
modelVersion |
string |
latest |
模型版本 |
piiCategories |
要傳回回應中要傳回的 PII 類別列舉。 |
||
stringIndexType | TextElements_v8 |
要用於分析的 StringIndexType。 |
PiiTaskResult
包含分析文字 PIIEntityRecognition LRO 工作。
名稱 | 類型 | Description |
---|---|---|
kind |
string:
Pii |
工作結果的類型。 |
results |
pii 結果的清單 |
RequestStatistics
如果在要求中指定 showStats=true,則此字段將包含要求承載的相關信息。
名稱 | 類型 | Description |
---|---|---|
documentsCount |
integer |
要求中提交的文件數目。 |
erroneousDocumentsCount |
integer |
無效的檔數目。 這包括空白、大小過高或不支援的語言檔。 |
transactionsCount |
integer |
要求的交易數目。 |
validDocumentsCount |
integer |
有效文件的數目。 這不包括空白、大小過高或不支援的語言檔。 |
SentenceAssessment
表示句子評量,以及與其相關的評量或目標物件。
名稱 | 類型 | Description |
---|---|---|
confidenceScores |
代表所有情感類別的信賴分數:正面和負面。 |
|
isNegated |
boolean |
表示評量是否否定的指標。 |
length |
integer |
目標的長度。 |
offset |
integer |
句子開頭的目標位移。 |
sentiment |
句子的情感。 |
|
text |
string |
偵測到的目標文字。 |
SentenceSentiment
檔的句子情感。
名稱 | 類型 | Description |
---|---|---|
assessments |
句子的評量陣列。 |
|
confidenceScores |
所有類別句子的情感信賴分數介於 0 到 1 之間。 |
|
length |
integer |
目標的長度。 |
offset |
integer |
句子開頭的目標位移。 |
sentiment |
句子的預測情感。 |
|
targets |
句子目標的陣列。 |
|
text |
string |
句子文字。 |
SentenceSentimentValue
句子的預測情感。
名稱 | 類型 | Description |
---|---|---|
negative |
string |
負面情感 |
neutral |
string |
中性情感 |
positive |
string |
正面情感 |
SentenceTarget
表示句子目標,以及與其相關的評量或目標物件。
名稱 | 類型 | Description |
---|---|---|
confidenceScores |
代表所有情感類別的信賴分數:正面和負面。 |
|
length |
integer |
目標的長度。 |
offset |
integer |
句子開頭的目標位移。 |
relations |
與目標相關的評量或目標物件的陣列。 |
|
sentiment |
句子的情感。 |
|
text |
string |
偵測到的目標文字。 |
SentimentAnalysisTaskParameters
情感分析工作的支持參數。
名稱 | 類型 | 預設值 | Description |
---|---|---|---|
loggingOptOut |
boolean |
False |
記錄退出宣告 |
modelVersion |
string |
latest |
模型版本 |
opinionMining |
boolean |
False |
是否要在要求中使用意見採礦。 |
stringIndexType | TextElements_v8 |
指定用來解譯字串位移的方法。 |
SentimentConfidenceScores
代表所有情感類別介於 0 到 1 之間的信賴分數:正面、中性、負面。
名稱 | 類型 | Description |
---|---|---|
negative |
number |
負面情感的信賴分數 |
neutral |
number |
中性情感的信賴分數 |
positive |
number |
正面情感的信賴分數 |
SentimentDocumentResult
物件,表示每個文件預先建立的情感分析結果。
名稱 | 類型 | Description |
---|---|---|
confidenceScores |
所有類別句子的情感信賴分數介於 0 到 1 之間。 |
|
id |
string |
唯一、非空白的文件標識碼。 |
sentences |
檔的句子情感。 |
|
sentiment |
檔 (負面、中性、正面或混合) 的預測情感。 |
|
statistics |
如果在要求中指定 showStats=true,則此字段將包含文件承載的相關信息。 |
|
warnings |
處理檔時遇到的警告。 |
SentimentResponse
輸入檔的情感分析結果。
名稱 | 類型 | Description |
---|---|---|
documents |
輸入中每個檔的情感分析結果。 |
|
errors |
依文件識別碼的錯誤。 |
|
modelVersion |
string |
此欄位會指出用於評分的模型。 |
statistics |
如果在要求中指定 showStats=true,則此字段將包含要求承載的相關信息。 |
SentimentTaskResult
包含分析文字 SentimentAnalysis LRO 工作結果。
名稱 | 類型 | Description |
---|---|---|
kind |
string:
Sentiment |
工作結果的類型。 |
results |
情感分析結果 |
StringIndexType
字串索引類型
名稱 | 類型 | Description |
---|---|---|
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
代表所有情感類別的信賴分數:正面和負面。
名稱 | 類型 | Description |
---|---|---|
negative |
number |
負面情感的信賴分數 |
positive |
number |
正面情感的信賴分數 |
TargetRelation
表示評量和/或目標之間的關聯性。
名稱 | 類型 | Description |
---|---|---|
ref |
string |
表示連結物件的 JSON 指標。 |
relationType |
與目標相關的類型。 |
TargetRelationType
與目標相關的類型。
名稱 | 類型 | Description |
---|---|---|
assessment |
string |
評定關聯性。 |
target |
string |
目標關聯性。 |
TokenSentimentValue
句子的預測情感。
名稱 | 類型 | Description |
---|---|---|
mixed |
string |
混合情感 |
negative |
string |
負面情感 |
positive |
string |
正面情感 |
WarningCodeValue
定義警告碼的清單。
名稱 | 類型 | Description |
---|---|---|
DocumentTruncated |
string |
檔截斷警告 |
LongWordsInDocument |
string |
檔警告中的長字 |