다음을 통해 공유


Text Analysis Authoring - Import

프로젝트를 가져오는 작업을 트리거합니다. 이름이 같은 프로젝트가 이미 있는 경우 해당 프로젝트의 데이터가 바뀝니다.

POST {Endpoint}/language/authoring/analyze-text/projects/{projectName}/:import?api-version=2023-04-01

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
Endpoint
path True

string

url

지원되는 Cognitive Services 엔드포인트(예: https://.api.cognitiveservices.azure.com).

projectName
path True

string

사용할 프로젝트의 이름입니다.

api-version
query True

string

이 작업에 사용할 API 버전입니다.

요청 본문

Name 필수 형식 Description
metadata True

CreateProjectOptions

프로젝트 메타데이터를 나타냅니다.

projectFileVersion True

string

내보낸 파일의 버전입니다.

stringIndexType True

StringIndexType

문자열 오프셋을 해석하는 데 사용되는 메서드를 지정합니다. 자세한 내용은 https://aka.ms/text-analytics-offsets참조하세요.

assets ExportedProjectAssets:

프로젝트 자산을 나타냅니다.

응답

Name 형식 Description
202 Accepted

처리를 위해 요청이 수락되었지만 처리가 아직 완료되지 않았습니다.

헤더

Operation-Location: string

Other Status Codes

ErrorResponse

예기치 않은 오류 응답입니다.

보안

Ocp-Apim-Subscription-Key

형식: apiKey
In(다음 안에): header

OAuth2Auth

형식: oauth2
Flow: accessCode
권한 부여 URL: https://login.microsoftonline.com/common/oauth2/authorize
토큰 URL: https://login.microsoftonline.com/common/oauth2/token

범위

Name Description
https://cognitiveservices.azure.com/.default

예제

SuccessfulImportProject

샘플 요청

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

정의

Name Description
CreateProjectOptions

프로젝트를 만들거나 업데이트하는 데 사용되는 옵션을 나타냅니다.

Error

오류 개체입니다.

ErrorCode

사람이 읽을 수 있는 오류 코드입니다.

ErrorResponse

오류 응답입니다.

ExportedProject

내보낸 프로젝트를 나타냅니다.

InnerErrorCode

사람이 읽을 수 있는 오류 코드입니다.

InnerErrorModel

오류에 대한 보다 구체적인 정보를 포함하는 개체입니다. Microsoft One API 지침에 따라 https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.

ProjectKind
ProjectSettings

프로젝트 동작을 정의하는 데 사용되는 설정을 나타냅니다.

StringIndexType
TextAnalysisAuthoringExportedClass

내보낸 프로젝트의 클래스를 나타냅니다.

TextAnalysisAuthoringExportedCustomEntityRecognitionDocument

사용자 지정 엔터티 인식 프로젝트에 대해 내보낸 문서를 나타냅니다.

TextAnalysisAuthoringExportedCustomEntityRecognitionProjectAssets

엔터티 인식 프로젝트에 대해 내보낸 자산을 나타냅니다.

TextAnalysisAuthoringExportedCustomMultiLabelClassificationDocument

사용자 지정 다중 레이블 분류 프로젝트의 내보낸 문서를 나타냅니다.

TextAnalysisAuthoringExportedCustomMultiLabelClassificationProjectAssets

사용자 지정 다중 레이블 분류 프로젝트에 대해 내보낸 자산을 나타냅니다.

TextAnalysisAuthoringExportedCustomSingleLabelClassificationDocument

사용자 지정 단일 레이블 분류 프로젝트에 대해 내보낸 문서를 나타냅니다.

TextAnalysisAuthoringExportedCustomSingleLabelClassificationProjectAssets

단일 레이블 분류 프로젝트에 대해 내보낸 자산을 나타냅니다.

TextAnalysisAuthoringExportedDocumentClass

문서의 분류 레이블을 나타냅니다.

TextAnalysisAuthoringExportedDocumentEntityLabel

문서의 엔터티 레이블을 나타냅니다.

TextAnalysisAuthoringExportedDocumentEntityRegion

엔터티 레이블 지정을 위해 문서의 영역을 나타냅니다.

TextAnalysisAuthoringExportedEntity

내보낸 프로젝트의 엔터티를 나타냅니다.

CreateProjectOptions

프로젝트를 만들거나 업데이트하는 데 사용되는 옵션을 나타냅니다.

Name 형식 Description
description

string

프로젝트 설명입니다.

language

string

프로젝트 언어입니다. 이는 언어의 BCP-47 표현입니다. 예를 들어 영어에 "en", 영어(영국)의 경우 "en-gb", 스페인어의 경우 "es"를 사용합니다.

multilingual

boolean

프로젝트를 여러 언어로 사용할지 여부입니다.

projectKind

ProjectKind

프로젝트 종류입니다.

projectName

string

새 프로젝트 이름입니다.

settings

ProjectSettings

프로젝트 설정입니다.

storageInputContainerName

string

스토리지 컨테이너 이름입니다.

Error

오류 개체입니다.

Name 형식 Description
code

ErrorCode

서버에서 정의한 오류 코드 집합 중 하나입니다.

details

Error[]

이 보고된 오류로 이어진 특정 오류에 대한 세부 정보 배열입니다.

innererror

InnerErrorModel

오류에 대한 현재 개체보다 더 구체적인 정보를 포함하는 개체입니다.

message

string

사람이 읽을 수 있는 오류 표현입니다.

target

string

오류의 대상입니다.

ErrorCode

사람이 읽을 수 있는 오류 코드입니다.

Name 형식 Description
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

오류 응답입니다.

Name 형식 Description
error

Error

오류 개체입니다.

ExportedProject

내보낸 프로젝트를 나타냅니다.

Name 형식 Description
assets ExportedProjectAssets:

프로젝트 자산을 나타냅니다.

metadata

CreateProjectOptions

프로젝트 메타데이터를 나타냅니다.

projectFileVersion

string

내보낸 파일의 버전입니다.

stringIndexType

StringIndexType

문자열 오프셋을 해석하는 데 사용되는 메서드를 지정합니다. 자세한 내용은 https://aka.ms/text-analytics-offsets참조하세요.

InnerErrorCode

사람이 읽을 수 있는 오류 코드입니다.

Name 형식 Description
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.

Name 형식 Description
code

InnerErrorCode

서버에서 정의한 오류 코드 집합 중 하나입니다.

details

object

오류 세부 정보입니다.

innererror

InnerErrorModel

오류에 대한 현재 개체보다 더 구체적인 정보를 포함하는 개체입니다.

message

string

오류 메시지입니다.

target

string

오류 대상입니다.

ProjectKind

Name 형식 Description
CustomEntityRecognition

string

사용자 고유의 데이터를 사용하여 도메인 범주를 식별하는 추출 모델을 빌드합니다.

CustomMultiLabelClassification

string

사용자 고유의 데이터를 사용하여 텍스트를 분류하는 분류 모델을 빌드하는 경우 각 파일에는 하나 이상의 레이블이 있을 수 있습니다. 예를 들어 파일 1은 A, B 및 C로 분류되고 파일 2는 B 및 C로 분류됩니다.

CustomSingleLabelClassification

string

사용자 고유의 데이터를 사용하여 텍스트를 분류하는 분류 모델을 빌드하는 경우 각 파일에는 레이블이 하나만 있습니다. 예를 들어 파일 1은 A로 분류되고 파일 2는 B로 분류됩니다.

ProjectSettings

프로젝트 동작을 정의하는 데 사용되는 설정을 나타냅니다.

Name 형식 Description
confidenceThreshold

number

신뢰도가 가장 높은 클래스의 임계값으로, 예측이 자동으로 "없음"으로 변경됩니다. 임계값은 0에서 1 사이여야 합니다.

StringIndexType

Name 형식 Description
Utf16CodeUnit

string

오프셋 및 길이 값은 UTF-16 코드 단위에 해당합니다. 애플리케이션이 유니코드를 지원하는 언어(예: Java, JavaScript)로 작성된 경우 이 옵션을 사용합니다.

TextAnalysisAuthoringExportedClass

내보낸 프로젝트의 클래스를 나타냅니다.

Name 형식 Description
category

string

클래스 범주입니다.

TextAnalysisAuthoringExportedCustomEntityRecognitionDocument

사용자 지정 엔터티 인식 프로젝트에 대해 내보낸 문서를 나타냅니다.

Name 형식 Description
dataset

string

이 문서의 데이터 세트입니다. 허용되는 값은 '학습' 및 '테스트'입니다.

entities

TextAnalysisAuthoringExportedDocumentEntityRegion[]

문서에 속하는 엔터티 레이블 목록입니다.

language

string

문서 언어를 나타냅니다. 이는 언어의 BCP-47 표현입니다. 예를 들어 영어에 "en", 영어(영국)의 경우 "en-gb", 스페인어의 경우 "es"를 사용합니다.

location

string

스토리지에 있는 문서의 위치입니다.

TextAnalysisAuthoringExportedCustomEntityRecognitionProjectAssets

엔터티 인식 프로젝트에 대해 내보낸 자산을 나타냅니다.

Name 형식 Description
documents

TextAnalysisAuthoringExportedCustomEntityRecognitionDocument[]

프로젝트에 속하는 문서 목록입니다.

entities

TextAnalysisAuthoringExportedEntity[]

프로젝트에 속하는 엔터티 목록입니다.

projectKind string:

CustomEntityRecognition

TextAnalysisAuthoringExportedCustomMultiLabelClassificationDocument

사용자 지정 다중 레이블 분류 프로젝트의 내보낸 문서를 나타냅니다.

Name 형식 Description
classes

TextAnalysisAuthoringExportedDocumentClass[]

문서 클래스입니다.

dataset

string

이 문서의 데이터 세트입니다. 허용되는 값은 '학습' 및 '테스트'입니다.

language

string

문서 언어를 나타냅니다. 이는 언어의 BCP-47 표현입니다. 예를 들어 영어에 "en", 영어(영국)의 경우 "en-gb", 스페인어의 경우 "es"를 사용합니다.

location

string

스토리지에 있는 문서의 위치입니다.

TextAnalysisAuthoringExportedCustomMultiLabelClassificationProjectAssets

사용자 지정 다중 레이블 분류 프로젝트에 대해 내보낸 자산을 나타냅니다.

Name 형식 Description
classes

TextAnalysisAuthoringExportedClass[]

프로젝트의 클래스 목록입니다.

documents

TextAnalysisAuthoringExportedCustomMultiLabelClassificationDocument[]

프로젝트의 문서 목록입니다.

projectKind string:

CustomMultiLabelClassification

TextAnalysisAuthoringExportedCustomSingleLabelClassificationDocument

사용자 지정 단일 레이블 분류 프로젝트에 대해 내보낸 문서를 나타냅니다.

Name 형식 Description
class

TextAnalysisAuthoringExportedDocumentClass

문서의 클래스입니다.

dataset

string

이 문서의 데이터 세트입니다. 허용되는 값은 '학습' 및 '테스트'입니다.

language

string

문서 언어를 나타냅니다. 이는 언어의 BCP-47 표현입니다. 예를 들어 영어에 "en", 영어(영국)의 경우 "en-gb", 스페인어의 경우 "es"를 사용합니다.

location

string

스토리지에 있는 문서의 위치입니다.

TextAnalysisAuthoringExportedCustomSingleLabelClassificationProjectAssets

단일 레이블 분류 프로젝트에 대해 내보낸 자산을 나타냅니다.

Name 형식 Description
classes

TextAnalysisAuthoringExportedClass[]

이 프로젝트에 속하는 클래스 목록입니다.

documents

TextAnalysisAuthoringExportedCustomSingleLabelClassificationDocument[]

이 프로젝트에 속하는 문서 목록입니다.

projectKind string:

CustomSingleLabelClassification

TextAnalysisAuthoringExportedDocumentClass

문서의 분류 레이블을 나타냅니다.

Name 형식 Description
category

string

TextAnalysisAuthoringExportedDocumentEntityLabel

문서의 엔터티 레이블을 나타냅니다.

Name 형식 Description
category

string

엔터티 범주입니다.

length

integer

엔터티 텍스트의 길이입니다.

offset

integer

엔터티 텍스트의 시작 위치입니다.

TextAnalysisAuthoringExportedDocumentEntityRegion

엔터티 레이블 지정을 위해 문서의 영역을 나타냅니다.

Name 형식 Description
labels

TextAnalysisAuthoringExportedDocumentEntityLabel[]

이 지역에 속하는 엔터티 레이블 목록입니다.

regionLength

integer

영역 텍스트의 길이입니다.

regionOffset

integer

해당 지역의 시작 위치입니다.

TextAnalysisAuthoringExportedEntity

내보낸 프로젝트의 엔터티를 나타냅니다.

Name 형식 Description
category

string

엔터티 범주입니다.