Warning: BETA. This connector is a beta version.

Repustate

The Qlik Repustate connector uses the Repustate API to fetch sentiment analytics for your textual data, such as tweets, messages, or comments. The Repustate connector also lets you classify blocks of text and label parts of speech.

Note: The built-in web connectors are only available on Qlik Sense Cloud with a Cloud Business subscription.

Ways to access your data

To access the Repustate API, you need to authenticate the connector with a Repustate API key.

Creating a connection and selecting data

Loading data from tables

After you authenticate the connector with your account credentials, use the tables to fetch your data. Some tables are preconfigured to access a specific set of data while others let you create custom queries. The table below outlines some of the use cases for some of the tables that are available.

Table Description
Usage Use this table to fetch the status of the Repustate API.
Sentiment Use this table to fetch a single sentiment score for the full text.
SentimentByTopic Use this table to fetch the sentiment score for text sorted by named topics.
SentimentChunked Use this table to fetch the sentiment score for text grouped into chunks.
Categorise Use this table to fetch the sentiment score for text sorted into industry-specific categories.
PartsOfSpeech Use this table to fetch the parts of speech for each word in a block of text.
DetectLanguage Use this table to fetch the language of a block of text.
Themes Use this table to fetch the themes of a block of text.
Entities Use this table to fetch the entity classification for terms within a block of text.

To select and load data from a table, enter the required table parameters and click Preview data. Required parameters are marked with an asterisk (*). The table fields are displayed under the Data preview tab. You can select fields individually by selecting the box beside each field name. Select Insert script after you have made your selection.

Creating a connection and selecting data

Note: The Repustate API supports Arabic, Chinese, Dutch, English, French, German, Hebrew, Italian, Polish, Portuguese, Russian, Spanish, Thai, Turkish, and Vietnamese. English is the default language.

Analyzing text

The most effective way to use the Repustate connector is to have a script pass rows of data to the Repustate API to generate a new table with sentiment scores for each row of data.

Using a For/Next loop

Example:  

LET noRows = NoOfRows('Timeline');   for i=0 to $(noRows)-1 let text = Peek('text', $(i), 'Timeline');   Sentiment: LOAD score as [Sentiment.score], status as [Sentiment.status]; SELECT score, status FROM Sentiment WITH PROPERTIES ( text='$(text)', Language='en' ); next

Peek - script function

NoOfRows - chart function

 

Working with the Repustate API quota limits

The Qlik Web Connectors call the Repustate API to provide sentiment analysis on your data and load it into your Qlik Sense app. While reloading you Repustate-based app, you might receive an error message that the connector has reached the Repustate API rate limit and that all subsequent API calls will fail until the connector falls back under the throttling limit. If you receive this error message, then you have exceeded the API rate limit.

You receive an error message that you have reached the API rate limit

Reference - Repustate documentation

You can refer to the Repustate API documentation to learn more about requirements and restrictions imposed by the Repustate API.

Troubleshooting

You receive an error message that you have reached the API rate limit

Possible cause Possible cause

You have exceeded the API limits that are imposed on the Qlik Web Connectors by the Repustate API.

Proposed action Proposed action

To reduce the impact of reaching the API rate limit, develop your app with the following in mind:

  • Extract only the data you need.
  • Reload one Repustate-based application at a time.
  • Ensure that loops in your script that make API calls will not result in infinite loops.

Did this information help you?

Can you tell us why it did not help you and how we can improve it?