Text Analysis Authoring - Get Model Evaluation Results

Gets the detailed results of the evaluation for a trained model. This includes the raw inference results for the data included in the evaluation process.

GET {Endpoint}/language/authoring/analyze-text/projects/{projectName}/models/{trainedModelLabel}/evaluation/result?api-version=2023-04-01&stringIndexType=Utf16CodeUnit
GET {Endpoint}/language/authoring/analyze-text/projects/{projectName}/models/{trainedModelLabel}/evaluation/result?api-version=2023-04-01&top={top}&skip={skip}&maxpagesize={maxpagesize}&stringIndexType=Utf16CodeUnit

URI Parameters

Name In Required Type Description
Endpoint
path True

string

url

Supported Cognitive Services endpoint (e.g., https://.api.cognitiveservices.azure.com).

projectName
path True

string

The new project name.

trainedModelLabel
path True

string

The trained model label.

api-version
query True

string

The API version to use for this operation.

stringIndexType
query True

StringIndexType

Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets.

maxpagesize
query

integer

int32

The maximum number of result items per page.

skip
query

integer

int32

The number of result items to skip.

top
query

integer

int32

The number of result items to return.

Responses

Name Type Description
200 OK

PagedTextAnalysisAuthoringDocumentEvaluationResult

The request has succeeded.

Other Status Codes

ErrorResponse

An unexpected error response.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

OAuth2Auth

Type: oauth2
Flow: accessCode
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize
Token URL: https://login.microsoftonline.com/common/oauth2/token

Scopes

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

Examples

SuccessfulGetModelEvaluation

Sample request

GET {Endpoint}/language/authoring/analyze-text/projects/LoanAgreements/models/model2/evaluation/result?api-version=2023-04-01&maxpagesize=10&stringIndexType=Utf16CodeUnit

Sample response

{
  "value": [
    {
      "location": "11.txt",
      "language": "en-us",
      "projectKind": "CustomEntityRecognition",
      "customEntityRecognitionResult": {
        "entities": [
          {
            "expectedEntities": [
              {
                "category": "Date",
                "offset": 5,
                "length": 9
              },
              {
                "category": "BorrowerName",
                "offset": 160,
                "length": 13
              },
              {
                "category": "BorrowerAddress",
                "offset": 181,
                "length": 34
              },
              {
                "category": "BorrowerCity",
                "offset": 225,
                "length": 6
              },
              {
                "category": "BorrowerState",
                "offset": 242,
                "length": 8
              },
              {
                "category": "LenderName",
                "offset": 271,
                "length": 12
              },
              {
                "category": "LenderAddress",
                "offset": 310,
                "length": 20
              },
              {
                "category": "LenderCity",
                "offset": 340,
                "length": 8
              },
              {
                "category": "LenderState",
                "offset": 359,
                "length": 11
              },
              {
                "category": "LoanAmountWords",
                "offset": 448,
                "length": 52
              },
              {
                "category": "LoanAmountNumbers",
                "offset": 502,
                "length": 10
              },
              {
                "category": "Interest",
                "offset": 588,
                "length": 2
              }
            ],
            "predictedEntities": [
              {
                "category": "Date",
                "offset": 5,
                "length": 9
              },
              {
                "category": "BorrowerName",
                "offset": 160,
                "length": 13
              },
              {
                "category": "BorrowerAddress",
                "offset": 200,
                "length": 15
              },
              {
                "category": "BorrowerCity",
                "offset": 225,
                "length": 6
              },
              {
                "category": "BorrowerState",
                "offset": 242,
                "length": 8
              },
              {
                "category": "LenderName",
                "offset": 271,
                "length": 12
              },
              {
                "category": "LenderAddress",
                "offset": 310,
                "length": 20
              },
              {
                "category": "LenderCity",
                "offset": 340,
                "length": 8
              },
              {
                "category": "LenderState",
                "offset": 359,
                "length": 11
              },
              {
                "category": "LoanAmountWords",
                "offset": 448,
                "length": 52
              },
              {
                "category": "LoanAmountNumbers",
                "offset": 502,
                "length": 10
              },
              {
                "category": "Interest",
                "offset": 588,
                "length": 2
              }
            ],
            "regionOffset": 0,
            "regionLength": 1780
          }
        ]
      }
    },
    {
      "location": "01.txt",
      "language": "en-us",
      "projectKind": "CustomEntityRecognition",
      "customEntityRecognitionResult": {
        "entities": [
          {
            "expectedEntities": [
              {
                "category": "Date",
                "offset": 5,
                "length": 9
              },
              {
                "category": "BorrowerName",
                "offset": 160,
                "length": 13
              },
              {
                "category": "BorrowerAddress",
                "offset": 200,
                "length": 13
              },
              {
                "category": "BorrowerCity",
                "offset": 223,
                "length": 9
              },
              {
                "category": "BorrowerState",
                "offset": 243,
                "length": 8
              },
              {
                "category": "LenderName",
                "offset": 273,
                "length": 14
              },
              {
                "category": "LenderAddress",
                "offset": 314,
                "length": 15
              },
              {
                "category": "LenderCity",
                "offset": 339,
                "length": 10
              },
              {
                "category": "LenderState",
                "offset": 360,
                "length": 8
              },
              {
                "category": "LoanAmountWords",
                "offset": 446,
                "length": 66
              },
              {
                "category": "LoanAmountNumbers",
                "offset": 514,
                "length": 11
              },
              {
                "category": "Interest",
                "offset": 601,
                "length": 2
              }
            ],
            "predictedEntities": [
              {
                "category": "Date",
                "offset": 5,
                "length": 9
              },
              {
                "category": "BorrowerName",
                "offset": 160,
                "length": 13
              },
              {
                "category": "BorrowerAddress",
                "offset": 200,
                "length": 13
              },
              {
                "category": "BorrowerCity",
                "offset": 223,
                "length": 9
              },
              {
                "category": "BorrowerState",
                "offset": 243,
                "length": 8
              },
              {
                "category": "LenderName",
                "offset": 273,
                "length": 14
              },
              {
                "category": "LenderAddress",
                "offset": 314,
                "length": 15
              },
              {
                "category": "LenderCity",
                "offset": 339,
                "length": 10
              },
              {
                "category": "LenderState",
                "offset": 360,
                "length": 8
              },
              {
                "category": "LoanAmountWords",
                "offset": 446,
                "length": 66
              },
              {
                "category": "LoanAmountNumbers",
                "offset": 514,
                "length": 11
              },
              {
                "category": "Interest",
                "offset": 601,
                "length": 2
              }
            ],
            "regionOffset": 0,
            "regionLength": 1793
          }
        ]
      }
    }
  ],
  "nextLink": "https://api.example.com/language/authoring/analyze-text/projects/LoanAgreements/models/model2/evaluation/result/?api-version=2023-04-15-preview&top=2147483645&skip=100&maxpagesize=100"
}

Definitions

Name Description
Error

The error object.

ErrorCode

Human-readable error code.

ErrorResponse

Error response.

InnerErrorCode

Human-readable error code.

InnerErrorModel

An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.

PagedTextAnalysisAuthoringDocumentEvaluationResult

Paged collection of TextAnalysisAuthoringDocumentEvaluationResult items

ProjectKind
StringIndexType
TextAnalysisAuthoringCustomEntityRecognitionDocumentEvaluationResult

Represents the document evaluation result for a custom entity recognition project.

TextAnalysisAuthoringCustomMultiLabelClassificationDocumentEvaluationResult

Represents the document evaluation result for a custom multi-label classification project.

TextAnalysisAuthoringCustomSingleLabelClassificationDocumentEvaluationResult

Represents the document evaluation result for a custom single-label classification project.

TextAnalysisAuthoringDocumentEntityLabelEvaluationResult

Represents an evaluation result entity label.

TextAnalysisAuthoringDocumentEntityRecognitionEvaluationResult

Represents the entity recognition evaluation result for a document.

TextAnalysisAuthoringDocumentEntityRegionEvaluationResult

Represents the evaluation comparison between the expected and predicted entities of a document region.

TextAnalysisAuthoringDocumentMultiLabelClassificationEvaluationResult

Represents the comparison between the expected and predicted classes that are result from the evaluation operation.

TextAnalysisAuthoringDocumentSingleLabelClassificationEvaluationResult

Represents the comparison between the expected and predicted class that result from an evaluation operation.

Error

The error object.

Name Type Description
code

ErrorCode

One of a server-defined set of error codes.

details

Error[]

An array of details about specific errors that led to this reported error.

innererror

InnerErrorModel

An object containing more specific information than the current object about the error.

message

string

A human-readable representation of the error.

target

string

The target of the error.

ErrorCode

Human-readable error code.

Name Type 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

Error response.

Name Type Description
error

Error

The error object.

InnerErrorCode

Human-readable error code.

Name Type 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

An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.

Name Type Description
code

InnerErrorCode

One of a server-defined set of error codes.

details

object

Error details.

innererror

InnerErrorModel

An object containing more specific information than the current object about the error.

message

string

Error message.

target

string

Error target.

PagedTextAnalysisAuthoringDocumentEvaluationResult

Paged collection of TextAnalysisAuthoringDocumentEvaluationResult items

Name Type Description
nextLink

string

The link to the next page of items

value TextAnalysisAuthoringDocumentEvaluationResult[]:

The TextAnalysisAuthoringDocumentEvaluationResult items on this page

ProjectKind

Name Type Description
CustomEntityRecognition

string

For building an extraction model to identify your domain categories using your own data.

CustomMultiLabelClassification

string

For building a classification model to classify text using your own data. Each file can have one or many labels. For example, file 1 is classified as A, B, and C and file 2 is classified as B and C.

CustomSingleLabelClassification

string

For building a classification model to classify text using your own data. Each file will have only one label. For example, file 1 is classified as A and file 2 is classified as B.

StringIndexType

Name Type Description
Utf16CodeUnit

string

The offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript.

TextAnalysisAuthoringCustomEntityRecognitionDocumentEvaluationResult

Represents the document evaluation result for a custom entity recognition project.

Name Type Description
customEntityRecognitionResult

TextAnalysisAuthoringDocumentEntityRecognitionEvaluationResult

Represents the evaluation prediction for entity recognition.

language

string

Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc.

location

string

Represents the document path.

projectKind string:

CustomEntityRecognition

Represents the project kind.

TextAnalysisAuthoringCustomMultiLabelClassificationDocumentEvaluationResult

Represents the document evaluation result for a custom multi-label classification project.

Name Type Description
customMultiLabelClassificationResult

TextAnalysisAuthoringDocumentMultiLabelClassificationEvaluationResult

Represents the evaluation prediction for multi label classification.

language

string

Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc.

location

string

Represents the document path.

projectKind string:

CustomMultiLabelClassification

Represents the project kind.

TextAnalysisAuthoringCustomSingleLabelClassificationDocumentEvaluationResult

Represents the document evaluation result for a custom single-label classification project.

Name Type Description
customSingleLabelClassificationResult

TextAnalysisAuthoringDocumentSingleLabelClassificationEvaluationResult

Represents the evaluation prediction for single label classification.

language

string

Represents the document language. This is BCP-47 representation of a language. For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish etc.

location

string

Represents the document path.

projectKind string:

CustomSingleLabelClassification

Represents the project kind.

TextAnalysisAuthoringDocumentEntityLabelEvaluationResult

Represents an evaluation result entity label.

Name Type Description
category

string

Represents the entity category.

length

integer

Represents the entity length.

offset

integer

Represents the entity offset index relative to the original text.

TextAnalysisAuthoringDocumentEntityRecognitionEvaluationResult

Represents the entity recognition evaluation result for a document.

Name Type Description
entities

TextAnalysisAuthoringDocumentEntityRegionEvaluationResult[]

Represents the document labelled entities.

TextAnalysisAuthoringDocumentEntityRegionEvaluationResult

Represents the evaluation comparison between the expected and predicted entities of a document region.

Name Type Description
expectedEntities

TextAnalysisAuthoringDocumentEntityLabelEvaluationResult[]

Represents the region's expected entity labels.

predictedEntities

TextAnalysisAuthoringDocumentEntityLabelEvaluationResult[]

Represents the region's predicted entity labels.

regionLength

integer

Represents the region length.

regionOffset

integer

Represents the region offset.

TextAnalysisAuthoringDocumentMultiLabelClassificationEvaluationResult

Represents the comparison between the expected and predicted classes that are result from the evaluation operation.

Name Type Description
expectedClasses

string[]

Represents the document's expected classes.

predictedClasses

string[]

Represents the document's predicted classes.

TextAnalysisAuthoringDocumentSingleLabelClassificationEvaluationResult

Represents the comparison between the expected and predicted class that result from an evaluation operation.

Name Type Description
expectedClass

string

Represents the document's expected class.

predictedClass

string

Represents the document's predicted class.