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?stringIndexType=Utf16CodeUnit&api-version=2022-05-01
GET {Endpoint}/language/authoring/analyze-text/projects/{projectName}/models/{trainedModelLabel}/evaluation/result?stringIndexType=Utf16CodeUnit&top={top}&skip={skip}&maxpagesize={maxpagesize}&api-version=2022-05-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
Endpoint
|
path | True |
string |
Supported Cognitive Services endpoint (e.g., https://.api.cognitiveservices.azure.com). |
project
|
path | True |
string maxLength: 100 |
The name of the project to use. |
trained
|
path | True |
string |
The trained model label. |
api-version
|
query | True |
string |
Client API version. |
string
|
query | True |
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 resources to include in a single response. |
|
skip
|
query |
integer (int32) |
An offset into the collection of the first resource to be returned. |
|
top
|
query |
integer (int32) |
The maximum number of resources to return from the collection. |
Request Header
Name | Required | Type | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
A subscription key for a Language service resource. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
List of the evaluation results. |
|
Other Status Codes |
Error response. |
Security
Ocp-Apim-Subscription-Key
A subscription key for a Language service resource.
Type:
apiKey
In:
header
Examples
Successful Get Model Evaluation
Sample request
GET {Endpoint}/language/authoring/analyze-text/projects/LoanAgreements/models/model2/evaluation/result?stringIndexType=Utf16CodeUnit&maxpagesize=10&api-version=2022-05-01
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": "{Endpoint}/language/authoring/analyze-text/projects/LoanAgreements/models/model2/evaluation/result/?api-version=2022-05-01&top=2147483645&skip=2&maxpagesize=2"
}
Definitions
Name | Description |
---|---|
Error |
The error object. |
Error |
Human-readable error code. |
Error |
Error response. |
Inner |
Human-readable error code. |
Inner |
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. |
Project |
The project kind. |
String |
Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. |
Text |
Represents the document evaluation result for a custom entity recognition project. |
Text |
Represents the document evaluation result for a custom multi-label classification project. |
Text |
Represents the document evaluation result for a custom single-label classification project. |
Text |
Represents an evaluation result entity label. |
Text |
Represents the entity recognition evaluation result for a document. |
Text |
Represents the evaluation comparison between the expected and predicted entities of a document region. |
Text |
Represents the comparison between the expected and predicted classes that are result from the evaluation operation. |
Text |
Represents the comparison between the expected and predicted class that result from an evaluation operation. |
Text |
Represents a list of results for an evaluation operation. |
Error
The error object.
Name | Type | Description |
---|---|---|
code |
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 |
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.
Value | Description |
---|---|
AzureCognitiveSearchIndexLimitReached | |
AzureCognitiveSearchIndexNotFound | |
AzureCognitiveSearchNotFound | |
AzureCognitiveSearchThrottling | |
Conflict | |
Forbidden | |
InternalServerError | |
InvalidArgument | |
InvalidRequest | |
NotFound | |
OperationNotFound | |
ProjectNotFound | |
QuotaExceeded | |
ServiceUnavailable | |
Timeout | |
TooManyRequests | |
Unauthorized | |
Warning |
ErrorResponse
Error response.
Name | Type | Description |
---|---|---|
error |
The error object. |
InnerErrorCode
Human-readable error code.
Value | Description |
---|---|
AzureCognitiveSearchNotFound | |
AzureCognitiveSearchThrottling | |
EmptyRequest | |
ExtractionFailure | |
InvalidCountryHint | |
InvalidDocument | |
InvalidDocumentBatch | |
InvalidParameterValue | |
InvalidRequest | |
InvalidRequestBodyFormat | |
KnowledgeBaseNotFound | |
MissingInputDocuments | |
ModelVersionIncorrect | |
UnsupportedLanguageCode |
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 |
One of a server-defined set of error codes. |
|
details |
object |
Error details. |
innererror |
An object containing more specific information than the current object about the error. |
|
message |
string |
Error message. |
target |
string |
Error target. |
ProjectKind
The project kind.
Value | Description |
---|---|
CustomEntityRecognition |
For building an extraction model to identify your domain categories using your own data. |
CustomMultiLabelClassification |
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 |
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
Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets.
Value | Description |
---|---|
Utf16CodeUnit |
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 |
Text |
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:
Custom |
Represents the project kind. |
TextAnalysisAuthoringCustomMultiLabelClassificationDocumentEvaluationResult
Represents the document evaluation result for a custom multi-label classification project.
Name | Type | Description |
---|---|---|
customMultiLabelClassificationResult |
Text |
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:
Custom |
Represents the project kind. |
TextAnalysisAuthoringCustomSingleLabelClassificationDocumentEvaluationResult
Represents the document evaluation result for a custom single-label classification project.
Name | Type | Description |
---|---|---|
customSingleLabelClassificationResult |
Text |
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:
Custom |
Represents the project kind. |
TextAnalysisAuthoringDocumentEntityLabelEvaluationResult
Represents an evaluation result entity label.
Name | Type | Description |
---|---|---|
category |
string |
Represents the entity category. |
length |
integer (int32) |
Represents the entity length. |
offset |
integer (int32) |
Represents the entity offset index relative to the original text. |
TextAnalysisAuthoringDocumentEntityRecognitionEvaluationResult
Represents the entity recognition evaluation result for a document.
Name | Type | Description |
---|---|---|
entities |
Represents the document labelled entities. |
TextAnalysisAuthoringDocumentEntityRegionEvaluationResult
Represents the evaluation comparison between the expected and predicted entities of a document region.
Name | Type | Description |
---|---|---|
expectedEntities |
Represents the region's expected entity labels. |
|
predictedEntities |
Represents the region's predicted entity labels. |
|
regionLength |
integer (int32) |
Represents the region length. |
regionOffset |
integer (int32) |
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. |
TextAnalysisAuthoringEvaluationResults
Represents a list of results for an evaluation operation.
Name | Type | Description |
---|---|---|
nextLink |
string |
The next page link. |
value | TextAnalysisAuthoringDocumentEvaluationResult[]: |
THe list of documents evaluation results. |