The Implementation section explains the process of testing Text Analytics in the Catalyst console. Refer to the Java SDK, Node.js SDK, Python SDK and API help pages for help on implementing Text Analytics in your code.

The Text Analytics component in the console processes your text and delivers results for all three features: Sentiment Analysis, NER, and Keyword Extraction by default. You can view individual responses for each feature, and a common JSON response for all three features.

Access Text Analytics in the Console

You can access Text Analytics for your project in the Catalyst console in the following way:

  1. Navigate to Zia Services in the left pane of the Catalyst console and click Text Analytics.


  2. Click Try a Demo in the Text Analytics feature page.

Test Text Analytics in the Console

You can test Text Analytics by either selecting an existing sample text, or by providing your own text.

You can pass a block of text of upto 1500 characters to process for Text Analytics.

To process an existing sample text and obtain the results:

  1. Click Get Sample Text in the window.

  2. Select a sample text of your choice from the ones shown in the window.

  3. You can additionally provide optional keywords in the text for Sentiment Analysis. This will enable Sentiment Analysis to process only those sentences that contain these keywords, and determine their sentiments. Other sentences will be ignored.

    Enter the keys, then click Proceed.

Catalyst will process the text for all three features and display the visual and JSON responses for them. Let’s discuss the response of each feature.

Sentiment Analysis:

The results of the Sentiment Analysis contain the sentiments recognized in each sentence of the text. As mentioned earlier, the visual response presents the range of accuracy of the sentiments in percentages.


You can navigate to a sentence either by clicking on it from the text window, or by clicking the arrow marks in the result window displaying each sentence.


The overall sentiment and accuracy of the entire text are also displayed in the results window.

If you provided any optional keywords for Sentiment Analysis, you can also view all the keywords from the dropdown above, and select one to process the text for. The sentiments will be analyzed only in the sentences that contain that keyword.

You can click Edit Keyword to modify a keyword.

Named Entity Recognition:

The results of Named Entity Recognition contain the list of all entities recognized in the text, and the categories they are classified into, along with the confidence score of each classification in percentages.


You can navigate between the entities by clicking on the recognized entity, indicated in grey, in the text window, or by clicking the entity displayed in the results section.

You can also filter the results by a specific entity category using the filter drop-down above. Select a category to view the entities that are grouped into it.


Keyword Extraction:

The result section of Keyword Extraction displays a list of keywords and keyphrases extracted from the text that provide highlights of the content.


You can navigate between the keywords and keyphrases by clicking on them in the text window, or from the results section.

The results section also contains options for you to edit the text that you want to process, or select a different existing sample text at the bottom. Clicking Edit Text will open a text window, where you modify or enter your own text. We will discuss at the end of this section.

You can view the JSON response of this Text Analytics by clicking View Response.


This will open a window with the JSON response that includes the results of all three features.


You can check a full sample JSON response of each feature from the API documentation.

You can provide your own text for Text Analytics processing in the following way:

  1. Click Enter Text from the Text Analytics page.


  2. Enter your own text in the window, then click Confirm.


  3. Enter the optional keywords for Sentiment Analysis if you need, then click Proceed. Refer to the previous section on processing a sample text for details about this.


Catalyst will process your text for all three features, and display the visual and JSON responses for them, in the same manner as discussed in the sample text section.


You can check the results for all the features, and the JSON response, in the same way.

Access Code Templates for Text Analytics

As mentioned in the introduction, you can implement Text Analytics in your Catalyst application in the Java, Node.js and Python platforms. The console provides the code templates for both these platforms, below the test window.

Click the required tab and copy the code using the copy icon. You can include this code in your web or mobile application’s source.

In the Java code, the text to be processed for all three Text Analytics feature is passed as a JSON Array to getTextAnalytics(), along with the optional keywords to perform Sentiment Analysis on. The response returns the results of each Text Analytics feature in their own format. Refer to the Java SDK documentation for more details on the Java code.


The Node.js code references the zia component instance and also passes the text to be processed to getTextAnalytics(). You can pass the optional keywords to perform Sentiment Analysis on, in a similar way. You can write your own processing logic and error logic. The response returns the results of each Text Analytics feature in their own format. Refer to the Node.js SDK documentation for more details on the Node.js code.


Refer to the Python SDK documentation for more details on the Python code.


Last Updated 2023-08-25 16:55:27 +0530 +0530