Text Analytics Library Objects
This topic provides information about the Text Analytics library functions using the Microsoft Text Analytics service and Google Text Analytics services
For more information about working with the Microsoft Text Analytics and Google Text Analytics, see Using Text Analytics Functions.
Microsoft Text Analytics
Microsoft Text Analytics Library uses Microsoft’s Text Analytics service that allows natural language processing over input text and provide Sentiment Analysis, Entity Recognition, and Key Phrase Extraction functions.
The business entities of Microsoft Text Analytics are exposed under Business Entities > Library Types > MS Text Analytics.
The functions and events are exposed under Project > References > Library References > Direct.TextAnalytics.Library > MS Text Analytics.
Prerequisites
An active Microsoft Azure account. If you do not have an account, use Create Microsoft Azure account to create an account.
An active internet connection on your machine.
The API key and End Point for a Text Analysis resource. Create an instance of MS Client Credential, and enter the API key, the End Point, and the Timeout value.
If the Timeout value is entered as 0 seconds, then the system will use the default value as 30 seconds.
Microsoft Endpoints are specific to region. See Microsoft Endpoints to find the endpoint for your region.
See Language list for the languages supported for each function.
See Data Limits for character restrictions and usage limits on MS Text Analytics functions

Recognizes the named entities present in the input text. Assign the output of this function to MS Entity Response object.
Parameter | Input | Description |
---|---|---|
MS Client Credential |
- |
MS Client Credential object that contain the API Key and End Point. |
Language Code |
Text |
Code of the language of the input text. See the Language list and code for the supported languages in this function. |
Input Text |
Text |
Text for entity recognition. |
To perform further analysis on the recognized entities, create an instance of MS Entity and MS Match Record each, and use the returned data present in the respective variables of the instances created.
Returns
Returns the recognized entities as list of MSEntity. See Entity Recognition in Text Analytics.

Analyzes the input text and returns a sentiment score. The sentiment score ranges from 0 (negative) to 1 (positive). Assign the output of this function to MS Sentiment Response object.
Parameter | Input | Description |
---|---|---|
MS Client Credential |
- |
MS Client Credential object that contain the API Key and End Point. |
Language Code |
Text |
Code of the language of the input text. See the Language list and code for the supported languages in this function. |
Input Text |
Text |
Text for sentiment analysis. |
Returns
Returns the sentiment score as decimal.

Extracts the key phrases present in the input text. Assign the output of this function to MS Key Phrase Response object.
Parameter | Input | Description |
---|---|---|
MS Client Credential |
- |
MS Client Credential object that contain the API Key and End Point. |
Language Code |
Text |
Code of the language of the input text. See the Language list and code for the supported languages in this function. |
Input Text |
Text |
Text for key phrase extraction. |
Returns
Returns the extracted phrases as list of MS Key Phrase.
Google Text Analytics
Google Text Analytics Library uses Google’s Natural Language service to process input text and provide Sentiment Analysis, Entity Recognition, Entity Sentiment Analysis, Text Translation, and Content Classification functions.
The Business Entities of the Google Text Analytics are exposed under Business Entities > Library Types > Google Text Analytics.
The functions and events are exposed under Project > References > Library References > Direct.TextAnalytics.Library > Google Text Analytics.
Prerequisites
An active Google Cloud account. If you do not have an account, use Create Google Cloud Account to create an account.
An active internet connection on your machine.
The API key and End Point for a Text Analysis service. Create an instance of Google Client Credential and enter the API key, the End Point, and the Timeout.
API key for Text Translate function is in text format. API Key for other functions is in JSON format.
If the endpoint is empty, then the default endpoint language.googleapis.com:443 will be used.
If the Timeout value is entered as 0 seconds, then the system will use the default value as 30 seconds.
See the supported language list of Google Text Analytics functions and Google Text Translation function.
See Text Analytics Quotas and Limits and Text Translation Quotas and Limits for restrictions and usage quotas on Google Text Analytics functions.

Recognizes the named entities present in the input text. Assign the output of this function to Google Entity Response object.
Parameter | Input | Description |
---|---|---|
Google Client Credential |
- |
Google Client Credential object that contain the API Key, the End Point, and the Timeout. |
Text Type |
Text |
Type of text in input text. This function support Plain and HTML text types. If this parameter is empty, Designer assigns text type as Plain. If the Input Text is in Plain and Text Type is entered as HTML, Google identifies the correct text type and overrides the entered text type or vice versa. |
Encoding Type |
Text |
Type of encoding in input text. This function support UTF8, UTF16, and UTF32 encoding types. If this parameter is empty, Designer assigns encoding type as None. |
Input Text |
Text |
Text for entity recognition. |
To perform further analysis on the recognized entities, create an instance of Google Entity, Google Entity Mention, and Google Text Span each. Assign the values from Google Entity Response object to the instances created.
Returns
Returns the recognized entities as list of GoogleEntity with Text Span and Salience. See Entity Analysis.

Analyzes the input text and returns a sentiment score. The sentiment score ranges from -1 (negative) to 1 (positive). Assign the output of this function to Google Sentiment Response object.
Parameter | Input | Description |
---|---|---|
Google Client Credential |
- |
Google Client Credential object that contain the API Key, the End Point, and the Timeout. |
Text Type |
Text |
Type of text in input text. This function support Plain and HTML text types. If this parameter is empty, Designer assigns text type as Plain. If the Input Text is in Plain and Text Type is entered as HTML, Google identifies the correct text type and overrides the entered text type or vice versa. |
Encoding Type |
Text |
Type of encoding in input text. This function support UTF8, UTF16, and UTF32 encoding types. If this parameter is empty, Designer assigns encoding type as None. |
Input Text |
Text |
Text for entity recognition. |
To perform further analysis on the recognized sentiment scores, create an instance of Google Sentence and Google Sentiment each. Assign the values from Google Sentiment Response object to the instances created.
Returns
Returns the sentiment score and magnitude values as decimal. See Sentiment Analysis.

Recognizes the named entity present in the input text and provides a sentiment score of each entity recognized. Assign the output of this function to Google Entity Response object.
Parameter | Input | Description |
---|---|---|
Google Client Credential |
- |
Google Client Credential object that contain the API Key, the End Point, and the Timeout. |
Text Type |
Text |
Type of text in input text. This function support Plain and HTML text types. If this parameter is empty, Designer assigns text type as Plain. If the Input Text is in Plain and Text Type is entered as HTML, Google identifies the correct text type and overrides the entered text type or vice versa. |
Encoding Type |
Text |
Type of encoding in input text. This function support UTF8, UTF16, and UTF32 encoding types. If this parameter is empty, Designer assigns encoding type as None. |
Input Text |
Text |
Text for entity recognition. |
To perform further analysis on the recognized entities and sentiment scores, create an instance of Google Entity, Google Entity Mention, Google Sentiment, Google Entity Sentiment, and Google Text Span each. Assign the values from Google Entity Response object to the instances created.
Returns
Returns the GoogleEntity, and its sentiment and magnitude scores as list of GoogleEntities. See Entity Sentiment Analysis.

Classifies the input text into categories. Assign the output of this function to Google Classify Text Response object.
Parameter | Input | Description |
---|---|---|
Google Client Credential |
- |
Google Client Credential object that contain the API Key, the End Point, and the Timeout. |
Text Type |
Text |
Type of text in input text. This function support Plain and HTML text types. If this parameter is empty, Designer assigns text type as Plain. If the Input Text is in Plain and Text Type is entered as HTML, Google identifies the correct text type and overrides the entered text type or vice versa. |
Input Text |
Text |
Text for entity recognition. |
To perform further analysis on the recognized categories, create an instance of Google Text Classification Category. Assign the values from Google Classify Text Response object to the instance created.
Returns
Returns the classified categories as list of text. See Categories.

Translates the input text to a target language. See Quotas and Limits for restrictions and usage quotas on Text Translation functions.
Parameter | Input | Description |
---|---|---|
API Key |
Text |
API key of Google Cloud. The API key for this function is in text format. |
Text Type |
Text |
Type of text in input text. This function support Plain and HTML text types. If this parameter is empty, Designer assigns text type as Plain. If the Input Text is in Plain and Text Type is entered as HTML, Google identifies the correct text type and overrides the entered text type or vice versa. |
Source Language Code |
Text |
Code of the language of input text. See the Language list and code for the languages supported in this function. If the Input Text is in English(en) language and Source language Code is entered as Chinese(zh), google identifies the correct Source Language Code and overrides it. |
Target Language Code |
Text |
Target code of the language for translation. See the Language list and code for the languages supported in this function. |
Timeout |
Number |
Time out value. If the Timeout value is entered as 0 seconds, then the system will use the default value as 30 seconds. |
Input Text |
Text |
Text for text translation. |
Returns
Returns the translated text as text.