Text Analysis Runtime - Analyze Text
Request text analysis over a collection of documents.
Submit a collection of text documents for analysis. Specify a single unique task to be executed immediately.
POST {Endpoint}/language/:analyze-text?api-version=2022-05-01
POST {Endpoint}/language/:analyze-text?api-version=2022-05-01&showStats={showStats}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
Endpoint
|
path | True |
|
Supported Cognitive Services endpoint (e.g., https://.api.cognitiveservices.azure.com). |
api-version
|
query | True |
|
Client API version. |
show
|
query |
|
(Optional) if set to true, response will contain request and document level statistics. |
Request Header
Name | Required | Type | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
|
A subscription key for a Language service resource. |
Request Body
The request body can be one of the following:
AnalyzeTextEntityLinkingInput
Name | Required | Type | Description |
---|---|---|---|
kind | True |
string:
|
Enumeration of supported Text Analysis tasks. |
analysisInput | |||
parameters |
Supported parameters for an Entity Linking task. |
AnalyzeTextEntityRecognitionInput
Name | Required | Type | Description |
---|---|---|---|
kind | True |
string:
|
Enumeration of supported Text Analysis tasks. |
analysisInput | |||
parameters |
Supported parameters for an Entity Recognition task. |
AnalyzeTextKeyPhraseExtractionInput
Name | Required | Type | Description |
---|---|---|---|
kind | True |
string:
|
Enumeration of supported Text Analysis tasks. |
analysisInput | |||
parameters |
Supported parameters for a Key Phrase Extraction task. |
AnalyzeTextLanguageDetectionInput
Name | Required | Type | Description |
---|---|---|---|
kind | True |
string:
|
Enumeration of supported Text Analysis tasks. |
analysisInput | |||
parameters |
Supported parameters for a Language Detection task. |
AnalyzeTextPiiEntitiesRecognitionInput
Name | Required | Type | Description |
---|---|---|---|
kind | True |
string:
|
Enumeration of supported Text Analysis tasks. |
analysisInput | |||
parameters |
Supported parameters for a PII Entities Recognition task. |
AnalyzeTextSentimentAnalysisInput
Name | Required | Type | Description |
---|---|---|---|
kind | True |
string:
|
Enumeration of supported Text Analysis tasks. |
analysisInput | |||
parameters |
Supported parameters for a Sentiment Analysis task. |
Responses
Name | Type | Description |
---|---|---|
200 OK | AnalyzeTextTaskResult: |
A successful call result |
Other Status Codes |
Unexpected error |
Security
Ocp-Apim-Subscription-Key
A subscription key for a Language service resource.
Type:
apiKey
In:
header
Examples
Successful Entity Linking Request
Sample Request
POST {Endpoint}/language/:analyze-text?api-version=2022-05-01
{
"kind": "EntityLinking",
"parameters": {
"modelVersion": "latest"
},
"analysisInput": {
"documents": [
{
"id": "1",
"language": "en",
"text": "Microsoft was founded by Bill Gates and Paul Allen."
},
{
"id": "2",
"language": "en",
"text": "Pike place market is my favorite Seattle attraction."
}
]
}
}
Sample Response
{
"kind": "EntityLinkingResults",
"results": {
"documents": [
{
"entities": [
{
"dataSource": "Wikipedia",
"id": "Bill Gates",
"language": "en",
"matches": [
{
"confidenceScore": 0.52,
"length": 10,
"offset": 25,
"text": "Bill Gates"
}
],
"name": "Bill Gates",
"url": "https://en.wikipedia.org/wiki/Bill_Gates"
},
{
"dataSource": "Wikipedia",
"id": "Paul Allen",
"language": "en",
"matches": [
{
"confidenceScore": 0.54,
"length": 10,
"offset": 40,
"text": "Paul Allen"
}
],
"name": "Paul Allen",
"url": "https://en.wikipedia.org/wiki/Paul_Allen"
},
{
"dataSource": "Wikipedia",
"id": "Microsoft",
"language": "en",
"matches": [
{
"confidenceScore": 0.49,
"length": 9,
"offset": 0,
"text": "Microsoft"
}
],
"name": "Microsoft",
"url": "https://en.wikipedia.org/wiki/Microsoft"
}
],
"id": "1",
"warnings": []
},
{
"entities": [
{
"dataSource": "Wikipedia",
"id": "Pike Place Market",
"language": "en",
"matches": [
{
"confidenceScore": 0.86,
"length": 17,
"offset": 0,
"text": "Pike place market"
}
],
"name": "Pike Place Market",
"url": "https://en.wikipedia.org/wiki/Pike_Place_Market"
},
{
"dataSource": "Wikipedia",
"id": "Seattle",
"language": "en",
"matches": [
{
"confidenceScore": 0.27,
"length": 7,
"offset": 33,
"text": "Seattle"
}
],
"name": "Seattle",
"url": "https://en.wikipedia.org/wiki/Seattle"
}
],
"id": "2",
"warnings": []
}
],
"errors": [],
"modelVersion": "2020-02-01"
}
}
Successful Entity Recognition Request
Sample Request
POST {Endpoint}/language/:analyze-text?api-version=2022-05-01
{
"kind": "EntityRecognition",
"parameters": {
"modelVersion": "latest"
},
"analysisInput": {
"documents": [
{
"id": "1",
"language": "en",
"text": "Microsoft was founded by Bill Gates and Paul Allen."
},
{
"id": "2",
"language": "en",
"text": "Pike place market is my favorite Seattle attraction."
}
]
}
}
Sample Response
{
"kind": "EntityRecognitionResults",
"results": {
"documents": [
{
"entities": [
{
"category": "Organization",
"confidenceScore": 0.84,
"length": 9,
"offset": 0,
"text": "Microsoft"
},
{
"category": "Person",
"confidenceScore": 0.85,
"length": 10,
"offset": 25,
"text": "Bill Gates"
},
{
"category": "Person",
"confidenceScore": 0.9,
"length": 10,
"offset": 40,
"text": "Paul Allen"
}
],
"id": "1",
"warnings": []
},
{
"entities": [
{
"category": "Location",
"confidenceScore": 0.55,
"length": 7,
"offset": 33,
"subcategory": "GPE",
"text": "Seattle"
}
],
"id": "2",
"warnings": []
}
],
"errors": [],
"modelVersion": "2020-04-01"
}
}
Successful Key Phrase Extraction Request
Sample Request
POST {Endpoint}/language/:analyze-text?api-version=2022-05-01
{
"kind": "KeyPhraseExtraction",
"parameters": {
"modelVersion": "latest"
},
"analysisInput": {
"documents": [
{
"id": "1",
"language": "en",
"text": "Microsoft was founded by Bill Gates and Paul Allen."
},
{
"id": "2",
"language": "en",
"text": "Text Analytics is one of the Azure Cognitive Services."
},
{
"id": "3",
"language": "en",
"text": "My cat might need to see a veterinarian."
}
]
}
}
Sample Response
{
"kind": "KeyPhraseExtractionResults",
"results": {
"documents": [
{
"id": "1",
"keyPhrases": [
"Bill Gates",
"Paul Allen",
"Microsoft"
],
"warnings": []
},
{
"id": "2",
"keyPhrases": [
"Azure Cognitive Services",
"Text Analytics"
],
"warnings": []
},
{
"id": "3",
"keyPhrases": [
"cat",
"veterinarian"
],
"warnings": []
}
],
"errors": [],
"modelVersion": "2019-10-01"
}
}
Successful Language Detection Request
Sample Request
POST {Endpoint}/language/:analyze-text?api-version=2022-05-01
{
"kind": "LanguageDetection",
"parameters": {
"modelVersion": "latest"
},
"analysisInput": {
"documents": [
{
"id": "1",
"text": "Hello world"
},
{
"id": "2",
"text": "Bonjour tout le monde"
},
{
"id": "3",
"text": "Hola mundo"
}
]
}
}
Sample Response
{
"kind": "LanguageDetectionResults",
"results": {
"documents": [
{
"detectedLanguage": {
"confidenceScore": 1,
"iso6391Name": "en",
"name": "English"
},
"id": "1",
"warnings": []
},
{
"detectedLanguage": {
"confidenceScore": 1,
"iso6391Name": "fr",
"name": "French"
},
"id": "2",
"warnings": []
},
{
"detectedLanguage": {
"confidenceScore": 1,
"iso6391Name": "es",
"name": "Spanish"
},
"id": "3",
"warnings": []
}
],
"errors": [],
"modelVersion": "2020-04-01"
}
}
Successful PII Entity Recognition Request
Sample Request
POST {Endpoint}/language/:analyze-text?api-version=2022-05-01
{
"kind": "PiiEntityRecognition",
"parameters": {
"modelVersion": "latest"
},
"analysisInput": {
"documents": [
{
"id": "1",
"language": "en",
"text": "My SSN is 859-98-0987"
},
{
"id": "2",
"language": "en",
"text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check."
},
{
"id": "3",
"language": "en",
"text": "Is 998.214.865-68 your Brazilian CPF number?"
}
]
}
}
Sample Response
{
"kind": "PiiEntityRecognitionResults",
"results": {
"documents": [
{
"id": "1",
"redactedText": "My SSN is ***********",
"entities": [
{
"category": "U.S. Social Security Number (SSN)",
"confidenceScore": 0.65,
"length": 11,
"offset": 28,
"text": "859-98-0987"
}
],
"warnings": []
},
{
"id": "2",
"redactedText": "Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.",
"entities": [
{
"category": "ABA Routing Number",
"confidenceScore": 0.75,
"length": 9,
"offset": 18,
"text": "111000025"
}
],
"warnings": []
},
{
"id": "3",
"redactedText": "Is ************** your Brazilian CPF number?",
"entities": [
{
"category": "Brazil CPF Number",
"confidenceScore": 0.85,
"length": 14,
"offset": 3,
"text": "998.214.865-68"
}
],
"warnings": []
}
],
"errors": [],
"modelVersion": "2019-10-01"
}
}
Successful Sentiment Analysis Request
Sample Request
POST {Endpoint}/language/:analyze-text?api-version=2022-05-01
{
"kind": "SentimentAnalysis",
"parameters": {
"modelVersion": "latest"
},
"analysisInput": {
"documents": [
{
"id": "1",
"language": "en",
"text": "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful."
}
]
}
}
Sample Response
{
"kind": "SentimentAnalysisResults",
"results": {
"documents": [
{
"confidenceScores": {
"negative": 0,
"neutral": 0,
"positive": 1
},
"id": "1",
"sentences": [
{
"targets": [
{
"confidenceScores": {
"negative": 0,
"positive": 1
},
"length": 10,
"offset": 6,
"relations": [
{
"ref": "#/documents/0/sentences/0/assessments/0",
"relationType": "assessment"
}
],
"sentiment": "positive",
"text": "atmosphere"
}
],
"confidenceScores": {
"negative": 0,
"neutral": 0,
"positive": 1
},
"length": 17,
"offset": 0,
"assessments": [
{
"confidenceScores": {
"negative": 0,
"positive": 1
},
"isNegated": false,
"length": 5,
"offset": 0,
"sentiment": "positive",
"text": "great"
}
],
"sentiment": "positive",
"text": "Great atmosphere."
},
{
"targets": [
{
"confidenceScores": {
"negative": 0.01,
"positive": 0.99
},
"length": 11,
"offset": 37,
"relations": [
{
"ref": "#/documents/0/sentences/1/assessments/0",
"relationType": "assessment"
}
],
"sentiment": "positive",
"text": "restaurants"
},
{
"confidenceScores": {
"negative": 0.01,
"positive": 0.99
},
"length": 6,
"offset": 50,
"relations": [
{
"ref": "#/documents/0/sentences/1/assessments/0",
"relationType": "assessment"
}
],
"sentiment": "positive",
"text": "hotels"
}
],
"confidenceScores": {
"negative": 0.01,
"neutral": 0.86,
"positive": 0.13
},
"length": 52,
"offset": 18,
"assessments": [
{
"confidenceScores": {
"negative": 0.01,
"positive": 0.99
},
"isNegated": false,
"length": 15,
"offset": 18,
"sentiment": "positive",
"text": "Close to plenty"
}
],
"sentiment": "neutral",
"text": "Close to plenty of restaurants, hotels, and transit!"
}
],
"sentiment": "positive",
"warnings": []
}
],
"errors": [],
"modelVersion": "2020-04-01"
}
}
Definitions
Analyze |
|
Analyze |
|
Analyze |
|
Analyze |
|
Analyze |
|
Analyze |
|
Analyze |
Enumeration of supported Text Analysis tasks. |
Analyze |
Enumeration of supported Text Analysis task results. |
Detected |
|
Document |
|
Documents |
Response by document |
Document |
if showStats=true was specified in the request this field will contain information about the document payload. |
Document |
|
Entities |
|
Entities |
Supported parameters for an Entity Recognition task. |
Entities |
|
Entity | |
Entity |
|
Entity |
Supported parameters for an Entity Linking task. |
Entity |
|
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. |
Key |
|
Key |
Supported parameters for a Key Phrase Extraction task. |
Key |
|
Language |
|
Language |
|
Language |
|
Language |
Supported parameters for a Language Detection task. |
Language |
|
Language |
|
Multi |
|
Multi |
Contains an input document to be analyzed by the service. |
Pii |
The PII domain used for PII Entity Recognition. |
Pii |
|
Pii |
Supported parameters for a PII Entities Recognition task. |
Pii |
|
Request |
if showStats=true was specified in the request this field will contain information about the request payload. |
Sentiment |
Supported parameters for a Sentiment Analysis task. |
Sentiment |
|
Sentiment |
|
String |
Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. |
Warning |
Error code. |
AnalyzeTextEntityLinkingInput
Name | Type | Description |
---|---|---|
analysisInput | ||
kind |
string:
|
Enumeration of supported Text Analysis tasks. |
parameters |
Supported parameters for an Entity Linking task. |
AnalyzeTextEntityRecognitionInput
Name | Type | Description |
---|---|---|
analysisInput | ||
kind |
string:
|
Enumeration of supported Text Analysis tasks. |
parameters |
Supported parameters for an Entity Recognition task. |
AnalyzeTextKeyPhraseExtractionInput
Name | Type | Description |
---|---|---|
analysisInput | ||
kind |
string:
|
Enumeration of supported Text Analysis tasks. |
parameters |
Supported parameters for a Key Phrase Extraction task. |
AnalyzeTextLanguageDetectionInput
Name | Type | Description |
---|---|---|
analysisInput | ||
kind |
string:
|
Enumeration of supported Text Analysis tasks. |
parameters |
Supported parameters for a Language Detection task. |
AnalyzeTextPiiEntitiesRecognitionInput
Name | Type | Description |
---|---|---|
analysisInput | ||
kind |
string:
|
Enumeration of supported Text Analysis tasks. |
parameters |
Supported parameters for a PII Entities Recognition task. |
AnalyzeTextSentimentAnalysisInput
Name | Type | Description |
---|---|---|
analysisInput | ||
kind |
string:
|
Enumeration of supported Text Analysis tasks. |
parameters |
Supported parameters for a Sentiment Analysis task. |
AnalyzeTextTaskKind
Enumeration of supported Text Analysis tasks.
Name | Type | Description |
---|---|---|
EntityLinking |
|
|
EntityRecognition |
|
|
KeyPhraseExtraction |
|
|
LanguageDetection |
|
|
PiiEntityRecognition |
|
|
SentimentAnalysis |
|
AnalyzeTextTaskResultsKind
Enumeration of supported Text Analysis task results.
Name | Type | Description |
---|---|---|
EntityLinkingResults |
|
|
EntityRecognitionResults |
|
|
KeyPhraseExtractionResults |
|
|
LanguageDetectionResults |
|
|
PiiEntityRecognitionResults |
|
|
SentimentAnalysisResults |
|
DetectedLanguage
Name | Type | Description |
---|---|---|
confidenceScore |
|
A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. |
iso6391Name |
|
A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr). |
name |
|
Long name of a detected language (e.g. English, French). |
DocumentError
Name | Type | Description |
---|---|---|
error |
Document Error. |
|
id |
|
Document Id. |
Documents
Response by document
Name | Type | Description |
---|---|---|
entities |
|
Recognized entities in the document. |
id |
|
Unique, non-empty document identifier. |
statistics |
if showStats=true was specified in the request this field will contain information about the document payload. |
|
warnings |
Warnings encountered while processing document. |
DocumentStatistics
if showStats=true was specified in the request this field will contain information about the document payload.
Name | Type | Description |
---|---|---|
charactersCount |
|
Number of text elements recognized in the document. |
transactionsCount |
|
Number of transactions for the document. |
DocumentWarning
Name | Type | Description |
---|---|---|
code |
Error code. |
|
message |
|
Warning message. |
targetRef |
|
A JSON pointer reference indicating the target object. |
EntitiesResult
Name | Type | Description |
---|---|---|
documents |
Response by document |
|
errors |
Errors by document id. |
|
modelVersion |
|
This field indicates which model is used for scoring. |
statistics |
if showStats=true was specified in the request this field will contain information about the request payload. |
EntitiesTaskParameters
Supported parameters for an Entity Recognition task.
Name | Type | Default Value | Description |
---|---|---|---|
loggingOptOut |
|
False | |
modelVersion |
|
latest | |
stringIndexType | TextElements_v8 |
Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. |
EntitiesTaskResult
Name | Type | Description |
---|---|---|
kind |
string:
|
Enumeration of supported Text Analysis task results. |
results |
Entity
Name | Type | Description |
---|---|---|
category |
|
Entity type. |
confidenceScore |
|
Confidence score between 0 and 1 of the extracted entity. |
length |
|
Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. |
offset |
|
Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. |
subcategory |
|
(Optional) Entity sub type. |
text |
|
Entity text as appears in the request. |
EntityLinkingResult
Name | Type | Description |
---|---|---|
documents |
Response by document |
|
errors |
Errors by document id. |
|
modelVersion |
|
This field indicates which model is used for scoring. |
statistics |
if showStats=true was specified in the request this field will contain information about the request payload. |
EntityLinkingTaskParameters
Supported parameters for an Entity Linking task.
Name | Type | Default Value | Description |
---|---|---|---|
loggingOptOut |
|
False | |
modelVersion |
|
latest | |
stringIndexType | TextElements_v8 |
Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. |
EntityLinkingTaskResult
Name | Type | Description |
---|---|---|
kind |
string:
|
Enumeration of supported Text Analysis task results. |
results |
Error
The error object.
Name | Type | Description |
---|---|---|
code |
One of a server-defined set of error codes. |
|
details |
|
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 |
|
A human-readable representation of the error. |
target |
|
The target of the error. |
ErrorCode
Human-readable error code.
Name | Type | 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.
Name | Type | 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 |
|
Error details. |
innererror |
An object containing more specific information than the current object about the error. |
|
message |
|
Error message. |
target |
|
Error target. |
KeyPhraseResult
Name | Type | Description |
---|---|---|
documents |
Response by document |
|
errors |
Errors by document id. |
|
modelVersion |
|
This field indicates which model is used for scoring. |
statistics |
if showStats=true was specified in the request this field will contain information about the request payload. |
KeyPhraseTaskParameters
Supported parameters for a Key Phrase Extraction task.
Name | Type | Default Value | Description |
---|---|---|---|
loggingOptOut |
|
False | |
modelVersion |
|
latest |
KeyPhraseTaskResult
Name | Type | Description |
---|---|---|
kind |
string:
|
Enumeration of supported Text Analysis task results. |
results |
LanguageDetectionAnalysisInput
Name | Type | Description |
---|---|---|
documents |
LanguageDetectionDocumentResult
Name | Type | Description |
---|---|---|
detectedLanguage |
Detected Language. |
|
id |
|
Unique, non-empty document identifier. |
statistics |
if showStats=true was specified in the request this field will contain information about the document payload. |
|
warnings |
Warnings encountered while processing document. |
LanguageDetectionResult
Name | Type | Description |
---|---|---|
documents |
Response by document |
|
errors |
Errors by document id. |
|
modelVersion |
|
This field indicates which model is used for scoring. |
statistics |
if showStats=true was specified in the request this field will contain information about the request payload. |
LanguageDetectionTaskParameters
Supported parameters for a Language Detection task.
Name | Type | Default Value | Description |
---|---|---|---|
loggingOptOut |
|
False | |
modelVersion |
|
latest |
LanguageDetectionTaskResult
Name | Type | Description |
---|---|---|
kind |
string:
|
Enumeration of supported Text Analysis task results. |
results |
LanguageInput
Name | Type | Description |
---|---|---|
countryHint |
|
|
id |
|
Unique, non-empty document identifier. |
text |
|
MultiLanguageAnalysisInput
Name | Type | Description |
---|---|---|
documents |
Contains an input document to be analyzed by the service. |
MultiLanguageInput
Contains an input document to be analyzed by the service.
Name | Type | Description |
---|---|---|
id |
|
A unique, non-empty document identifier. |
language |
|
(Optional) This is the 2 letter ISO 639-1 representation of a language. For example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as default. |
text |
|
The input text to process. |
PiiDomain
The PII domain used for PII Entity Recognition.
Name | Type | Description |
---|---|---|
none |
|
Indicates that no domain is specified. |
phi |
|
Indicates that entities in the Personal Health Information domain should be redacted. |
PiiResult
Name | Type | Description |
---|---|---|
documents |
Response by document |
|
errors |
Errors by document id. |
|
modelVersion |
|
This field indicates which model is used for scoring. |
statistics |
if showStats=true was specified in the request this field will contain information about the request payload. |
PiiTaskParameters
Supported parameters for a PII Entities Recognition task.
Name | Type | Default Value | Description |
---|---|---|---|
domain | none |
The PII domain used for PII Entity Recognition. |
|
loggingOptOut |
|
False | |
modelVersion |
|
latest | |
piiCategories |
|
(Optional) describes the PII categories to return |
|
stringIndexType | TextElements_v8 |
Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. |
PiiTaskResult
Name | Type | Description |
---|---|---|
kind |
string:
|
Enumeration of supported Text Analysis task results. |
results |
RequestStatistics
if showStats=true was specified in the request this field will contain information about the request payload.
Name | Type | Description |
---|---|---|
documentsCount |
|
Number of documents submitted in the request. |
erroneousDocumentsCount |
|
Number of invalid documents. This includes empty, over-size limit or non-supported languages documents. |
transactionsCount |
|
Number of transactions for the request. |
validDocumentsCount |
|
Number of valid documents. This excludes empty, over-size limit or non-supported languages documents. |
SentimentAnalysisTaskParameters
Supported parameters for a Sentiment Analysis task.
Name | Type | Default Value | Description |
---|---|---|---|
loggingOptOut |
|
False | |
modelVersion |
|
latest | |
opinionMining |
|
False | |
stringIndexType | TextElements_v8 |
Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. |
SentimentResponse
Name | Type | Description |
---|---|---|
documents |
Sentiment analysis per document. |
|
errors |
Errors by document id. |
|
modelVersion |
|
This field indicates which model is used for scoring. |
statistics |
if showStats=true was specified in the request this field will contain information about the request payload. |
SentimentTaskResult
Name | Type | Description |
---|---|---|
kind |
string:
|
Enumeration of supported Text Analysis task results. |
results |
StringIndexType
Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets.
Name | Type | Description |
---|---|---|
TextElements_v8 |
|
Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo. |
UnicodeCodePoint |
|
Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python. |
Utf16CodeUnit |
|
Returned 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. |
WarningCodeValue
Error code.
Name | Type | Description |
---|---|---|
DocumentTruncated |
|
|
LongWordsInDocument |
|