共用方式為


Text Analysis Authoring - Create Project

建立新的專案或更新現有的專案。

PATCH {Endpoint}/language/authoring/analyze-text/projects/{projectName}?api-version=2022-05-01

URI 參數

名稱 位於 必要 類型 Description
Endpoint
path True

string

支援的認知服務端點 (例如,https://.api.cognitiveservices.azure.com).

projectName
path True

string

maxLength: 100

要使用的項目名稱。

api-version
query True

string

用戶端 API 版本。

要求標頭

Media Types: "application/merge-patch+json"

名稱 必要 類型 Description
Ocp-Apim-Subscription-Key True

string

語言服務資源的訂用帳戶金鑰。

要求本文

Media Types: "application/merge-patch+json"

名稱 必要 類型 Description
language True

string

項目語言。 這是語言的 BCP-47 表示法。 例如,使用 「en」 代表英文、“en-gb” 代表英文 (UK)、“es” 代表西班牙文等。

projectKind True

ProjectKind

專案種類。

projectName True

string

新的項目名稱。

storageInputContainerName True

string

記憶體容器名稱。

description

string

專案描述。

multilingual

boolean

專案是否要用於多種語言。

settings

object

項目設定。

回應

名稱 類型 Description
200 OK

TextAnalysisAuthoringProjectMetadata

如果已更新專案的元資料已經存在,則為 。

201 Created

TextAnalysisAuthoringProjectMetadata

所建立專案的元數據。

Other Status Codes

ErrorResponse

錯誤回應。

安全性

Ocp-Apim-Subscription-Key

語言服務資源的訂用帳戶金鑰。

類型: apiKey
位於: header

範例

Successful Create Project

範例要求

PATCH {Endpoint}/language/authoring/analyze-text/projects/LoanAgreements?api-version=2022-05-01


{
  "projectName": "LoanAgreements",
  "language": "en",
  "projectKind": "CustomEntityRecognition",
  "description": "This is a sample dataset provided by the Azure Language service team to help users get started with [Custom named entity recognition](https://aka.ms/ct-docs). The provided sample dataset contains 20 loan agreements drawn up between two entities.",
  "multilingual": false,
  "storageInputContainerName": "loanagreements"
}

範例回覆

{
  "createdDateTime": "2022-04-18T13:53:03Z",
  "lastModifiedDateTime": "2022-04-18T13:53:03Z",
  "projectKind": "CustomEntityRecognition",
  "storageInputContainerName": "loanagreements",
  "projectName": "LoanAgreements",
  "multilingual": false,
  "description": "This is a sample dataset provided by the Azure Language service team to help users get started with [Custom named entity recognition](https://aka.ms/ct-docs). The provided sample dataset contains 20 loan agreements drawn up between two entities.",
  "language": "en"
}
{
  "createdDateTime": "2022-04-18T13:53:03Z",
  "lastModifiedDateTime": "2022-04-18T13:53:03Z",
  "lastTrainedDateTime": "2022-04-18T14:14:28Z",
  "lastDeployedDateTime": "2022-04-18T14:49:01Z",
  "projectKind": "CustomEntityRecognition",
  "storageInputContainerName": "loanagreements",
  "projectName": "LoanAgreements",
  "multilingual": false,
  "description": "This is a sample dataset provided by the Azure Language service team to help users get started with [Custom named entity recognition](https://aka.ms/ct-docs). The provided sample dataset contains 20 loan agreements drawn up between two entities.",
  "language": "en"
}

定義

名稱 Description
Error

error 物件。

ErrorCode

人類可讀取的錯誤碼。

ErrorResponse

錯誤回應。

InnerErrorCode

人類可讀取的錯誤碼。

InnerErrorModel

物件,包含有關錯誤的更特定資訊。 根據Microsoft一個 API 指導方針 - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses

ProjectKind

專案種類。

TextAnalysisAuthoringCreateProjectOptions

表示用來建立或更新項目的選項。

TextAnalysisAuthoringProjectMetadata

表示專案的元數據。

Error

error 物件。

名稱 類型 Description
code

ErrorCode

其中一組伺服器定義的錯誤碼。

details

Error[]

導致此錯誤之特定錯誤的詳細數據陣列。

innererror

InnerErrorModel

物件,包含與目前對象有關錯誤更具體的資訊。

message

string

錯誤的人類可讀取表示法。

target

string

錯誤的目標。

ErrorCode

人類可讀取的錯誤碼。

Description
AzureCognitiveSearchIndexLimitReached
AzureCognitiveSearchIndexNotFound
AzureCognitiveSearchNotFound
AzureCognitiveSearchThrottling
Conflict
Forbidden
InternalServerError
InvalidArgument
InvalidRequest
NotFound
OperationNotFound
ProjectNotFound
QuotaExceeded
ServiceUnavailable
Timeout
TooManyRequests
Unauthorized
Warning

ErrorResponse

錯誤回應。

名稱 類型 Description
error

Error

error 物件。

InnerErrorCode

人類可讀取的錯誤碼。

Description
AzureCognitiveSearchNotFound
AzureCognitiveSearchThrottling
EmptyRequest
ExtractionFailure
InvalidCountryHint
InvalidDocument
InvalidDocumentBatch
InvalidParameterValue
InvalidRequest
InvalidRequestBodyFormat
KnowledgeBaseNotFound
MissingInputDocuments
ModelVersionIncorrect
UnsupportedLanguageCode

InnerErrorModel

物件,包含有關錯誤的更特定資訊。 根據Microsoft一個 API 指導方針 - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses

名稱 類型 Description
code

InnerErrorCode

其中一組伺服器定義的錯誤碼。

details

object

錯誤詳細數據。

innererror

InnerErrorModel

物件,包含與目前對象有關錯誤更具體的資訊。

message

string

錯誤資訊。

target

string

錯誤目標。

ProjectKind

專案種類。

Description
CustomEntityRecognition

若要建置擷取模型,以使用您自己的數據來識別您的領域類別。

CustomMultiLabelClassification

若要建置分類模型,以使用您自己的數據來分類文字。 每個檔案可以有一或多個標籤。 例如,檔案 1 會分類為 A、B 和 C,而檔案 2 則分類為 B 和 C。

CustomSingleLabelClassification

若要建置分類模型,以使用您自己的數據來分類文字。 每個檔案只會有一個標籤。 例如,檔案 1 會分類為 A,而檔案 2 則分類為 B。

TextAnalysisAuthoringCreateProjectOptions

表示用來建立或更新項目的選項。

名稱 類型 Description
description

string

專案描述。

language

string

項目語言。 這是語言的 BCP-47 表示法。 例如,使用 「en」 代表英文、“en-gb” 代表英文 (UK)、“es” 代表西班牙文等。

multilingual

boolean

專案是否要用於多種語言。

projectKind

ProjectKind

專案種類。

projectName

string

新的項目名稱。

settings

object

項目設定。

storageInputContainerName

string

記憶體容器名稱。

TextAnalysisAuthoringProjectMetadata

表示專案的元數據。

名稱 類型 Description
createdDateTime

string (date-time)

表示專案建立日期時間。

description

string

專案描述。

language

string

項目語言。 這是語言的 BCP-47 表示法。 例如,使用 「en」 代表英文、“en-gb” 代表英文 (UK)、“es” 代表西班牙文等。

lastDeployedDateTime

string (date-time)

表示專案上次部署日期時間。

lastModifiedDateTime

string (date-time)

表示專案上次修改日期時間。

lastTrainedDateTime

string (date-time)

代表專案上次定型日期時間。

multilingual

boolean

專案是否要用於多種語言。

projectKind

ProjectKind

專案種類。

projectName

string

新的項目名稱。

settings

object

項目設定。

storageInputContainerName

string

記憶體容器名稱。