Text Analysis Runtime - Analyze Text

Request text analysis over a collection of documents.

POST {Endpoint}/language/:analyze-text?api-version=2024-11-01
POST {Endpoint}/language/:analyze-text?api-version=2024-11-01&showStats={showStats}

URI Parameters

Name In Required Type Description
Endpoint
path True

string

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

api-version
query True

string

The API version to use for this operation.

showStats
query

boolean

(Optional) if set to true, response will contain request and document level statistics.

Request Body

The request body can be one of the following:

Name Description
AnalyzeTextEntityLinkingInput

Contains the analyze text Entity linking input.

AnalyzeTextEntityRecognitionInput

The entity recognition analyze text input task request.

AnalyzeTextKeyPhraseExtractionInput

Contains the analyze text KeyPhraseExtraction task input.

AnalyzeTextLanguageDetectionInput

Contains the language detection document analysis task input.

AnalyzeTextPiiEntitiesRecognitionInput

Contains the analyze text PIIEntityRecognition task input.

AnalyzeTextSentimentAnalysisInput

Contains the analyze text SentimentAnalysis task input.

AnalyzeTextEntityLinkingInput

Contains the analyze text Entity linking input.

Name Required Type Description
kind True string:

EntityLinking

The kind of task to perform.

analysisInput

MultiLanguageAnalysisInput

Contains the analysis input to be handled by the service.

parameters

EntityLinkingTaskParameters

Task parameters.

AnalyzeTextEntityRecognitionInput

The entity recognition analyze text input task request.

Name Required Type Description
kind True string:

EntityRecognition

The kind of task to perform.

analysisInput

MultiLanguageAnalysisInput

The input to be analyzed.

parameters

EntitiesTaskParameters

Task parameters.

AnalyzeTextKeyPhraseExtractionInput

Contains the analyze text KeyPhraseExtraction task input.

Name Required Type Description
kind True string:

KeyPhraseExtraction

The kind of task to perform.

analysisInput

MultiLanguageAnalysisInput

Contains the input documents.

parameters

KeyPhraseTaskParameters

Key phrase extraction task parameters.

AnalyzeTextLanguageDetectionInput

Contains the language detection document analysis task input.

Name Required Type Description
kind True string:

LanguageDetection

The kind of task to perform.

analysisInput

LanguageDetectionAnalysisInput

Documents to be analyzed.

parameters

LanguageDetectionTaskParameters

task parameters.

AnalyzeTextPiiEntitiesRecognitionInput

Contains the analyze text PIIEntityRecognition task input.

Name Required Type Description
kind True string:

PiiEntityRecognition

The kind of task to perform.

analysisInput

MultiLanguageAnalysisInput

Contains the input documents.

parameters

PiiTaskParameters

Pii task parameters.

AnalyzeTextSentimentAnalysisInput

Contains the analyze text SentimentAnalysis task input.

Name Required Type Description
kind True string:

SentimentAnalysis

The kind of task to perform.

analysisInput

MultiLanguageAnalysisInput

Contains the input documents.

parameters

SentimentAnalysisTaskParameters

Sentiment Analysis task parameters.

Responses

Name Type Description
200 OK AnalyzeTextTaskResult:

The request has succeeded.

Other Status Codes

ErrorResponse

An unexpected error response.

Headers

x-ms-error-code: string

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

SuccessfulEntityLinkingRequest
SuccessfulEntityRecognitionExclusionRequest
SuccessfulEntityRecognitionInclusionRequest
SuccessfulEntityRecognitionInferenceOptionsRequest
SuccessfulEntityRecognitionOverlapPolicy
SuccessfulEntityRecognitionRequest
SuccessfulKeyPhraseExtractionRequest
SuccessfulLanguageDetectionRequest
SuccessfulPiiEntityRecognitionRequest
SuccessfulSentimentAnalysisRequest

SuccessfulEntityLinkingRequest

Sample request

POST {Endpoint}/language/:analyze-text?api-version=2024-11-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"
  }
}

SuccessfulEntityRecognitionExclusionRequest

Sample request

POST {Endpoint}/language/:analyze-text?api-version=2024-11-01

{
  "kind": "EntityRecognition",
  "parameters": {
    "modelVersion": "latest",
    "exclusionList": [
      "Numeric"
    ],
    "overlapPolicy": {
      "policyKind": "allowOverlap"
    }
  },
  "analysisInput": {
    "documents": [
      {
        "id": "2",
        "language": "en",
        "text": "When I was 5 years old I had $90.00 dollars to my name."
      },
      {
        "id": "3",
        "language": "en",
        "text": "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile."
      }
    ]
  }
}

Sample response

{
  "kind": "EntityRecognitionResults",
  "results": {
    "documents": [
      {
        "entities": [],
        "id": "2",
        "warnings": []
      },
      {
        "entities": [
          {
            "text": "LAX",
            "category": "Location",
            "type": "Airport",
            "offset": 18,
            "length": 3,
            "confidenceScore": 0.72,
            "tags": [
              {
                "name": "Location",
                "confidenceScore": 0.9
              },
              {
                "name": "Structural",
                "confidenceScore": 0.72
              }
            ]
          },
          {
            "text": "Amsterdam",
            "category": "Location",
            "type": "City",
            "offset": 96,
            "length": 9,
            "confidenceScore": 0.8,
            "tags": [
              {
                "name": "Location",
                "confidenceScore": 0.84
              },
              {
                "name": "GPE",
                "confidenceScore": 0.84
              },
              {
                "name": "City",
                "confidenceScore": 0.8
              }
            ]
          },
          {
            "text": "Eiffel Tower",
            "category": "Location",
            "type": "Structural",
            "offset": 107,
            "length": 12,
            "confidenceScore": 0.9,
            "tags": [
              {
                "name": "Location",
                "confidenceScore": 0.9
              },
              {
                "name": "Structural",
                "confidenceScore": 0.9
              }
            ]
          },
          {
            "text": "Nile",
            "category": "Location",
            "type": "Geological",
            "offset": 129,
            "length": 4,
            "confidenceScore": 0.63,
            "tags": [
              {
                "name": "Location",
                "confidenceScore": 0.9
              },
              {
                "name": "Geological",
                "confidenceScore": 0.63
              }
            ]
          }
        ],
        "id": "3",
        "warnings": []
      }
    ],
    "errors": [],
    "modelVersion": "2021-06-01"
  }
}

SuccessfulEntityRecognitionInclusionRequest

Sample request

POST {Endpoint}/language/:analyze-text?api-version=2024-11-01

{
  "kind": "EntityRecognition",
  "parameters": {
    "modelVersion": "latest",
    "inclusionList": [
      "Location"
    ]
  },
  "analysisInput": {
    "documents": [
      {
        "id": "2",
        "language": "en",
        "text": "When I was 5 years old I had $90.00 dollars to my name."
      },
      {
        "id": "3",
        "language": "en",
        "text": "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile."
      }
    ]
  }
}

Sample response

{
  "kind": "EntityRecognitionResults",
  "results": {
    "documents": [
      {
        "entities": [],
        "id": "2",
        "warnings": []
      },
      {
        "entities": [
          {
            "text": "LAX",
            "category": "Location",
            "type": "Structural",
            "offset": 18,
            "length": 3,
            "confidenceScore": 0.72,
            "tags": [
              {
                "name": "Location",
                "confidenceScore": 0.9
              },
              {
                "name": "Structural",
                "confidenceScore": 0.72
              }
            ]
          },
          {
            "text": "Amsterdam",
            "category": "Location",
            "type": "City",
            "offset": 96,
            "length": 9,
            "confidenceScore": 0.8,
            "tags": [
              {
                "name": "Location",
                "confidenceScore": 0.84
              },
              {
                "name": "GPE",
                "confidenceScore": 0.84
              },
              {
                "name": "City",
                "confidenceScore": 0.8
              }
            ]
          },
          {
            "text": "Eiffel Tower",
            "category": "Location",
            "type": "Structural",
            "offset": 107,
            "length": 12,
            "confidenceScore": 0.9,
            "tags": [
              {
                "name": "Location",
                "confidenceScore": 0.9
              },
              {
                "name": "Structural",
                "confidenceScore": 0.9
              }
            ]
          },
          {
            "text": "Nile",
            "category": "Location",
            "type": "Geological",
            "offset": 129,
            "length": 4,
            "confidenceScore": 0.63,
            "tags": [
              {
                "name": "Location",
                "confidenceScore": 0.9
              },
              {
                "name": "Geological",
                "confidenceScore": 0.63
              }
            ]
          }
        ],
        "id": "3",
        "warnings": []
      }
    ],
    "errors": [],
    "modelVersion": "2021-06-01"
  }
}

SuccessfulEntityRecognitionInferenceOptionsRequest

Sample request

POST {Endpoint}/language/:analyze-text?api-version=2024-11-01

{
  "kind": "EntityRecognition",
  "parameters": {
    "modelVersion": "latest",
    "inferenceOptions": {
      "excludeNormalizedValues": true
    }
  },
  "analysisInput": {
    "documents": [
      {
        "id": "1",
        "language": "en",
        "text": "When I was 5 years old I had $90.00 dollars to my name."
      }
    ]
  }
}

Sample response

{
  "kind": "EntityRecognitionResults",
  "results": {
    "documents": [
      {
        "entities": [
          {
            "text": "5 years old",
            "category": "Numeric",
            "type": "Age",
            "offset": 11,
            "length": 11,
            "confidenceScore": 0.99,
            "tags": [
              {
                "name": "Numeric",
                "confidenceScore": 0.99
              },
              {
                "name": "Age",
                "confidenceScore": 0.99
              }
            ]
          },
          {
            "text": "$90.00",
            "category": "Numeric",
            "type": "Currency",
            "offset": 29,
            "length": 14,
            "confidenceScore": 0.99,
            "tags": [
              {
                "name": "Numeric",
                "confidenceScore": 0.99
              },
              {
                "name": "Currency",
                "confidenceScore": 0.99
              }
            ]
          }
        ],
        "id": "1",
        "warnings": []
      }
    ],
    "errors": [],
    "modelVersion": "2023-09-01"
  }
}

SuccessfulEntityRecognitionOverlapPolicy

Sample request

POST {Endpoint}/language/:analyze-text?api-version=2024-11-01

{
  "kind": "EntityRecognition",
  "parameters": {
    "modelVersion": "latest",
    "overlapPolicy": {
      "policyKind": "matchLongest"
    }
  },
  "analysisInput": {
    "documents": [
      {
        "id": "4",
        "language": "en",
        "text": "25th April Meeting was an intresting one. At least we gont to experience the WorldCup"
      }
    ]
  }
}

Sample response

{
  "kind": "EntityRecognitionResults",
  "results": {
    "documents": [
      {
        "entities": [
          {
            "text": "25th April Meeting",
            "category": "Event",
            "type": "Event",
            "offset": 0,
            "length": 18,
            "confidenceScore": 0.59,
            "tags": [
              {
                "name": "Event",
                "confidenceScore": 0.59
              }
            ]
          },
          {
            "text": "Worldcup",
            "category": "Event",
            "type": "SportsEvent",
            "offset": 0,
            "length": 8,
            "confidenceScore": 0.51,
            "tags": [
              {
                "name": "Event",
                "confidenceScore": 0.55
              },
              {
                "name": "SportsEvent",
                "confidenceScore": 0.51
              }
            ]
          }
        ],
        "id": "4",
        "warnings": []
      }
    ],
    "errors": [],
    "modelVersion": "2021-06-01"
  }
}

SuccessfulEntityRecognitionRequest

Sample request

POST {Endpoint}/language/:analyze-text?api-version=2024-11-01

{
  "kind": "EntityRecognition",
  "parameters": {
    "modelVersion": "latest",
    "overlapPolicy": {
      "policyKind": "allowOverlap"
    }
  },
  "analysisInput": {
    "documents": [
      {
        "id": "2",
        "language": "en",
        "text": "When I was 5 years old I had $90.00 dollars to my name."
      },
      {
        "id": "3",
        "language": "en",
        "text": "When we flew from LAX it seemed like we were moving at 10 meters per second. I was lucky to see Amsterdam, Effile Tower, and the Nile."
      },
      {
        "id": "4",
        "language": "en",
        "text": "25th April Meeting was an intresting one. At least we gont to experience the WorldCup"
      },
      {
        "id": "5",
        "language": "en",
        "text": "My IP is 127.12.1.1 and my phone   number is 5555555555"
      }
    ]
  }
}

Sample response

{
  "kind": "EntityRecognitionResults",
  "results": {
    "documents": [
      {
        "entities": [
          {
            "text": "5 years old",
            "category": "Numeric",
            "type": "Age",
            "offset": 11,
            "length": 11,
            "confidenceScore": 0.99,
            "tags": [
              {
                "name": "Numeric",
                "confidenceScore": 0.99
              },
              {
                "name": "Age",
                "confidenceScore": 0.99
              }
            ],
            "metadata": {
              "metadataKind": "AgeMetadata",
              "unit": "Year",
              "value": 5
            }
          },
          {
            "text": "$90.00",
            "category": "Numeric",
            "type": "Currency",
            "offset": 29,
            "length": 14,
            "confidenceScore": 0.99,
            "tags": [
              {
                "name": "Numeric",
                "confidenceScore": 0.99
              },
              {
                "name": "Currency",
                "confidenceScore": 0.99
              }
            ],
            "metadata": {
              "metadataKind": "CurrencyMetadata",
              "unit": "Dollar",
              "iso4217": "USD",
              "value": 90
            }
          }
        ],
        "id": "2",
        "warnings": []
      },
      {
        "entities": [
          {
            "text": "LAX",
            "category": "Location",
            "type": "Structural",
            "offset": 18,
            "length": 3,
            "confidenceScore": 0.72,
            "tags": [
              {
                "name": "Location",
                "confidenceScore": 0.9
              },
              {
                "name": "Structural",
                "confidenceScore": 0.72
              }
            ]
          },
          {
            "text": "10 meters per second",
            "category": "Numeric",
            "type": "Speed",
            "offset": 55,
            "length": 20,
            "confidenceScore": 0.8,
            "tags": [
              {
                "name": "Dimension",
                "confidenceScore": 0.84
              },
              {
                "name": "Numeric",
                "confidenceScore": 0.84
              },
              {
                "name": "Speed",
                "confidenceScore": 0.8
              }
            ],
            "metadata": {
              "metadataKind": "SpeedMetadata",
              "unit": "MetersPerSecond",
              "value": 10
            }
          },
          {
            "text": "Amsterdam",
            "category": "Location",
            "type": "City",
            "offset": 96,
            "length": 9,
            "confidenceScore": 0.8,
            "tags": [
              {
                "name": "Location",
                "confidenceScore": 0.84
              },
              {
                "name": "GPE",
                "confidenceScore": 0.84
              },
              {
                "name": "City",
                "confidenceScore": 0.8
              }
            ]
          },
          {
            "text": "Eiffel Tower",
            "category": "Location",
            "type": "Structural",
            "offset": 107,
            "length": 12,
            "confidenceScore": 0.9,
            "tags": [
              {
                "name": "Location",
                "confidenceScore": 0.9
              },
              {
                "name": "Structural",
                "confidenceScore": 0.9
              }
            ]
          },
          {
            "text": "Nile",
            "category": "Location",
            "type": "Geological",
            "offset": 129,
            "length": 4,
            "confidenceScore": 0.63,
            "tags": [
              {
                "name": "Location",
                "confidenceScore": 0.9
              },
              {
                "name": "Geological",
                "confidenceScore": 0.63
              }
            ]
          }
        ],
        "id": "3",
        "warnings": []
      },
      {
        "entities": [
          {
            "text": "25th April",
            "category": "Temporal",
            "type": "Date",
            "offset": 0,
            "length": 10,
            "confidenceScore": 0.58,
            "tags": [
              {
                "name": "Temporal",
                "confidenceScore": 0.9
              },
              {
                "name": "Date",
                "confidenceScore": 0.58
              }
            ],
            "metadata": {
              "metadataKind": "DateMetadata",
              "dateValues": [
                {
                  "timex": "XXXX-04-25",
                  "value": "2022-04-25"
                },
                {
                  "timex": "XXXX-04-25",
                  "value": "2023-04-25"
                }
              ]
            }
          },
          {
            "text": "25th April Meeting",
            "category": "Event",
            "type": "Event",
            "offset": 0,
            "length": 18,
            "confidenceScore": 0.55,
            "tags": [
              {
                "name": "Event",
                "confidenceScore": 0.55
              }
            ]
          },
          {
            "text": "25th April Meeting",
            "category": "Event",
            "type": "CulturalEvent",
            "offset": 0,
            "length": 18,
            "confidenceScore": 0.55,
            "tags": [
              {
                "name": "Event",
                "confidenceScore": 0.55
              },
              {
                "name": "CulturalEvent",
                "confidenceScore": 0.55
              }
            ]
          },
          {
            "text": "Worldcup",
            "category": "Event",
            "type": "SportsEvent",
            "offset": 0,
            "length": 8,
            "confidenceScore": 0.51,
            "tags": [
              {
                "name": "Event",
                "confidenceScore": 0.55
              },
              {
                "name": "SportsEvent",
                "confidenceScore": 0.51
              }
            ]
          }
        ],
        "id": "4",
        "warnings": []
      },
      {
        "entities": [
          {
            "text": "127.12.1.1",
            "category": "IP",
            "type": "IP",
            "offset": 9,
            "length": 10,
            "confidenceScore": 0.8,
            "tags": [
              {
                "name": "IP",
                "confidenceScore": 0.8
              }
            ]
          },
          {
            "text": "5555555555",
            "category": "PhoneNumber",
            "type": "PhoneNumber",
            "offset": 45,
            "length": 9,
            "confidenceScore": 0.8,
            "tags": [
              {
                "name": "PhoneNumber",
                "confidenceScore": 0.8
              }
            ]
          }
        ],
        "id": "5",
        "warnings": []
      }
    ],
    "errors": [],
    "modelVersion": "2021-06-01"
  }
}

SuccessfulKeyPhraseExtractionRequest

Sample request

POST {Endpoint}/language/:analyze-text?api-version=2024-11-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": "2021-06-01"
  }
}

SuccessfulLanguageDetectionRequest

Sample request

POST {Endpoint}/language/:analyze-text?api-version=2024-11-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"
      },
      {
        "id": "4",
        "text": "Tumhara naam kya hai?"
      }
    ]
  }
}

Sample response

{
  "kind": "LanguageDetectionResults",
  "results": {
    "documents": [
      {
        "detectedLanguage": {
          "confidenceScore": 1,
          "iso6391Name": "en",
          "name": "English",
          "scriptName": "Latin",
          "scriptIso15924Code": "Latn"
        },
        "id": "1",
        "warnings": []
      },
      {
        "detectedLanguage": {
          "confidenceScore": 1,
          "iso6391Name": "fr",
          "name": "French",
          "scriptName": "Latin",
          "scriptIso15924Code": "Latn"
        },
        "id": "2",
        "warnings": []
      },
      {
        "detectedLanguage": {
          "confidenceScore": 1,
          "iso6391Name": "es",
          "name": "Spanish",
          "scriptName": "Latin",
          "scriptIso15924Code": "Latn"
        },
        "id": "3",
        "warnings": []
      },
      {
        "detectedLanguage": {
          "confidenceScore": 1,
          "iso6391Name": "hi",
          "name": "Hindi",
          "scriptName": "Latin",
          "scriptIso15924Code": "Latn"
        },
        "id": "4",
        "warnings": []
      }
    ],
    "errors": [],
    "modelVersion": "2023-12-01"
  }
}

SuccessfulPiiEntityRecognitionRequest

Sample request

POST {Endpoint}/language/:analyze-text?api-version=2024-11-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": "USSocialSecurityNumber",
            "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": "ABARoutingNumber",
            "confidenceScore": 0.75,
            "length": 9,
            "offset": 18,
            "text": "111000025"
          }
        ],
        "warnings": []
      },
      {
        "id": "3",
        "redactedText": "Is ************** your Brazilian CPF number?",
        "entities": [
          {
            "category": "BRCPFNumber",
            "confidenceScore": 0.85,
            "length": 14,
            "offset": 3,
            "text": "998.214.865-68"
          }
        ],
        "warnings": []
      }
    ],
    "errors": [],
    "modelVersion": "2021-01-15"
  }
}

SuccessfulSentimentAnalysisRequest

Sample request

POST {Endpoint}/language/:analyze-text?api-version=2024-11-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": "2021-10-01"
  }
}

Definitions

Name Description
AgeMetadata

Represents the Age entity Metadata model.

AgeUnit

The Age Unit of measurement

AllowOverlapEntityPolicyType

Represents the allow overlap policy. Will apply no post processing logic for the entities. Whatever the model predicts is what will be returned to the user. This allows the user to get a full view of every single model's possible values and apply their own custom logic on entity selection

AnalyzeTextEntityLinkingInput

Contains the analyze text Entity linking input.

AnalyzeTextEntityRecognitionInput

The entity recognition analyze text input task request.

AnalyzeTextKeyPhraseExtractionInput

Contains the analyze text KeyPhraseExtraction task input.

AnalyzeTextLanguageDetectionInput

Contains the language detection document analysis task input.

AnalyzeTextPiiEntitiesRecognitionInput

Contains the analyze text PIIEntityRecognition task input.

AnalyzeTextSentimentAnalysisInput

Contains the analyze text SentimentAnalysis task input.

AnalyzeTextTaskKind

The kind of the analyze-text tasks supported.

AnalyzeTextTaskResultsKind

The kind of the response object returned by the analyze-text task.

AreaMetadata

Represents the Area entity Metadata model.

AreaUnit

The area unit of measurement.

CurrencyMetadata

Represents the Currency ) entity Metadata model.

DateMetadata

A Metadata for date entity instances.

DateTimeMetadata

A Metadata for datetime entity instances.

DateValue

Represents the date value.

DetectedLanguage

Contains the details of the detected language for the text.

DocumentError

Contains details of errors encountered during a job execution.

DocumentSentimentValue

Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).

DocumentStatistics

if showStats=true was specified in the request this field will contain information about the document payload.

DocumentWarning

Contains the warnings object with warnings encountered for the processed document.

EntitiesDocumentResultWithMetadata

Entity documents result with metadata.

EntitiesResult

Contains the entity recognition task result.

EntitiesTaskParameters

Supported parameters for an Entity Recognition task.

EntitiesTaskResult

Contains the entity task

Entity

Defines the detected entity object containing the entity category and entity text detected, etc.

EntityCategory

Contains all the entity categories detected by entity recognition.

EntityInferenceOptions

The class that houses the inference options allowed for named entity recognition.

EntityLinkingResult

Entity linking result.

EntityLinkingTaskParameters

Supported parameters for an Entity Linking task.

EntityLinkingTaskResult

Contains the analyze text Entity linking task result.

EntityTag

Entity tag object which contains the name of the tags abd any associated confidence score. Entity Tags are used to express some similarities/affinity between entities.

EntityWithMetadata

Entity object with tags and metadata.

Error

The error response object returned when the service encounters some errors during processing the request.

ErrorCode

Human-readable error code.

ErrorResponse

Error response.

InformationMetadata

Represents the Information (data) entity Metadata model.

InformationUnit

The information (data) Unit of measurement.

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.

KeyPhraseResult

Contains the KeyPhraseResult.

KeyPhrasesDocumentResult

Contains the Key phrase extraction results for a document.

KeyPhraseTaskParameters

Supported parameters for a Key Phrase Extraction task.

KeyPhraseTaskResult

Contains the analyze text KeyPhraseExtraction task result.

LanguageDetectionAnalysisInput

Contains the language detection document analysis input.

LanguageDetectionDocumentResult

Contains the language detection for a document.

LanguageDetectionResult

Contains the language detection result for the request.

LanguageDetectionTaskParameters

Supported parameters for a Language Detection task.

LanguageDetectionTaskResult

Contains the language detection task result for the request.

LanguageInput

Contains the language detection input.

LengthMetadata

Represents the Length entity Metadata model.

LengthUnit

The length unit of measurement.

LinkedEntitiesDocumentResult

Entity linking document result.

LinkedEntity

The LinkedEntity object containing the detected entity with the associated sources/links.

Match

The Match object containing the detected entity text with the offset and the length.

MatchLongestEntityPolicyType

Represents the Match longest overlap policy. No overlapping entities as far as it is possible. 1. If there are overlapping entities, the longest one will be returned. 2. If the set of characters predicted for 2 or more entities are exactly the same, select the entity that has the higher confidence score.3. If the entity scores are identical, return all entities that are still present after applying the previous rules. 3. If there is partial overlap (as in Hello Text Analytics) follow the above steps starting from 1.

MetadataKind

The entity Metadata object kind.

MultiLanguageAnalysisInput

Collection of input documents to be analyzed by the service.

MultiLanguageInput

Contains an input document to be analyzed by the service.

NumberKind

The type of the extracted number entity.

NumberMetadata

A metadata for numeric entity instances.

NumericRangeMetadata

represents the Metadata of numeric intervals.

OrdinalMetadata

A metadata for numeric entity instances.

PiiCategory

(Optional) describes the PII categories to return

PiiDomain

Domain for PII task

PiiEntitiesDocumentResult

Contains the PII results.

PiiResult

Contains the PiiResult.

PiiTaskParameters

Supported parameters for a PII Entities Recognition task.

PiiTaskResult

Contains the analyze text PIIEntityRecognition LRO task.

RangeInclusivity

The range inclusiveness of this property property.

RangeKind

The kind of the number range entity.

RelativeTo

The reference point that the ordinal number denotes.

RequestStatistics

if showStats=true was specified in the request this field will contain information about the request payload.

ScriptCode

Identifies the script of the input document. Maps to the ISO 15924 standard script code.

ScriptKind

Identifies the script of the input document. Maps to the ISO 15924 standard formal name.

SentenceAssessment

Represents a sentence assessment and the assessments or target objects related to it.

SentenceSentiment

A document's sentence sentiment.

SentenceSentimentValue

The predicted Sentiment for the sentence.

SentenceTarget

Represents a sentence target and the assessments or target objects related to it.

SentimentAnalysisTaskParameters

Supported parameters for a Sentiment Analysis task.

SentimentConfidenceScores

Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative.

SentimentDocumentResult

An object representing the pre-built Sentiment Analysis results of each document.

SentimentResponse

Sentiment analysis results for the input documents.

SentimentTaskResult

Contains the analyze text SentimentAnalysis LRO task result.

SpeedMetadata

Represents the Speed entity Metadata model.

SpeedUnit

The speed Unit of measurement

StringIndexType

String index type

TargetConfidenceScoreLabel

Represents the confidence scores across all sentiment classes: positive and negative.

TargetRelation

Represents the relation between assessments and/or targets.

TargetRelationType

The type related to the target.

TemperatureMetadata

Represents the Information entity Metadata model.

TemperatureUnit

The temperature Unit of measurement.

TemporalModifier

An optional modifier of a date/time instance.

TemporalSetMetadata

A Metadata for temporal set entity instances.

TemporalSpanMetadata

represents the Metadata of a date and/or time span.

TemporalSpanValues

Temporal span object.

TimeMetadata

A Metadata for time entity instances.

TokenSentimentValue

The predicted Sentiment for the sentence.

VolumeMetadata

Represents the Volume entity Metadata model.

VolumeUnit

The Volume Unit of measurement

WarningCodeValue

Defines the list of the warning codes.

WeightMetadata

Represents the Weight ) entity Metadata model.

WeightUnit

The weight Unit of measurement.

AgeMetadata

Represents the Age entity Metadata model.

Name Type Description
metadataKind string:

AgeMetadata

The entity Metadata object kind.

unit

AgeUnit

Unit of measure for age.

value

number

The numeric value that the extracted text denotes.

AgeUnit

The Age Unit of measurement

Name Type Description
Day

string

Time period of a day

Month

string

Time period of a month

Unspecified

string

Unspecified time period

Week

string

Time period of a week

Year

string

Time period of a year

AllowOverlapEntityPolicyType

Represents the allow overlap policy. Will apply no post processing logic for the entities. Whatever the model predicts is what will be returned to the user. This allows the user to get a full view of every single model's possible values and apply their own custom logic on entity selection

Name Type Default value Description
policyKind string:

allowOverlap

matchLongest

The entity OverlapPolicy object kind.

AnalyzeTextEntityLinkingInput

Contains the analyze text Entity linking input.

Name Type Description
analysisInput

MultiLanguageAnalysisInput

Contains the analysis input to be handled by the service.

kind string:

EntityLinking

The kind of task to perform.

parameters

EntityLinkingTaskParameters

Task parameters.

AnalyzeTextEntityRecognitionInput

The entity recognition analyze text input task request.

Name Type Description
analysisInput

MultiLanguageAnalysisInput

The input to be analyzed.

kind string:

EntityRecognition

The kind of task to perform.

parameters

EntitiesTaskParameters

Task parameters.

AnalyzeTextKeyPhraseExtractionInput

Contains the analyze text KeyPhraseExtraction task input.

Name Type Description
analysisInput

MultiLanguageAnalysisInput

Contains the input documents.

kind string:

KeyPhraseExtraction

The kind of task to perform.

parameters

KeyPhraseTaskParameters

Key phrase extraction task parameters.

AnalyzeTextLanguageDetectionInput

Contains the language detection document analysis task input.

Name Type Description
analysisInput

LanguageDetectionAnalysisInput

Documents to be analyzed.

kind string:

LanguageDetection

The kind of task to perform.

parameters

LanguageDetectionTaskParameters

task parameters.

AnalyzeTextPiiEntitiesRecognitionInput

Contains the analyze text PIIEntityRecognition task input.

Name Type Description
analysisInput

MultiLanguageAnalysisInput

Contains the input documents.

kind string:

PiiEntityRecognition

The kind of task to perform.

parameters

PiiTaskParameters

Pii task parameters.

AnalyzeTextSentimentAnalysisInput

Contains the analyze text SentimentAnalysis task input.

Name Type Description
analysisInput

MultiLanguageAnalysisInput

Contains the input documents.

kind string:

SentimentAnalysis

The kind of task to perform.

parameters

SentimentAnalysisTaskParameters

Sentiment Analysis task parameters.

AnalyzeTextTaskKind

The kind of the analyze-text tasks supported.

Name Type Description
EntityLinking

string

Entity linking task

EntityRecognition

string

Entity recognition task

KeyPhraseExtraction

string

Key phrase extraction task

LanguageDetection

string

Language detection task

PiiEntityRecognition

string

PII entity recognition task

SentimentAnalysis

string

Sentiment analysis task

AnalyzeTextTaskResultsKind

The kind of the response object returned by the analyze-text task.

Name Type Description
EntityLinkingResults

string

Entity linking results

EntityRecognitionResults

string

Entity recognition results

KeyPhraseExtractionResults

string

Key phrase extraction results

LanguageDetectionResults

string

Language detection results

PiiEntityRecognitionResults

string

PII entity recognition results

SentimentAnalysisResults

string

Sentiment analysis results

AreaMetadata

Represents the Area entity Metadata model.

Name Type Description
metadataKind string:

AreaMetadata

The entity Metadata object kind.

unit

AreaUnit

Unit of measure for area.

value

number

The numeric value that the extracted text denotes.

AreaUnit

The area unit of measurement.

Name Type Description
Acre

string

Area unit in acres

SquareCentimeter

string

Area unit in square centimeters

SquareDecameter

string

Area unit in square decameters

SquareDecimeter

string

Area unit in square decimeters

SquareFoot

string

Area unit in square feet

SquareHectometer

string

Area unit in square hectometers

SquareInch

string

Area unit in square inches

SquareKilometer

string

Area unit in square kilometers

SquareMeter

string

Area unit in square meters

SquareMile

string

Area unit in square miles

SquareMillimeter

string

Area unit in square millimeters

SquareYard

string

Area unit in square yards

Unspecified

string

Unspecified area unit

CurrencyMetadata

Represents the Currency ) entity Metadata model.

Name Type Description
iso4217

string

The alphabetic code based on another ISO standard, ISO 3166, which lists the codes for country names. The first two letters of the ISO 4217 three-letter code are the same as the code for the country name, and, where possible, the third letter corresponds to the first letter of the currency name.

metadataKind string:

CurrencyMetadata

The entity Metadata object kind.

unit

string

Currency unit.

value

number

The numeric value that the extracted text denotes.

DateMetadata

A Metadata for date entity instances.

Name Type Description
dateValues

DateValue[]

List of date values.

metadataKind string:

DateMetadata

The entity Metadata object kind.

DateTimeMetadata

A Metadata for datetime entity instances.

Name Type Description
dateValues

DateValue[]

List of date values.

metadataKind string:

DateTimeMetadata

The entity Metadata object kind.

DateValue

Represents the date value.

Name Type Description
modifier

TemporalModifier

Modifier for datetime to indicate point of reference like before, after etc.

timex

string

An extended ISO 8601 date/time representation as described in (https://github.com/Microsoft/Recognizers-Text/blob/master/Patterns/English/English-DateTime.yaml)

value

string

The actual time that the extracted text denote.

DetectedLanguage

Contains the details of the detected language for the text.

Name Type Description
confidenceScore

number

A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true.

iso6391Name

string

A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr).

name

string

Long name of a detected language (e.g. English, French).

scriptIso15924Code

ScriptCode

Identifies the script code of the input document according to the ISO 15924 standard.

scriptName

ScriptKind

Identifies the script name of the input document according to the ISO 15924 standard.

DocumentError

Contains details of errors encountered during a job execution.

Name Type Description
error

Error

Error encountered.

id

string

The ID of the input document.

DocumentSentimentValue

Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).

Name Type Description
mixed

string

Mixed statement

negative

string

Negative statement

neutral

string

Neutral statement

positive

string

Positive statement

DocumentStatistics

if showStats=true was specified in the request this field will contain information about the document payload.

Name Type Description
charactersCount

integer

Number of text elements recognized in the document.

transactionsCount

integer

Number of transactions for the document.

DocumentWarning

Contains the warnings object with warnings encountered for the processed document.

Name Type Description
code

WarningCodeValue

Warning code.

message

string

Warning message.

targetRef

string

A JSON pointer reference indicating the target object.

EntitiesDocumentResultWithMetadata

Entity documents result with metadata.

Name Type Description
entities

EntityWithMetadata[]

Recognized entities in the document.

id

string

Unique, non-empty document identifier.

statistics

DocumentStatistics

if showStats=true was specified in the request this field will contain information about the document payload.

warnings

DocumentWarning[]

Warnings encountered while processing document.

EntitiesResult

Contains the entity recognition task result.

Name Type Description
documents

EntitiesDocumentResultWithMetadata[]

Response by document

errors

DocumentError[]

Errors by document id.

modelVersion

string

This field indicates which model is used for scoring.

statistics

RequestStatistics

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
exclusionList

EntityCategory[]

(Optional) request parameter that filters out any entities that are included the excludeList. When a user specifies an excludeList, they cannot get a prediction returned with an entity in that list. We will apply inclusionList before exclusionList

inclusionList

EntityCategory[]

(Optional) request parameter that limits the output to the requested entity types included in this list. We will apply inclusionList before exclusionList

inferenceOptions

EntityInferenceOptions

(Optional) request parameter that allows the user to provide settings for running the inference.

loggingOptOut

boolean

False

logging opt out

modelVersion

string

latest

model version

overlapPolicy BaseEntityOverlapPolicy:

(Optional) describes the type of overlap policy to apply to the ner output.

stringIndexType

StringIndexType

TextElements_v8

(Optional) parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes).

EntitiesTaskResult

Contains the entity task

Name Type Description
kind string:

EntityRecognitionResults

The kind of task result.

results

EntitiesResult

Results for entity recognition.

Entity

Defines the detected entity object containing the entity category and entity text detected, etc.

Name Type Description
category

string

Entity type.

confidenceScore

number

Confidence score between 0 and 1 of the extracted entity.

length

integer

Length for the entity text. Use of different 'stringIndexType' values can affect the length returned.

offset

integer

Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned.

subcategory

string

(Optional) Entity sub type.

text

string

Entity text as appears in the request.

EntityCategory

Contains all the entity categories detected by entity recognition.

Name Type Description
Address

string

Specific street-level mentions of locations: house/building numbers, streets, avenues, highways, intersections referenced by name.

Age

string

Age-related values.

Airport

string

Airports.

Area

string

Area of an object.

City

string

City-related values.

ComputingProduct

string

Computing products.

Continent

string

Continent-related values.

CountryRegion

string

Country or region-related values.

CulturalEvent

string

Cultural event-related values.

Currency

string

Currency-related values.

Date

string

Calendar dates.

DateRange

string

Range of dates.

DateTime

string

Calendar dates with time.

DateTimeRange

string

Range of date and time.

Dimension

string

Dimension of measurements

Duration

string

Duration of time.

Email

string

Email addresses.

Event

string

Social, sports, business, political, educational, natural, historical, criminal, violent, legal, military events with a timed period.

GPE

string

Cities, countries/regions, states.

Geological

string

Geographic and natural features such as rivers, oceans, and deserts.

Height

string

Height of an object.

IP

string

network IP addresses.

Information

string

Unit of measure for digital information.

Length

string

Length of an object.

Location

string

Particular point or place in physical space.

NaturalEvent

string

Natural event-related values.

Number

string

Numbers without a unit

NumberRange

string

Range of Numbers

Numeric

string

Numeric values, including digits and number words.

Ordinal

string

Ordinal numbers.

Organization

string

Corporations, agencies, and other groups of people defined by some established organizational structure. These labels can include companies, political parties/movements, musical bands, sport clubs, government bodies, and public organizations. Nationalities or religions are not ORGANIZATION.

OrganizationMedical

string

Medical companies and groups.

OrganizationSports

string

Sports-related organizations.

OrganizationStockExchange

string

Stock exchange groups.

Percentage

string

Percentage-related values.

Person

string

First, last, and middle names, names of fictional characters, and aliases. Titles, such as 'Mr.' or 'President', are not considered part of the named entity.

PersonType

string

Human roles classified by a group membership.

PhoneNumber

string

Phone numbers (US and EU phone numbers only).

Product

string

Single or group of commercial, consumable objects, electronics, vehicles, food groups.

SetTemporal

string

Set of time-related values.

Skill

string

A capability, skill, or expertise.

Speed

string

Speed of an object.

SportsEvent

string

Sports event-related values.

State

string

State-related values.

Structural

string

Manmade structures.

Temperature

string

Temperature-related values.

Temporal

string

Items relating to time.

Time

string

Times of day.

TimeRange

string

Range of times.

URL

string

URLs to websites.

Volume

string

Volume of an object.

Weight

string

Weight of an object.

EntityInferenceOptions

The class that houses the inference options allowed for named entity recognition.

Name Type Default value Description
excludeNormalizedValues

boolean

False

Option to include/exclude the detected entity values to be normalized and included in the metadata. The numeric and temporal entity types support value normalization.

EntityLinkingResult

Entity linking result.

Name Type Description
documents

LinkedEntitiesDocumentResult[]

Response by document

errors

DocumentError[]

Errors by document id.

modelVersion

string

This field indicates which model is used for scoring.

statistics

RequestStatistics

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

boolean

False

logging opt out

modelVersion

string

latest

model version

stringIndexType

StringIndexType

TextElements_v8

Optional parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes).

EntityLinkingTaskResult

Contains the analyze text Entity linking task result.

Name Type Description
kind string:

EntityLinkingResults

The kind of task result.

results

EntityLinkingResult

Entity linking result.

EntityTag

Entity tag object which contains the name of the tags abd any associated confidence score. Entity Tags are used to express some similarities/affinity between entities.

Name Type Description
confidenceScore

number

Detection score between 0 and 1 of the extracted entity.

name

string

Name of the tag. Entity Tag names will be unique globally.

EntityWithMetadata

Entity object with tags and metadata.

Name Type Description
category

string

Entity type.

confidenceScore

number

Confidence score between 0 and 1 of the extracted entity.

length

integer

Length for the entity text. Use of different 'stringIndexType' values can affect the length returned.

metadata BaseMetadata:

The entity metadata object.

offset

integer

Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned.

subcategory

string

(Optional) Entity sub type.

tags

EntityTag[]

List of entity tags. Tags are to express some similarities/affinity between entities.

text

string

Entity text as appears in the request.

type

string

An entity type is the lowest (or finest) granularity at which the entity has been detected. The type maps to the specific metadata attributes associated with the entity detected.

Error

The error response object returned when the service encounters some errors during processing the request.

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

Azure Cognitive Search index limit reached error

AzureCognitiveSearchIndexNotFound

string

Azure Cognitive Search index not found error

AzureCognitiveSearchNotFound

string

Azure Cognitive Search not found error

AzureCognitiveSearchThrottling

string

Azure Cognitive Search throttling error

Conflict

string

Conflict error

Forbidden

string

Forbidden access error

InternalServerError

string

Internal server error

InvalidArgument

string

Invalid argument error

InvalidRequest

string

Invalid request error

NotFound

string

Not found error

OperationNotFound

string

Operation not found error

ProjectNotFound

string

Project not found error

QuotaExceeded

string

Quota exceeded error

ServiceUnavailable

string

Service unavailable error

Timeout

string

Timeout error

TooManyRequests

string

Too many requests error

Unauthorized

string

Unauthorized access error

Warning

string

Warning error

ErrorResponse

Error response.

Name Type Description
error

Error

The error object.

InformationMetadata

Represents the Information (data) entity Metadata model.

Name Type Description
metadataKind string:

InformationMetadata

The entity Metadata object kind.

unit

InformationUnit

Unit of measure for information.

value

number

The numeric value that the extracted text denotes.

InformationUnit

The information (data) Unit of measurement.

Name Type Description
Bit

string

Data size unit in bits

Byte

string

Data size unit in bytes

Gigabit

string

Data size unit in gigabits

Gigabyte

string

Data size unit in gigabytes

Kilobit

string

Data size unit in kilobits

Kilobyte

string

Data size unit in kilobytes

Megabit

string

Data size unit in megabits

Megabyte

string

Data size unit in megabytes

Petabit

string

Data size unit in petabits

Petabyte

string

Data size unit in petabytes

Terabit

string

Data size unit in terabits

Terabyte

string

Data size unit in terabytes

Unspecified

string

Unspecified data size unit

InnerErrorCode

Human-readable error code.

Name Type Description
AzureCognitiveSearchNotFound

string

Azure Cognitive Search not found error

AzureCognitiveSearchThrottling

string

Azure Cognitive Search throttling error

EmptyRequest

string

Empty request error

ExtractionFailure

string

Extraction failure error

InvalidCountryHint

string

Invalid country hint error

InvalidDocument

string

Invalid document error

InvalidDocumentBatch

string

Invalid document batch error

InvalidParameterValue

string

Invalid parameter value error

InvalidRequest

string

Invalid request error

InvalidRequestBodyFormat

string

Invalid request body format error

KnowledgeBaseNotFound

string

Knowledge base not found error

MissingInputDocuments

string

Missing input documents error

ModelVersionIncorrect

string

Model version incorrect error

UnsupportedLanguageCode

string

Unsupported language code error

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.

KeyPhraseResult

Contains the KeyPhraseResult.

Name Type Description
documents

KeyPhrasesDocumentResult[]

Response by document

errors

DocumentError[]

Errors by document id.

modelVersion

string

This field indicates which model is used for scoring.

statistics

RequestStatistics

if showStats=true was specified in the request this field will contain information about the request payload.

KeyPhrasesDocumentResult

Contains the Key phrase extraction results for a document.

Name Type Description
id

string

Unique, non-empty document identifier.

keyPhrases

string[]

A list of representative words or phrases. The number of key phrases returned is proportional to the number of words in the input document.

statistics

DocumentStatistics

if showStats=true was specified in the request this field will contain information about the document payload.

warnings

DocumentWarning[]

Warnings encountered while processing document.

KeyPhraseTaskParameters

Supported parameters for a Key Phrase Extraction task.

Name Type Default value Description
loggingOptOut

boolean

False

logging opt out

modelVersion

string

latest

model version

KeyPhraseTaskResult

Contains the analyze text KeyPhraseExtraction task result.

Name Type Description
kind string:

KeyPhraseExtractionResults

The kind of task result.

results

KeyPhraseResult

The list of Key phrase extraction results

LanguageDetectionAnalysisInput

Contains the language detection document analysis input.

Name Type Description
documents

LanguageInput[]

List of documents to be analyzed.

LanguageDetectionDocumentResult

Contains the language detection for a document.

Name Type Description
detectedLanguage

DetectedLanguage

Detected Language.

id

string

Unique, non-empty document identifier.

statistics

DocumentStatistics

if showStats=true was specified in the request this field will contain information about the document payload.

warnings

DocumentWarning[]

Warnings encountered while processing document.

LanguageDetectionResult

Contains the language detection result for the request.

Name Type Description
documents

LanguageDetectionDocumentResult[]

Enumeration of language detection results for each input document.

errors

DocumentError[]

Errors by document id.

modelVersion

string

This field indicates which model is used for scoring.

statistics

RequestStatistics

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

boolean

False

logging opt out

modelVersion

string

latest

model version

LanguageDetectionTaskResult

Contains the language detection task result for the request.

Name Type Description
kind string:

LanguageDetectionResults

The kind of task result.

results

LanguageDetectionResult

Contains the language detection results.

LanguageInput

Contains the language detection input.

Name Type Description
countryHint

string

The country hint to help with language detection of the text.

id

string

A unique, non-empty document identifier.

text

string

The input text to process.

LengthMetadata

Represents the Length entity Metadata model.

Name Type Description
metadataKind string:

LengthMetadata

The entity Metadata object kind.

unit

LengthUnit

Unit of measure for length.

value

number

The numeric value that the extracted text denotes.

LengthUnit

The length unit of measurement.

Name Type Description
Centimeter

string

Length unit in centimeters.

Decameter

string

Length unit in decameters.

Decimeter

string

Length unit in decimeters.

Foot

string

Length unit in feet.

Hectometer

string

Length unit in hectometers.

Inch

string

Length unit in inches.

Kilometer

string

Length unit in kilometers.

LightYear

string

Length unit in light years.

Meter

string

Length unit in meters.

Micrometer

string

Length unit in micrometers.

Mile

string

Length unit in miles.

Millimeter

string

Length unit in millimeters.

Nanometer

string

Length unit in nanometers.

Picometer

string

Length unit in picometers.

Point

string

Length unit in points.

Unspecified

string

Unspecified length unit.

Yard

string

Length unit in yards.

LinkedEntitiesDocumentResult

Entity linking document result.

Name Type Description
entities

LinkedEntity[]

Recognized well known entities in the document.

id

string

Unique, non-empty document identifier.

statistics

DocumentStatistics

if showStats=true was specified in the request this field will contain information about the document payload.

warnings

DocumentWarning[]

Warnings encountered while processing document.

LinkedEntity

The LinkedEntity object containing the detected entity with the associated sources/links.

Name Type Description
bingId

string

Bing Entity Search API unique identifier of the recognized entity.

dataSource

string

Data source used to extract entity linking, such as Wiki/Bing etc.

id

string

Unique identifier of the recognized entity from the data source.

language

string

Language used in the data source.

matches

Match[]

List of instances this entity appears in the text.

name

string

Entity Linking formal name.

url

string

URL for the entity's page from the data source.

Match

The Match object containing the detected entity text with the offset and the length.

Name Type Description
confidenceScore

number

If a well known item is recognized, a decimal number denoting the confidence level between 0 and 1 will be returned.

length

integer

Length for the entity match text.

offset

integer

Start position for the entity match text.

text

string

Entity text as appears in the request.

MatchLongestEntityPolicyType

Represents the Match longest overlap policy. No overlapping entities as far as it is possible. 1. If there are overlapping entities, the longest one will be returned. 2. If the set of characters predicted for 2 or more entities are exactly the same, select the entity that has the higher confidence score.3. If the entity scores are identical, return all entities that are still present after applying the previous rules. 3. If there is partial overlap (as in Hello Text Analytics) follow the above steps starting from 1.

Name Type Default value Description
policyKind string:

matchLongest

matchLongest

The entity OverlapPolicy object kind.

MetadataKind

The entity Metadata object kind.

Name Type Description
AgeMetadata

string

Metadata for age-related values.

AreaMetadata

string

Metadata for area-related values.

CurrencyMetadata

string

Metadata for currency-related values.

DateMetadata

string

Metadata for date-related values.

DateTimeMetadata

string

Metadata for date and time-related values.

InformationMetadata

string

Metadata for information-related values.

LengthMetadata

string

Metadata for length-related values.

NumberMetadata

string

Metadata for numeric values.

NumericRangeMetadata

string

Metadata for numeric range values.

OrdinalMetadata

string

Metadata for ordinal numbers.

SpeedMetadata

string

Metadata for speed-related values.

TemperatureMetadata

string

Metadata for temperature-related values.

TemporalSetMetadata

string

Metadata for set of time-related values.

TemporalSpanMetadata

string

Metadata for temporal span values.

TimeMetadata

string

Metadata for time-related values.

VolumeMetadata

string

Metadata for volume-related values.

WeightMetadata

string

Metadata for weight-related values.

MultiLanguageAnalysisInput

Collection of input documents to be analyzed by the service.

Name Type Description
documents

MultiLanguageInput[]

The input documents to be analyzed.

MultiLanguageInput

Contains an input document to be analyzed by the service.

Name Type Description
id

string

A unique, non-empty document identifier.

language

string

(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. (Following only applies to 2023-04-15-preview and above) For Auto Language Detection, use "auto". If not set, use "en" for English as default.

text

string

The input text to process.

NumberKind

The type of the extracted number entity.

Name Type Description
Decimal

string

Decimal number

Fraction

string

Fraction number

Integer

string

Integer number

Percent

string

Percent number

Power

string

Power number

Unspecified

string

Unspecified number kind

NumberMetadata

A metadata for numeric entity instances.

Name Type Description
metadataKind string:

NumberMetadata

The entity Metadata object kind.

numberKind

NumberKind

Kind of the number type.

value

number

A numeric representation of what the extracted text denotes.

NumericRangeMetadata

represents the Metadata of numeric intervals.

Name Type Description
maximum

number

The ending value of the interval.

metadataKind string:

NumericRangeMetadata

The entity Metadata object kind.

minimum

number

The beginning value of the interval.

rangeInclusivity

RangeInclusivity

The inclusiveness of this range.

rangeKind

RangeKind

Kind of numeric ranges supported - like Number, Speed, etc.

OrdinalMetadata

A metadata for numeric entity instances.

Name Type Description
metadataKind string:

OrdinalMetadata

The entity Metadata object kind.

offset

string

The offset with respect to the reference (e.g., offset = -1 indicates the second to last)

relativeTo

RelativeTo

The reference point that the ordinal number denotes.

value

string

A simple arithmetic expression that the ordinal denotes.

PiiCategory

(Optional) describes the PII categories to return

Name Type Description
ABARoutingNumber

string

ABA Routing number

ARNationalIdentityNumber

string

AR National Identity Number

ATIdentityCard

string

AT Identity Card

ATTaxIdentificationNumber

string

AT Tax Identification Number

ATValueAddedTaxNumber

string

AT Value Added Tax Number

AUBankAccountNumber

string

AT Identity Card

AUBusinessNumber

string

AU Business Number

AUCompanyNumber

string

AU Company Number

AUDriversLicenseNumber

string

AU Driver's License Number

AUMedicalAccountNumber

string

AU Medical Account Number

AUPassportNumber

string

AU Passport Number

AUTaxFileNumber

string

AU Tax File Number

Address

string

Address

Age

string

Age

All

string

All PII categories.

AzureDocumentDBAuthKey

string

Azure Document DB Auth Key

AzureIAASDatabaseConnectionAndSQLString

string

Azure IAAS Database Connection And SQL String

AzureIoTConnectionString

string

Azure IoT Connection String

AzurePublishSettingPassword

string

Azure Publish Setting Password

AzureRedisCacheString

string

Azure Redis Cache String

AzureSAS

string

Azure SAS

AzureServiceBusString

string

Azure Service Bus String

AzureStorageAccountGeneric

string

Azure Storage Account Generic

AzureStorageAccountKey

string

Azure Storage Account Key

BENationalNumber

string

BE National Number

BENationalNumberV2

string

BE National Number V2

BEValueAddedTaxNumber

string

BE Value Added Tax Number

BGUniformCivilNumber

string

BG Uniform Civil Number

BRCPFNumber

string

BR CPF Number

BRLegalEntityNumber

string

BR Legal Entity Number

BRNationalIDRG

string

BR National ID RG

CABankAccountNumber

string

CA Bank Account Number

CADriversLicenseNumber

string

CA Driver's License Number

CAHealthServiceNumber

string

CA Health Service Number

CAPassportNumber

string

CA Passport Number

CAPersonalHealthIdentification

string

CA Personal Health Identification

CASocialInsuranceNumber

string

CA Social Insurance Number

CHSocialSecurityNumber

string

CH Social Security Number

CLIdentityCardNumber

string

CL Identity Card Number

CNResidentIdentityCardNumber

string

CN Resident Identity Card Number

CYIdentityCard

string

CY Identity Card

CYTaxIdentificationNumber

string

CY Tax Identification Number

CZPersonalIdentityNumber

string

CZ Personal Identity Number

CZPersonalIdentityV2

string

CZ Personal Identity V2

CreditCardNumber

string

Credit Card Number

DEDriversLicenseNumber

string

DE Driver's License Number

DEIdentityCardNumber

string

DE Identity Card Number

DEPassportNumber

string

DE Passport Number

DETaxIdentificationNumber

string

DE Tax Identification Number

DEValueAddedNumber

string

DE Value Added Number

DKPersonalIdentificationNumber

string

DK Personal Identification Number

DKPersonalIdentificationV2

string

DK Personal Identification V2

Date

string

Date

Default

string

Default PII categories for the language.

DrugEnforcementAgencyNumber

string

Drug Enforcement Agency Number

EEPersonalIdentificationCode

string

EE Personal Identification Code

ESDNI

string

ES DNI

ESSocialSecurityNumber

string

ES Social Security Number

ESTaxIdentificationNumber

string

ES Tax Identification Number

EUDebitCardNumber

string

EU Debit Card Number

EUDriversLicenseNumber

string

EU Driver's License Number

EUGPSCoordinates

string

EU GPS Coordinates

EUNationalIdentificationNumber

string

EU National Identification Number

EUPassportNumber

string

EU Passport Number

EUSocialSecurityNumber

string

EU Social Security Number

EUTaxIdentificationNumber

string

EU Tax Identification Number

Email

string

Email

FIEuropeanHealthNumber

string

FI European Health Number

FINationalID

string

FI National ID

FINationalIDV2

string

FI National ID V2

FIPassportNumber

string

FI Passport Number

FRDriversLicenseNumber

string

FR Driver's License Number

FRHealthInsuranceNumber

string

FR Health Insurance Number

FRNationalID

string

FR National ID

FRPassportNumber

string

FR Passport Number

FRSocialSecurityNumber

string

FR Social Security Number

FRTaxIdentificationNumber

string

FR Tax Identification Number

FRValueAddedTaxNumber

string

FR Value Added Tax Number

GRNationalIDCard

string

GR National ID Card

GRNationalIDV2

string

GR National ID V2

GRTaxIdentificationNumber

string

GR Tax Identification Number

HKIdentityCardNumber

string

HK Identity Card Number

HRIdentityCardNumber

string

HR Identity Card Number

HRNationalIDNumber

string

HR National ID Number

HRPersonalIdentificationNumber

string

HR Personal Identification Number

HRPersonalIdentificationOIBNumberV2

string

HR Personal Identification OIB Number V2

HUPersonalIdentificationNumber

string

HU Personal Identification Number

HUTaxIdentificationNumber

string

HU Tax Identification Number

HUValueAddedNumber

string

HU Value Added Number

IDIdentityCardNumber

string

ID Identity Card Number

IEPersonalPublicServiceNumber

string

IE Personal Public Service Number

IEPersonalPublicServiceNumberV2

string

IE Personal Public Service Number V2

ILBankAccountNumber

string

IL Bank Account Number

ILNationalID

string

IL National ID

INPermanentAccount

string

IN Permanent Account

INUniqueIdentificationNumber

string

IN Unique Identification Number

IPAddress

string

IP Address

ITDriversLicenseNumber

string

IT Driver's License Number

ITFiscalCode

string

IT Fiscal Code

ITValueAddedTaxNumber

string

IT Value Added Tax Number

InternationalBankingAccountNumber

string

International Banking Account Number

JPBankAccountNumber

string

JP Bank Account Number

JPDriversLicenseNumber

string

JP Driver's License Number

JPMyNumberCorporate

string

JP My Number Corporate

JPMyNumberPersonal

string

JP My Number Personal

JPPassportNumber

string

JP Passport Number

JPResidenceCardNumber

string

JP Residence Card Number

JPResidentRegistrationNumber

string

JP Resident Registration Number

JPSocialInsuranceNumber

string

JP Social Insurance Number

KRResidentRegistrationNumber

string

KR Resident Registration Number

LTPersonalCode

string

LT Personal Code

LUNationalIdentificationNumberNatural

string

LU National Identification Number Natural

LUNationalIdentificationNumberNonNatural

string

LU National Identification Number Non Natural

LVPersonalCode

string

LV Personal Code

MTIdentityCardNumber

string

MT Identity Card Number

MTTaxIDNumber

string

MT Tax ID Number

MYIdentityCardNumber

string

MY Identity Card Number

NLCitizensServiceNumber

string

NL Citizens Service Number

NLCitizensServiceNumberV2

string

NL Citizens Service Number V2

NLTaxIdentificationNumber

string

NL Tax Identification Number

NLValueAddedTaxNumber

string

NL Value Added Tax Number

NOIdentityNumber

string

NO Identity Number

NZBankAccountNumber

string

NZ Bank Account Number

NZDriversLicenseNumber

string

NZ Driver's License Number

NZInlandRevenueNumber

string

NZ Inland Revenue Number

NZMinistryOfHealthNumber

string

NZ Ministry Of Health Number

NZSocialWelfareNumber

string

NZ Social Welfare Number

Organization

string

Organization

PHUnifiedMultiPurposeIDNumber

string

PH Unified Multi Purpose ID Number

PLIdentityCard

string

PL Identity Card

PLNationalID

string

PL National ID

PLNationalIDV2

string

PL National ID V2

PLPassportNumber

string

PL Passport Number

PLREGONNumber

string

PL REGON Number

PLTaxIdentificationNumber

string

PL Tax Identification Number

PTCitizenCardNumber

string

PT Citizen Card Number

PTCitizenCardNumberV2

string

PT Citizen Card Number V2

PTTaxIdentificationNumber

string

PT Tax Identification Number

Person

string

Person

PhoneNumber

string

Phone Number

ROPersonalNumericalCode

string

RO Personal Numerical Code

RUPassportNumberDomestic

string

RU Passport Number Domestic

RUPassportNumberInternational

string

RU Passport Number International

SANationalID

string

SA National ID

SENationalID

string

SE National ID

SENationalIDV2

string

SE National ID V2

SEPassportNumber

string

SE Passport Number

SETaxIdentificationNumber

string

SE Tax Identification Number

SGNationalRegistrationIdentityCardNumber

string

SG National Registration Identity Card Number

SITaxIdentificationNumber

string

SI Tax Identification Number

SIUniqueMasterCitizenNumber

string

SI Unique Master Citizen Number

SKPersonalNumber

string

SK Personal Number

SQLServerConnectionString

string

SQL Server Connection String

SWIFTCode

string

SWIFT Code

THPopulationIdentificationCode

string

TH Population Identification Code

TRNationalIdentificationNumber

string

TR National Identification Number

TWNationalID

string

TW National ID

TWPassportNumber

string

TW Passport Number

TWResidentCertificate

string

TW Resident Certificate

UAPassportNumberDomestic

string

UA Passport Number Domestic

UAPassportNumberInternational

string

UA Passport Number International

UKDriversLicenseNumber

string

UK Driver's License Number

UKElectoralRollNumber

string

UK Electoral Roll Number

UKNationalHealthNumber

string

UK National Health Number

UKNationalInsuranceNumber

string

UK National Insurance Number

UKUniqueTaxpayerNumber

string

UK Unique Taxpayer Number

URL

string

URL

USBankAccountNumber

string

US Bank Account Number

USDriversLicenseNumber

string

US Driver's License Number

USIndividualTaxpayerIdentification

string

US Individual Taxpayer Identification

USSocialSecurityNumber

string

US Social Security Number

USUKPassportNumber

string

US UK Passport Number

ZAIdentificationNumber

string

ZA Identification Number

PiiDomain

Domain for PII task

Name Type Description
none

string

Indicates that no domain is specified.

phi

string

Indicates that entities in the Personal Health Information domain should be redacted.

PiiEntitiesDocumentResult

Contains the PII results.

Name Type Description
entities

Entity[]

Recognized entities in the document.

id

string

Unique, non-empty document identifier.

redactedText

string

Returns redacted text.

statistics

DocumentStatistics

if showStats=true was specified in the request this field will contain information about the document payload.

warnings

DocumentWarning[]

Warnings encountered while processing document.

PiiResult

Contains the PiiResult.

Name Type Description
documents

PiiEntitiesDocumentResult[]

Response by document

errors

DocumentError[]

Errors by document id.

modelVersion

string

This field indicates which model is used for scoring.

statistics

RequestStatistics

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

PiiDomain

none

Domain for PII task

loggingOptOut

boolean

False

logging opt out

modelVersion

string

latest

model version

piiCategories

PiiCategory[]

Enumeration of PII categories to be returned in the response.

stringIndexType

StringIndexType

TextElements_v8

StringIndexType to be used for analysis.

PiiTaskResult

Contains the analyze text PIIEntityRecognition LRO task.

Name Type Description
kind string:

PiiEntityRecognitionResults

The kind of task result.

results

PiiResult

The list of pii results

RangeInclusivity

The range inclusiveness of this property property.

Name Type Description
LeftInclusive

string

Left side inclusive

LeftRightInclusive

string

Both sides inclusive

NoneInclusive

string

No inclusivity

RightInclusive

string

Right side inclusive

RangeKind

The kind of the number range entity.

Name Type Description
Age

string

Age range

Area

string

Area range

Currency

string

Currency range

Information

string

Information range

Length

string

Length range

Number

string

Number range

Speed

string

Speed range

Temperature

string

Temperature range

Volume

string

Volume range

Weight

string

Weight range

RelativeTo

The reference point that the ordinal number denotes.

Name Type Description
Current

string

Current state or position

End

string

End state or position

Start

string

Start state or position

RequestStatistics

if showStats=true was specified in the request this field will contain information about the request payload.

Name Type Description
documentsCount

integer

Number of documents submitted in the request.

erroneousDocumentsCount

integer

Number of invalid documents. This includes empty, over-size limit or non-supported languages documents.

transactionsCount

integer

Number of transactions for the request.

validDocumentsCount

integer

Number of valid documents. This excludes empty, over-size limit or non-supported languages documents.

ScriptCode

Identifies the script of the input document. Maps to the ISO 15924 standard script code.

Name Type Description
Arab

string

Script code for the Arabic script.

Armn

string

Script code for the Armenian script.

Beng

string

Script code for the Bangla script.

Cans

string

Script code for the UnifiedCanadianAboriginalSyllabics script.

Cyrl

string

Script code for the Cyrillic script.

Deva

string

Script code for the Devanagari script.

Ethi

string

Script code for the Ethiopic script.

Geor

string

Script code for the Georgian script.

Grek

string

Script code for the Greek script.

Gujr

string

Script code for the Gujarati script.

Guru

string

Script code for the Gurmukhi script.

Hang

string

Script code for the Hangul script.

Hani

string

Script code for the HanLiteral script.

Hans

string

Script code for the HanSimplified script.

Hant

string

Script code for the HanTraditional script.

Hebr

string

Script code for the Hebrew script.

Jpan

string

Script code for the Japanese script.

Khmr

string

Script code for the Khmer script.

Knda

string

Script code for the Kannada script.

Laoo

string

Script code for the Lao script.

Latn

string

Script code for the Latin script.

Mlym

string

Script code for the Malayalam script.

Mong

string

Script code for the Mongolian script.

Mtei

string

Script code for the Meitei script.

Mymr

string

Script code for the Myanmar script.

Olck

string

Script code for the Santali script.

Orya

string

Script code for the Odia script.

Shrd

string

Script code for the Sharada script.

Sinh

string

Script code for the Sinhala script.

Taml

string

Script code for the Tamil script.

Telu

string

Script code for the Telugu script.

Thaa

string

Script code for the Thaana script.

Thai

string

Script code for the Thai script.

Tibt

string

Script code for the Tibetan script.

ScriptKind

Identifies the script of the input document. Maps to the ISO 15924 standard formal name.

Name Type Description
Arabic

string

Script name for the Arabic script.

Armenian

string

Script name for the Armenian script.

Bangla

string

Script name for the Bangla script.

Cyrillic

string

Script name for the Cyrillic script.

Devanagari

string

Script name for the Devanagari script.

Ethiopic

string

Script name for the Ethiopic script.

Georgian

string

Script name for the Georgian script.

Greek

string

Script name for the Greek script.

Gujarati

string

Script name for the Gujarati script.

Gurmukhi

string

Script name for the Gurmukhi script.

HanLiteral

string

Script name for the HanLiteral script.

HanSimplified

string

Script name for the HanSimplified script.

HanTraditional

string

Script name for the HanTraditional script.

Hangul

string

Script name for the Hangul script.

Hebrew

string

Script name for the Hebrew script.

Japanese

string

Script name for the Japanese script.

Kannada

string

Script name for the Kannada script.

Khmer

string

Script name for the Khmer script.

Lao

string

Script name for the Lao script.

Latin

string

Script name for the Latin script.

Malayalam

string

Script name for the Malayalam script.

Meitei

string

Script name for the Meitei script.

Mongolian

string

Script name for the Mongolian script.

Myanmar

string

Script name for the Myanmar script.

Odia

string

Script name for the Odia script.

Santali

string

Script name for the Santali script.

Sharada

string

Script name for the Sharada script.

Sinhala

string

Script name for the Sinhala script.

Tamil

string

Script name for the Tamil script.

Telugu

string

Script name for the Telugu script.

Thaana

string

Script name for the Thaana script.

Thai

string

Script name for the Thai script.

Tibetan

string

Script name for the Tibetan script.

UnifiedCanadianAboriginalSyllabics

string

Script name for the UnifiedCanadianAboriginalSyllabics script.

SentenceAssessment

Represents a sentence assessment and the assessments or target objects related to it.

Name Type Description
confidenceScores

TargetConfidenceScoreLabel

Represents the confidence scores across all sentiment classes: positive and negative.

isNegated

boolean

The indicator representing if the assessment is negated.

length

integer

The length of the target.

offset

integer

The target offset from the start of the sentence.

sentiment

TokenSentimentValue

The sentiment of the sentence.

text

string

The target text detected.

SentenceSentiment

A document's sentence sentiment.

Name Type Description
assessments

SentenceAssessment[]

The array of assessments for the sentence.

confidenceScores

SentimentConfidenceScores

The sentiment confidence score between 0 and 1 for the sentence for all classes.

length

integer

The length of the target.

offset

integer

The target offset from the start of the sentence.

sentiment

SentenceSentimentValue

The predicted Sentiment for the sentence.

targets

SentenceTarget[]

The array of sentence targets for the sentence.

text

string

The sentence text.

SentenceSentimentValue

The predicted Sentiment for the sentence.

Name Type Description
negative

string

Negative sentiment

neutral

string

Neutral sentiment

positive

string

Positive sentiment

SentenceTarget

Represents a sentence target and the assessments or target objects related to it.

Name Type Description
confidenceScores

TargetConfidenceScoreLabel

Represents the confidence scores across all sentiment classes: positive and negative.

length

integer

The length of the target.

offset

integer

The target offset from the start of the sentence.

relations

TargetRelation[]

The array of either assessment or target objects which is related to the target.

sentiment

TokenSentimentValue

The sentiment of the sentence.

text

string

The target text detected.

SentimentAnalysisTaskParameters

Supported parameters for a Sentiment Analysis task.

Name Type Default value Description
loggingOptOut

boolean

False

logging opt out

modelVersion

string

latest

model version

opinionMining

boolean

False

Whether to use opinion mining in the request or not.

stringIndexType

StringIndexType

TextElements_v8

Specifies the method used to interpret string offsets.

SentimentConfidenceScores

Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative.

Name Type Description
negative

number

Confidence score for negative sentiment

neutral

number

Confidence score for neutral sentiment

positive

number

Confidence score for positive sentiment

SentimentDocumentResult

An object representing the pre-built Sentiment Analysis results of each document.

Name Type Description
confidenceScores

SentimentConfidenceScores

The sentiment confidence score between 0 and 1 for the sentence for all classes.

id

string

Unique, non-empty document identifier.

sentences

SentenceSentiment[]

The document's sentences sentiment.

sentiment

DocumentSentimentValue

Predicted sentiment for document (Negative, Neutral, Positive, or Mixed).

statistics

DocumentStatistics

if showStats=true was specified in the request this field will contain information about the document payload.

warnings

DocumentWarning[]

Warnings encountered while processing document.

SentimentResponse

Sentiment analysis results for the input documents.

Name Type Description
documents

SentimentDocumentResult[]

The sentiment analysis results for each document in the input.

errors

DocumentError[]

Errors by document id.

modelVersion

string

This field indicates which model is used for scoring.

statistics

RequestStatistics

if showStats=true was specified in the request this field will contain information about the request payload.

SentimentTaskResult

Contains the analyze text SentimentAnalysis LRO task result.

Name Type Description
kind string:

SentimentAnalysisResults

The kind of task result.

results

SentimentResponse

The sentiment analysis results

SpeedMetadata

Represents the Speed entity Metadata model.

Name Type Description
metadataKind string:

SpeedMetadata

The entity Metadata object kind.

unit

SpeedUnit

Unit of measure for speed.

value

number

The numeric value that the extracted text denotes.

SpeedUnit

The speed Unit of measurement

Name Type Description
CentimetersPerMillisecond

string

Speed unit in centimeters per millisecond.

FeetPerMinute

string

Speed unit in feet per minute.

FeetPerSecond

string

Speed unit in feet per second.

KilometersPerHour

string

Speed unit in kilometers per hour.

KilometersPerMillisecond

string

Speed unit in Kilometers per millisecond.

KilometersPerMinute

string

Speed unit in kilometers per minute.

KilometersPerSecond

string

Speed unit in kilometers per second.

Knots

string

Speed unit in knots.

MetersPerMillisecond

string

Speed unit in meters per millisecond.

MetersPerSecond

string

Speed unit in meters per second.

MilesPerHour

string

Speed unit in miles per hour.

Unspecified

string

Unspecified speed unit.

YardsPerMinute

string

Speed unit in yards per minute.

YardsPerSecond

string

Speed unit in yards per second.

StringIndexType

String index type

Name Type Description
TextElements_v8

string

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

string

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

string

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.

TargetConfidenceScoreLabel

Represents the confidence scores across all sentiment classes: positive and negative.

Name Type Description
negative

number

Confidence score for negative sentiment

positive

number

Confidence score for positive sentiment

TargetRelation

Represents the relation between assessments and/or targets.

Name Type Description
ref

string

The JSON pointer indicating the linked object.

relationType

TargetRelationType

The type related to the target.

TargetRelationType

The type related to the target.

Name Type Description
assessment

string

Assessment relation.

target

string

Target relation.

TemperatureMetadata

Represents the Information entity Metadata model.

Name Type Description
metadataKind string:

TemperatureMetadata

The entity Metadata object kind.

unit

TemperatureUnit

Unit of measure for temperature.

value

number

The numeric value that the extracted text denotes.

TemperatureUnit

The temperature Unit of measurement.

Name Type Description
Celsius

string

Temperature unit in Celsius

Fahrenheit

string

Temperature unit in Fahrenheit

Kelvin

string

Temperature unit in Kelvin

Rankine

string

Temperature unit in Rankine

Unspecified

string

Unspecified temperature unit

TemporalModifier

An optional modifier of a date/time instance.

Name Type Description
After

string

After a specific time

AfterApprox

string

After an approximate time

AfterMid

string

After the middle of a time period

AfterStart

string

After the start of a time period

Approx

string

Approximately at a specific time

Before

string

Before a specific time

BeforeApprox

string

Before an approximate time

BeforeEnd

string

Before the end of a time period

BeforeStart

string

Before the start of a time period

End

string

At the end of a time period

Less

string

Less than a specific time

Mid

string

In the middle of a time period

More

string

More than a specific time

ReferenceUndefined

string

Reference to an undefined time

Since

string

Since a specific time

SinceEnd

string

Since the end of a time period

Start

string

At the start of a time period

Until

string

Until a specific time

TemporalSetMetadata

A Metadata for temporal set entity instances.

Name Type Description
dateValues

DateValue[]

List of date values.

metadataKind string:

TemporalSetMetadata

The entity Metadata object kind.

TemporalSpanMetadata

represents the Metadata of a date and/or time span.

Name Type Description
metadataKind string:

TemporalSpanMetadata

The entity Metadata object kind.

spanValues

TemporalSpanValues[]

List of temporal spans detected.

TemporalSpanValues

Temporal span object.

Name Type Description
begin

string

Start value for the span.

duration

string

An optional duration value formatted based on the ISO 8601 (https://en.wikipedia.org/wiki/ISO_8601#Durations)

end

string

End value for the span.

modifier

TemporalModifier

Modifier for datetime to indicate point of reference like before, after etc.

timex

string

An optional triplet containing the beginning, the end, and the duration all stated as ISO 8601 formatted strings.

TimeMetadata

A Metadata for time entity instances.

Name Type Description
dateValues

DateValue[]

List of date values.

metadataKind string:

TimeMetadata

The entity Metadata object kind.

TokenSentimentValue

The predicted Sentiment for the sentence.

Name Type Description
mixed

string

Mixed sentiment

negative

string

Negative sentiment

positive

string

Positive sentiment

VolumeMetadata

Represents the Volume entity Metadata model.

Name Type Description
metadataKind string:

VolumeMetadata

The entity Metadata object kind.

unit

VolumeUnit

Unit of measure for volume.

value

number

The numeric value that the extracted text denotes.

VolumeUnit

The Volume Unit of measurement

Name Type Description
Barrel

string

Volume unit in barrels.

Bushel

string

Volume unit in bushels.

Centiliter

string

Volume unit in centiliters.

Cord

string

Volume unit in cords.

CubicCentimeter

string

Volume unit in cubic centimeters.

CubicFoot

string

Volume unit in cubic feet.

CubicInch

string

Volume unit in cubic inches.

CubicMeter

string

Volume unit in cubic meters.

CubicMile

string

Volume unit in cubic miles.

CubicMillimeter

string

Volume unit in cubic millimeters.

CubicYard

string

Volume unit in cubic yards.

Cup

string

Volume unit in cups.

Decaliter

string

Volume unit in decaliters.

FluidDram

string

Volume unit in fluid drams.

FluidOunce

string

Volume unit in fluid ounces.

Gill

string

Volume unit in gills.

Hectoliter

string

Volume unit in hectoliters.

Hogshead

string

Volume unit in hogsheads.

Liter

string

Volume unit in liters.

Milliliter

string

Volume unit in milliliters.

Minim

string

Volume unit in minims.

Peck

string

Volume unit in pecks.

Pinch

string

Volume unit in pinches.

Pint

string

Volume unit in pints.

Quart

string

Volume unit in quarts.

Tablespoon

string

Volume unit in tablespoons.

Teaspoon

string

Volume unit in teaspoons.

Unspecified

string

Unspecified volume unit.

WarningCodeValue

Defines the list of the warning codes.

Name Type Description
DocumentTruncated

string

Document truncated warning

LongWordsInDocument

string

Long words in document warning

WeightMetadata

Represents the Weight ) entity Metadata model.

Name Type Description
metadataKind string:

WeightMetadata

The entity Metadata object kind.

unit

WeightUnit

Unit of measure for weight.

value

number

The numeric value that the extracted text denotes.

WeightUnit

The weight Unit of measurement.

Name Type Description
Dram

string

Weight unit in drams

Gallon

string

Volume unit in gallons

Grain

string

Weight unit in grains

Gram

string

Weight unit in grams

Kilogram

string

Weight unit in kilograms

LongTonBritish

string

Weight unit in long tons (British)

MetricTon

string

Weight unit in metric tons

Milligram

string

Weight unit in milligrams

Ounce

string

Weight unit in ounces

PennyWeight

string

Weight unit in pennyweights

Pound

string

Weight unit in pounds

ShortHundredWeightUS

string

Weight unit in short hundredweights (US)

ShortTonUS

string

Weight unit in short tons (US)

Stone

string

Weight unit in stones

Ton

string

Weight unit in tons

Unspecified

string

Unspecified weight unit