Text Analysis Authoring - Import
プロジェクトをインポートするジョブをトリガーします。 同じ名前のプロジェクトが既に存在する場合は、そのプロジェクトのデータを置き換えます。
POST {Endpoint}/language/authoring/analyze-text/projects/{projectName}/:import?api-version=2023-04-01
URI パラメーター
名前 | / | 必須 | 型 | 説明 |
---|---|---|---|---|
Endpoint
|
path | True |
string |
サポートされている Cognitive Services エンドポイント (例: https://.api.cognitiveservices.azure.com). |
project
|
path | True |
string |
使用するプロジェクトの名前。 |
api-version
|
query | True |
string |
クライアント API バージョン。 |
要求本文
名前 | 必須 | 型 | 説明 |
---|---|---|---|
metadata | True |
プロジェクトのメタデータを表します。 |
|
projectFileVersion | True |
string |
エクスポートされたファイルのバージョン。 |
stringIndexType | True |
文字列オフセットを解釈するために使用するメソッドを指定します。 詳細については、https://aka.ms/text-analytics-offsets のトピックを参照してください。 |
|
assets | TextAnalysisAuthoringExportedProjectAssets: |
プロジェクト資産を表します。 |
応答
名前 | 型 | 説明 |
---|---|---|
202 Accepted |
呼び出しが成功すると、ジョブの状態を確認するために使用する Operation-Location ヘッダーが返されます。 ヘッダー operation-location: string |
|
Other Status Codes |
エラー応答。 |
セキュリティ
AADToken
これらは Azure Active Directory OAuth2 フローです。 Azure ロールベースのアクセス制御と組み合わせて使用すると、Azure Maps REST API へのアクセスを制御できます。 Azure ロールベースのアクセス制御は、1 つ以上のAzure Mapsリソース アカウントまたはサブリソースへのアクセスを指定するために使用されます。 REST API に対する 1 つ以上のアクセス許可で構成される組み込みロールまたはカスタム ロールを使用して、任意のユーザー、グループ、またはサービス プリンシパルにアクセス権 Azure Mapsを付与できます。
シナリオを実装するには、 認証の概念を表示することをお勧めします。 要約すると、このセキュリティ定義は、特定の API とスコープに対するアクセス制御が可能なオブジェクトを使用してアプリケーションをモデル化するためのソリューションを提供します。
メモ
- このセキュリティ定義では、 ヘッダーを使用して、
x-ms-client-id
アプリケーションがアクセスを要求しているリソースAzure Maps示す必要があります。 これは、 Maps 管理 API から取得できます。
Authorization URL
は、Azure パブリック クラウド インスタンスに固有です。 ソブリン クラウドには、一意の承認 URL と Azure Active Directory 構成があります。
* Azure ロールベースのアクセス制御は、Azure portal、PowerShell、CLI、Azure SDK、または REST API を介して Azure 管理プレーンから構成されます。
* Azure Maps Web SDK を使用すると、複数のユース ケースに対してアプリケーションを構成ベースで設定できます。
- 現在、Azure Active Directory v1.0 または v2.0 は職場、学校、ゲストをサポートしていますが、個人用アカウントはサポートしていません。
型:
oauth2
フロー:
implicit
Authorization URL (承認 URL):
https://login.microsoftonline.com/common/oauth2/authorize
スコープ
名前 | 説明 |
---|---|
https://cognitiveservices.azure.com/.default | https://cognitiveservices.azure.com/.default |
Ocp-Apim-Subscription-Key
言語サービス リソースのサブスクリプション キー。
型:
apiKey
/:
header
例
Successful Import Project
要求のサンプル
POST {Endpoint}/language/authoring/analyze-text/projects/LoanAgreements/:import?api-version=2023-04-01
{
"projectFileVersion": "2022-05-01",
"stringIndexType": "Utf16CodeUnit",
"metadata": {
"projectKind": "CustomEntityRecognition",
"storageInputContainerName": "loanagreements",
"settings": {},
"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"
},
"assets": {
"projectKind": "CustomEntityRecognition",
"entities": [
{
"category": "Date"
},
{
"category": "LenderName"
},
{
"category": "LenderAddress"
}
],
"documents": [
{
"location": "01.txt",
"language": "en-us",
"entities": [
{
"regionOffset": 0,
"regionLength": 1793,
"labels": [
{
"category": "Date",
"offset": 5,
"length": 9
},
{
"category": "LenderName",
"offset": 273,
"length": 14
},
{
"category": "LenderAddress",
"offset": 314,
"length": 15
}
]
}
]
},
{
"location": "02.txt",
"language": "en-us",
"entities": [
{
"regionOffset": 0,
"regionLength": 1804,
"labels": [
{
"category": "Date",
"offset": 5,
"length": 10
},
{
"category": "LenderName",
"offset": 284,
"length": 10
},
{
"category": "LenderAddress",
"offset": 321,
"length": 20
}
]
}
]
}
]
}
}
応答のサンプル
operation-location: {Endpoint}/language/authoring/analyze-text/projects/LoanAgreements/import/jobs/4d37982f-fded-4c2c-afe3-15953b5919b6_637858368000000000?api-version=2022-05-01
定義
Error
error オブジェクト。
名前 | 型 | 説明 |
---|---|---|
code |
サーバー定義のエラー コードのセットの 1 つ。 |
|
details |
Error[] |
この報告されたエラーの原因となった特定のエラーに関する詳細の配列。 |
innererror |
エラーに関する現在のオブジェクトよりも具体的な情報を含む オブジェクト。 |
|
message |
string |
エラーの人間が判読できる表現。 |
target |
string |
エラーのターゲット。 |
ErrorCode
人間が判読できるエラー コード。
名前 | 型 | 説明 |
---|---|---|
AzureCognitiveSearchIndexLimitReached |
string |
|
AzureCognitiveSearchIndexNotFound |
string |
|
AzureCognitiveSearchNotFound |
string |
|
AzureCognitiveSearchThrottling |
string |
|
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 |
error オブジェクト。 |
InnerErrorCode
人間が判読できるエラー コード。
名前 | 型 | 説明 |
---|---|---|
AzureCognitiveSearchNotFound |
string |
|
AzureCognitiveSearchThrottling |
string |
|
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 |
サーバー定義のエラー コードのセットの 1 つ。 |
|
details |
object |
エラーの詳細。 |
innererror |
エラーに関する現在のオブジェクトよりも具体的な情報を含む オブジェクト。 |
|
message |
string |
エラー メッセージ。 |
target |
string |
エラー ターゲット。 |
ProjectKind
プロジェクトの種類。
名前 | 型 | 説明 |
---|---|---|
CustomEntityRecognition |
string |
独自のデータを使用してドメイン カテゴリを識別する抽出モデルを構築する場合。 |
CustomMultiLabelClassification |
string |
独自のデータを使用してテキストを分類する分類モデルを構築する場合。 各ファイルには、1 つまたは複数のラベルを含めることができます。 たとえば、ファイル 1 は A、B、C に分類され、ファイル 2 は B と C に分類されます。 |
CustomSingleLabelClassification |
string |
独自のデータを使用してテキストを分類する分類モデルを構築する場合。 各ファイルのラベルは 1 つだけです。 たとえば、ファイル 1 は A として分類され、ファイル 2 は B として分類されます。 |
StringIndexType
文字列オフセットを解釈するために使用するメソッドを指定します。 詳細については、https://aka.ms/text-analytics-offsets のトピックを参照してください。
名前 | 型 | 説明 |
---|---|---|
Utf16CodeUnit |
string |
オフセットと長さの値は UTF-16 コード単位に対応します。 アプリケーションが Unicode (Java、JavaScript など) をサポートする言語で記述されている場合は、このオプションを使用します。 |
TextAnalysisAuthoringCreateProjectOptions
プロジェクトの作成または更新に使用するオプションを表します。
名前 | 型 | 説明 |
---|---|---|
description |
string |
プロジェクトの説明。 |
language |
string |
プロジェクト言語。 これは、言語の BCP-47 表現です。 たとえば、英語の場合は "en"、英語 (英国) の場合は "en-gb"、スペイン語の場合は "es" を使用します。 |
multilingual |
boolean |
プロジェクトを複数の言語に使用するかどうか。 |
projectKind |
プロジェクトの種類。 |
|
projectName |
string |
新しいプロジェクト名。 |
settings |
プロジェクトの設定。 |
|
storageInputContainerName |
string |
ストレージ コンテナー名。 |
TextAnalysisAuthoringExportedClass
エクスポートされたプロジェクトのクラスを表します。
名前 | 型 | 説明 |
---|---|---|
category |
string |
クラス カテゴリ。 |
TextAnalysisAuthoringExportedCustomEntityRecognitionDocument
カスタム エンティティ認識プロジェクトのエクスポートされたドキュメントを表します。
名前 | 型 | 説明 |
---|---|---|
dataset |
string |
このドキュメントのデータセット。 使用できる値は、'Train' と 'Test' です。 |
entities |
ドキュメントに属するエンティティ ラベルの一覧。 |
|
language |
string |
ドキュメント言語を表します。 これは、言語の BCP-47 表現です。 たとえば、英語の場合は "en"、英語 (英国) の場合は "en-gb"、スペイン語の場合は "es" を使用します。 |
location |
string |
ストレージ内のドキュメントの場所。 |
TextAnalysisAuthoringExportedCustomEntityRecognitionProjectAssets
エンティティ認識プロジェクトのエクスポートされた資産を表します。
名前 | 型 | 説明 |
---|---|---|
documents |
Text |
プロジェクトに属するドキュメントの一覧。 |
entities |
プロジェクトに属するエンティティの一覧。 |
|
projectKind |
string:
Custom |
資産が属するプロジェクトの種類。 |
TextAnalysisAuthoringExportedCustomMultiLabelClassificationDocument
カスタムの複数ラベル分類プロジェクトのエクスポートされたドキュメントを表します。
名前 | 型 | 説明 |
---|---|---|
classes |
ドキュメント クラス。 |
|
dataset |
string |
このドキュメントのデータセット。 使用できる値は、'Train' と 'Test' です。 |
language |
string |
ドキュメント言語を表します。 これは、言語の BCP-47 表現です。 たとえば、英語の場合は "en"、英語 (英国) の場合は "en-gb"、スペイン語の場合は "es" を使用します。 |
location |
string |
ストレージ内のドキュメントの場所。 |
TextAnalysisAuthoringExportedCustomMultiLabelClassificationProjectAssets
カスタムマルチラベル分類プロジェクトのエクスポートされた資産を表します。
名前 | 型 | 説明 |
---|---|---|
classes |
プロジェクト内のクラスの一覧。 |
|
documents |
Text |
プロジェクト内のドキュメントの一覧。 |
projectKind |
string:
Custom |
資産が属するプロジェクトの種類。 |
TextAnalysisAuthoringExportedCustomSingleLabelClassificationDocument
カスタムの単一ラベル分類プロジェクトのエクスポートされたドキュメントを表します。
名前 | 型 | 説明 |
---|---|---|
class |
ドキュメントのクラス。 |
|
dataset |
string |
このドキュメントのデータセット。 使用できる値は、'Train' と 'Test' です。 |
language |
string |
ドキュメント言語を表します。 これは、言語の BCP-47 表現です。 たとえば、英語の場合は "en"、英語 (英国) の場合は "en-gb"、スペイン語の場合は "es" を使用します。 |
location |
string |
ストレージ内のドキュメントの場所。 |
TextAnalysisAuthoringExportedCustomSingleLabelClassificationProjectAssets
単一ラベル分類プロジェクトのエクスポートされた資産を表します。
名前 | 型 | 説明 |
---|---|---|
classes |
このプロジェクトに属するクラスの一覧。 |
|
documents |
Text |
このプロジェクトに属するドキュメントの一覧。 |
projectKind |
string:
Custom |
資産が属するプロジェクトの種類。 |
TextAnalysisAuthoringExportedDocumentClass
ドキュメントの分類ラベルを表します。
名前 | 型 | 説明 |
---|---|---|
category |
string |
TextAnalysisAuthoringExportedDocumentEntityLabel
ドキュメントのエンティティ ラベルを表します。
名前 | 型 | 説明 |
---|---|---|
category |
string |
エンティティ カテゴリ。 |
length |
integer |
エンティティ テキストの長さ。 |
offset |
integer |
エンティティ テキストの開始位置。 |
TextAnalysisAuthoringExportedDocumentRegion
エンティティラベル付けのドキュメント内の領域を表します。
名前 | 型 | 説明 |
---|---|---|
labels |
このリージョンに属するエンティティ ラベルの一覧。 |
|
regionLength |
integer |
領域テキストの長さ。 |
regionOffset |
integer |
リージョンの開始位置。 |
TextAnalysisAuthoringExportedEntity
エクスポートされたプロジェクト内のエンティティを表します。
名前 | 型 | 説明 |
---|---|---|
category |
string |
エンティティ カテゴリ。 |
TextAnalysisAuthoringExportedProject
エクスポートされたプロジェクトを表します。
名前 | 型 | 説明 |
---|---|---|
assets | TextAnalysisAuthoringExportedProjectAssets: |
プロジェクト資産を表します。 |
metadata |
プロジェクトのメタデータを表します。 |
|
projectFileVersion |
string |
エクスポートされたファイルのバージョン。 |
stringIndexType |
文字列オフセットを解釈するために使用するメソッドを指定します。 詳細については、https://aka.ms/text-analytics-offsets のトピックを参照してください。 |
TextAnalysisAuthoringProjectSettings
プロジェクトの動作を定義するために使用される設定を表します。
名前 | 型 | 説明 |
---|---|---|
confidenceThreshold |
number |
予測が自動的に "なし" に変更される、信頼度が最も高いクラスのしきい値。 しきい値の値は、0 から 1 までの範囲である必要があります。 |