Microsoft Cognitive Services Text Analytics detects language, sentiment and more of the text you provide.
Status: Production |
Tier: Standard |
Version: v2.0 |
Name |
Summary |
Key Phrases (V2) |
|
Detect Language (V2) |
|
Detect Sentiment (V2) |
|
Detect Entities (V2) |
|
Named Entity Recognition (V3.0) |
|
Entity Linking (V3.0) |
|
Key Phrases (V3.0) |
|
LanguagesV3 ([Optional]string model-version, [Optional]boolean showStats, LanguageBatchInput input) |
Detect Language (V3.0) |
Sentiment (V3.0) |
|
Key Phrases |
|
DetectLanguage (LanguageInput input, [advanced][Optional]integer numberOfLanguagesToDetect) |
Detect Language |
Detect Sentiment |
|
Key Phrases |
|
Detect Language |
|
Detect Sentiment |
|
Entities |
|
Test Connection |
Name |
Summary |
Name |
Summary |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Summary: Key Phrases (V2)
Description: Returns a list of strings denoting the key talking points in the input text for each document.
Syntax:
TextAnalytics.KeyPhrasesV3 (MultiLanguageInputs input)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
input |
|
|
True |
Returns:
Type:KeyPhraseResults
Summary: Detect Language (V2)
Description: Returns the detected language and a numeric score between 0 and 1 for each document. Scores close to 1 indicate 100% certainty that the identified language is true. A total of 120 languages are supported.
Syntax:
TextAnalytics.DetectLanguageV3 (LanguageInputs input)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
input |
|
|
True |
Returns:
Type:LanguageResults
Summary: Detect Sentiment (V2)
Description: Returns a numeric score between 0 and 1 for each document. Scores close to 1 indicate positive sentiment, while scores close to 0 indicate negative sentiment.
Syntax:
TextAnalytics.DetectSentimentV3 (MultiLanguageInputs input)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
input |
|
|
True |
Returns:
Type:SentimentResults
Summary: Detect Entities (V2)
Description: Returns a list of known entities and general named entities ("Person", "Location", "Organization" etc) in a given document.
Syntax:
TextAnalytics.DetectEntitiesV2 (MultiLanguageInputs input)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
input |
|
|
True |
Returns:
Type:EntitiesResults
Summary: Named Entity Recognition (V3.0)
Description: The API returns a list of general named entities in a given document. For the list of supported entity types, check <a href="https://aka.ms/taner">Supported Entity Types in Text Analytics API</a>. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages.
Syntax:
TextAnalytics.EntitiesRecognitionGeneralV3 ([Optional]string model-version, [Optional]boolean showStats, MultiLanguageBatchInput input)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
model-version |
string (Model Version) |
(Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. |
False |
|
showStats |
boolean (Show Statistics) |
(Optional) if set to true, response will contain input and document level statistics. |
False |
|
input |
|
Contains a set of input documents to be analyzed by the service. |
True |
Returns:
Type:EntitiesResultV3
Summary: Entity Linking (V3.0)
Description: The API returns a list of recognized entities with links to a well-known knowledge base. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages.
Syntax:
TextAnalytics.EntitiesLinkingV3 ([Optional]string model-version, [Optional]boolean showStats, MultiLanguageBatchInput input)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
model-version |
string (Model Version) |
(Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. |
False |
|
showStats |
boolean (Show Statistics) |
(Optional) if set to true, response will contain input and document level statistics. |
False |
|
input |
|
Contains a set of input documents to be analyzed by the service. |
True |
Returns:
Type:EntityLinkingResult
Summary: Key Phrases (V3.0)
Description: The API returns a list of strings denoting the key phrases in the input text. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages.
Syntax:
TextAnalytics.KeyPhraseV3 ([Optional]string model-version, [Optional]boolean showStats, MultiLanguageBatchInput input)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
model-version |
string (Model Version) |
(Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. |
False |
|
showStats |
boolean (Show Statistics) |
(Optional) if set to true, response will contain input and document level statistics. |
False |
|
input |
|
Contains a set of input documents to be analyzed by the service. |
True |
Returns:
Type:KeyPhraseResultV3
Summary: Detect Language (V3.0)
Description: The API returns the detected language and a numeric score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages.
Syntax:
TextAnalytics.LanguagesV3 ([Optional]string model-version, [Optional]boolean showStats, LanguageBatchInput input)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
model-version |
string (Model Version) |
(Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. |
False |
|
showStats |
boolean (Show Statistics) |
(Optional) if set to true, response will contain input and document level statistics. |
False |
|
input |
|
|
True |
Returns:
Type:LanguageResultV3
Summary: Sentiment (V3.0)
Description: The API returns a sentiment prediction, as well as sentiment scores for each sentiment class (Positive, Negative, and Neutral) for the document and each sentence within it. See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled languages.
Syntax:
TextAnalytics.SentimentV3 ([Optional]string model-version, [Optional]boolean showStats, MultiLanguageBatchInput input)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
model-version |
string (Model Version) |
(Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. |
False |
|
showStats |
boolean (Show Statistics) |
(Optional) if set to true, response will contain input and document level statistics. |
False |
|
input |
|
Contains a set of input documents to be analyzed by the service. |
True |
Returns:
Type:SentimentResponse
Summary: Key Phrases
Description: Returns a list of strings denoting the key talking points in the input text. Currently, the following languages are supported: English, German, Spanish and Japanese.
Syntax:
TextAnalytics.KeyPhrases (MultiLanguageInput input)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
input |
|
|
True |
Returns:
Type:KeyPhraseResult
Summary: Detect Language
Description: Returns the detected language and a numeric score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. A total of 120 languages are supported.
Syntax:
TextAnalytics.DetectLanguage (LanguageInput input, [advanced][Optional]integer numberOfLanguagesToDetect)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
input |
|
|
True |
|
numberOfLanguagesToDetect |
integer(int32) (Number of languages) |
The number of languages to detect. Set to 1 by default. |
False |
Returns:
Type:LanguageResult
Summary: Detect Sentiment
Description: Returns a numeric score between 0 and 1. Scores close to 1 indicate positive sentiment, while scores close to 0 indicate negative sentiment. Currently, the following languages are supported: English, Spanish, French, Portuguese.
Syntax:
TextAnalytics.DetectSentiment (MultiLanguageInput input)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
input |
|
|
True |
Returns:
Type:SentimentResult
Summary: Key Phrases
Description: Returns a list of strings denoting the key talking points in the input text.
Syntax:
TextAnalytics.KeyPhrasesV2 (MultiLanguageInput input)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
input |
|
|
True |
Returns:
Type:KeyPhraseResult
Summary: Detect Language
Description: Returns the detected language and a numeric score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. A total of 120 languages are supported.
Syntax:
TextAnalytics.DetectLanguageV2 (LanguageInput input)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
input |
|
|
True |
Returns:
Type:LanguageResult
Summary: Detect Sentiment
Description: Returns a numeric score between 0 and 1. Scores close to 1 indicate positive sentiment, while scores close to 0 indicate negative sentiment.
Syntax:
TextAnalytics.DetectSentimentV2 (MultiLanguageInput input)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
input |
|
|
True |
Returns:
Type:SentimentResult
Summary: Entities
Description: Returns a list of known entities and general named entities ("Person", "Location", "Organization" etc) in a given document.
Syntax:
TextAnalytics.DetectEntities (MultiLanguageInput input)
Parameters:
Name |
Type |
Summary |
Required |
Related Action |
input |
|
|
True |
Returns:
Type:EntitiesResult
Summary: Test Connection
Description: Tests the connection
Syntax:
TextAnalytics.TestConnection ()
Returns:
Summary:
Description:
Properties:
Name |
Type |
Summary |
name |
string
|
Long name of a detected language (e.g. English, French). |
iso6391Name |
string
|
A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr). |
confidenceScore |
number(double)
|
A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
name |
string Name |
The long name of a detected language (e.g. English, French). |
iso6391Name |
string Language Code |
A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr). |
score |
number(double) Score |
A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
id |
string
|
Unique, non-empty document identifier. |
entities |
array of (Entity)
|
Recognized entities in the document. |
warnings |
array of (TextAnalyticsWarning)
|
Warnings encountered while processing document. |
statistics |
|
if showStats=true was specified in the request this field will contain information about the document payload. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
id |
string
|
Document Id. |
error |
|
|
Summary:
Description:
Properties:
Name |
Type |
Summary |
id |
string
|
Unique, non-empty document identifier. |
keyPhrases |
array of (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. |
warnings |
array of (TextAnalyticsWarning)
|
Warnings encountered while processing document. |
statistics |
|
if showStats=true was specified in the request this field will contain information about the document payload. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
id |
string
|
Unique, non-empty document identifier. |
detectedLanguage |
|
|
warnings |
array of (TextAnalyticsWarning)
|
Warnings encountered while processing document. |
statistics |
|
if showStats=true was specified in the request this field will contain information about the document payload. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
id |
string
|
Unique, non-empty document identifier. |
entities |
array of (LinkedEntity)
|
Recognized well-known entities in the document. |
warnings |
array of (TextAnalyticsWarning)
|
Warnings encountered while processing document. |
statistics |
|
if showStats=true was specified in the request this field will contain information about the document payload. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
id |
string
|
Unique, non-empty document identifier. |
sentiment |
string
|
Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). Values: [positive, neutral, negative, mixed] |
statistics |
|
if showStats=true was specified in the request this field will contain information about the document payload. |
confidenceScores |
SentimentConfidenceScorePerLabel
|
Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative. |
sentences |
array of (SentenceSentiment)
|
Sentence level sentiment analysis. |
warnings |
array of (TextAnalyticsWarning)
|
Warnings encountered while processing document. |
Summary:
Description: if showStats=true was specified in the request this field will contain information about the document payload.
Properties:
Name |
Type |
Summary |
charactersCount |
integer(int32)
|
Number of text elements recognized in the document. |
transactionsCount |
integer(int32)
|
Number of transactions for the document. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
entities |
array of (EntitiesItem) Entities |
A list of disambiguated entities with links to more information on the web (Wikipedia and Bing). |
id |
string Id |
The unique document identifier. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
name |
string Name |
Name of the entity. |
matches |
array of (MatchesItem) Matches |
A list of matches for the entity. |
wikipediaLanguage |
string Wikipedia Language |
Wikipedia language of the entity. |
wikipediaId |
string Wikipedia Id |
Wikipedia Id of the entity. |
wikipediaUrl |
string Wikipedia Url |
Wikipedia url of the entity. |
bingId |
string Bing Id |
Bing Id of the entity. |
type |
string Type |
Type of the entity. |
subType |
string Subtype |
Subtype of the entity. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
Summary:
Description:
Properties:
Name |
Type |
Summary |
documents |
array of (EntitiesResult)
|
|
Summary:
Description:
Properties:
Name |
Type |
Summary |
documents |
array of (DocumentEntities)
|
Response by document |
errors |
array of (DocumentError)
|
Errors by document id. |
statistics |
|
if showStats=true was specified in the request this field will contain information about the request payload. |
modelVersion |
string
|
This field indicates which model is used for scoring. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
text |
string
|
Entity text as appears in the request. |
category |
string
|
Entity type, such as Person/Location/Org/SSN etc |
subcategory |
string
|
Entity sub type, such as Age/Year/TimeRange etc |
offset |
integer(int32)
|
Start position (in Unicode characters) for the entity text. |
length |
integer(int32)
|
Length (in Unicode characters) for the entity text. |
confidenceScore |
number(double)
|
Confidence score between 0 and 1 of the extracted entity. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
documents |
array of (DocumentLinkedEntities)
|
Response by document |
errors |
array of (DocumentError)
|
Errors by document id. |
statistics |
|
if showStats=true was specified in the request this field will contain information about the request payload. |
modelVersion |
string
|
This field indicates which model is used for scoring. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
code |
string
|
Error code. Values: [invalidParameterValue, invalidRequestBodyFormat, emptyRequest, missingInputRecords, invalidDocument, modelVersionIncorrect, invalidDocumentBatch, unsupportedLanguageCode, invalidCountryHint] |
message |
string
|
Error message. |
details |
|
Error details. |
target |
string
|
Error target. |
innererror |
|
|
Summary:
Description: Error details.
Properties:
Name |
Type |
Summary |
Summary:
Description:
Properties:
Name |
Type |
Summary |
keyPhrases |
array of (string) Key Phrases |
A list of representative words or phrases. The number of key phrases returned is proportional to the number of words in the input document. |
id |
string Id |
The unique document identifier. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
documents |
array of (KeyPhraseResult)
|
|
Summary:
Description:
Properties:
Name |
Type |
Summary |
documents |
array of (DocumentKeyPhrases)
|
Response by document |
errors |
array of (DocumentError)
|
Errors by document id. |
statistics |
|
if showStats=true was specified in the request this field will contain information about the request payload. |
modelVersion |
string
|
This field indicates which model is used for scoring. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
documents |
array of (LanguageInputV3)
|
|
Summary:
Description:
Properties:
Name |
Type |
Summary |
text |
string Text |
The text to analyze. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
documents |
array of (LanguageInputV2)
|
|
Summary:
Description:
Properties:
Name |
Type |
Summary |
id |
string Id |
Unique, non-empty document identifier. |
text |
string Text |
The text to analyze. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
id |
string
|
Unique, non-empty document identifier. |
text |
string
|
|
countryHint |
string
|
|
Summary:
Description:
Properties:
Name |
Type |
Summary |
id |
string Id |
The unique document identifier. |
detectedLanguages |
array of (DetectedLanguageV2)
|
A list of extracted languages. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
documents |
array of (LanguageResult)
|
|
Summary:
Description:
Properties:
Name |
Type |
Summary |
documents |
array of (DocumentLanguage)
|
Response by document |
errors |
array of (DocumentError)
|
Errors by document id. |
statistics |
|
if showStats=true was specified in the request this field will contain information about the request payload. |
modelVersion |
string
|
This field indicates which model is used for scoring. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
name |
string
|
Entity Linking formal name. |
matches |
array of (Match)
|
List of instances this entity appears in the text. |
language |
string
|
Language used in the data source. |
id |
string
|
Unique identifier of the recognized entity from the data source. |
url |
string
|
URL for the entity's page from the data source. |
dataSource |
string
|
Data source used to extract entity linking, such as Wiki/Bing etc. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
confidenceScore |
number(double)
|
If a well-known item is recognized, a decimal number denoting the confidence level between 0 and 1 will be returned. |
text |
string
|
Entity text as appears in the request. |
offset |
integer(int32)
|
Start position (in Unicode characters) for the entity match text. |
length |
integer(int32)
|
Length (in Unicode characters) for the entity match text. |
Summary:
Description: Contains a set of input documents to be analyzed by the service.
Properties:
Name |
Type |
Summary |
documents |
array of (MultiLanguageInputV3)
|
The set of documents to process as part of this batch. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
text |
string Text |
The text to analyze. |
language |
string Language |
This is the 2 letter ISO 639-1 representation of a language. For example, use "en" for English; "es" for Spanish etc., Values: [da, de, en, es, fi, fr, it, ja, nl, no, pl, pt, ru, sv] |
Summary:
Description:
Properties:
Name |
Type |
Summary |
documents |
array of (MultiLanguageInputV2)
|
|
Summary:
Description:
Properties:
Name |
Type |
Summary |
id |
string Id |
Unique, non-empty document identifier. |
text |
string Text |
The text to analyze. |
language |
string Language |
This is the 2 letter ISO 639-1 representation of a language. For example, use "en" for English; "es" for Spanish etc., Values: [da, de, en, es, fi, fr, it, ja, nl, no, pl, pt, ru, sv] |
Summary:
Description: Contains an input document to be analyzed by the service.
Properties:
Name |
Type |
Summary |
id |
string
|
A unique, non-empty document identifier. |
text |
string
|
The input text to process. |
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. |
Summary:
Description: if showStats=true was specified in the request this field will contain information about the request payload.
Properties:
Name |
Type |
Summary |
documentsCount |
integer(int32)
|
Number of documents submitted in the request. |
validDocumentsCount |
integer(int32)
|
Number of valid documents. This excludes empty, over-size limit or non-supported languages documents. |
erroneousDocumentsCount |
integer(int32)
|
Number of invalid documents. This includes empty, over-size limit or non-supported languages documents. |
transactionsCount |
integer(int64)
|
Number of transactions for the request. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
text |
string
|
The sentence text. |
sentiment |
string
|
The predicted Sentiment for the sentence. Values: [positive, neutral, negative] |
confidenceScores |
SentimentConfidenceScorePerLabel
|
Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative. |
offset |
integer(int32)
|
The sentence offset from the start of the document. |
length |
integer(int32)
|
The length of the sentence by Unicode standard. |
Summary:
Description: Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative.
Properties:
Name |
Type |
Summary |
positive |
number(double)
|
|
neutral |
number(double)
|
|
negative |
number(double)
|
|
Summary:
Description:
Properties:
Name |
Type |
Summary |
documents |
array of (DocumentSentiment)
|
Sentiment analysis per document. |
errors |
array of (DocumentError)
|
Errors by document id. |
statistics |
|
if showStats=true was specified in the request this field will contain information about the request payload. |
modelVersion |
string
|
This field indicates which model is used for scoring. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
score |
number(double) Score |
A decimal number between 0 and 1 denoting the sentiment of the document. A score above 0.7 usually refers to a positive document while a score below 0.3 normally has a negative connotation. Mid values refer to neutral text. |
id |
string Id |
The unique document identifier. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
documents |
array of (SentimentResult)
|
|
Summary:
Description:
Properties:
Name |
Type |
Summary |
code |
string
|
Error code. Values: [invalidRequest, invalidArgument, internalServerError, serviceUnavailable] |
message |
string
|
Error message. |
target |
string
|
Error target. |
innererror |
|
|
details |
array of (TextAnalyticsError)
|
Details about specific errors that led to this reported error. |
Summary:
Description:
Properties:
Name |
Type |
Summary |
code |
string
|
Error code. Values: [LongWordsInDocument, DocumentTruncated] |
message |
string
|
Warning message. |
targetRef |
string
|
A JSON pointer reference indicating the target object. |