Skip to main content Skip to complementary content

MeaningCloud

The Qlik MeaningCloud connector uses the Sentiment Analysis API to fetch the sentiment score and other sentiment-related information for plain text. This includes information like subjectivity, irony, and agreement.

Information noteThis MeaningCloud connector is only available in Qlik Sense SaaS. For the client managed version, see Qlik Web Connectors: MeaningCloud.

Supported offerings

  • Qlik Sense Business
  • Qlik Sense Enterprise SaaS

Ways to access your data

To access your MeaningCloud data you need to authenticate the connector with your MeaningCloud API key, which is the same as your license key. You also need to select the correct maximum requests per second, based on your MeaningCloud subscription level.

Loading data from tables

Tables that can be loaded
Table Description
SentimentOverall Use this table to fetch sentiment data for the overall text.
SentimentBySentence Use this table to fetch sentiment data for each sentence.
SentimentByEntity Use this table to fetch sentiment data about entities that are extracted from your text.
SentimentByConcept Use this table to fetch sentiment data about concepts that are extracted from your text.
Information noteThe MeaningCloud Sentiment Analysis API supports Catalan, English, French, Italian, Portuguese, and Spanish.

Table parameters

Before running a table to return sentiment analysis for your text, you must configure the request type by setting the table parameters.

Table request parameters
Parameter Description
URL to content Enter the URL for the text that you want to analyze. Only non-authenticated HTTP and FTP are supported.
Text content Type the text that you want to analyze. You cannot enter text and use URL to content simultaneously.
Text type Plain text or markup. If you are analyzing text with markup, such as HTML or XML, select markup to prevent analyzing markup tags.
Language

Select the language or leave as default to automatically detect the language. If you are analyzing short strings, we recommend selecting the text language.

Sentiment model To learn about the MeaningCloud sentiment models, see How do sentiment models work?
Expand global polarity If you choose to enable this parameter, less weight is applied to syntactic relationships.

Responses

To learn more about the specific responses that the tables return, see Response.

Analyzing text

The most effective way to use the MeaningCloud connector is to have a script pass rows of data to the MeaningCloud 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 TextEncoded = Peek('text_urlEncoded', $(i), 'Timeline'); MeaningCloudConnector_Sentiment_Overall: LOAD status as SentimentOverall_status, status_info as SentimentOverall_status_info, model as SentimentOverall_model, score_tag as SentimentOverall_score_tag, score_tag_expanded as SentimentOverall_score_tag_expanded, agreement as SentimentOverall_agreement, subjectivity as SentimentOverall_subjectivity, confidence as SentimentOverall_confidence, irony as SentimentOverall_irony FROM [$(vQwcConnectionName)] (URL IS [http://localhost:5555/data?connectorID=TextAnalyser_MeaningCloudConnector&table=SentimentOverall&text=$(TextEncoded)&txtf=plain&lang=auto&egp=n&appID=], qvx); next

Peek - script function

NoOfRows - chart function

Text is not URL encoded

If you are using text data from a source which is not already URL encoded, you can write a script that encodes the text before sending it to the sentiment analyzer.

Sub fEncodeText(str) str=replace(str, '%', '%25'); // should be first str=replace(str, '#', '%23'); str=replace(str, ' ', '%20'); str=replace(str, '$', '%24'); str=replace(str, '&', '%26'); str=replace(str, '+', '%2B'); str=replace(str, ',', '%2C'); str=replace(str, '/', '%2F'); str=replace(str, '\', '%5C'); str=replace(str, ':', '%3A'); str=replace(str, ';', '%3B'); str=replace(str, '=', '%3D'); str=replace(str, '?', '%3F'); str=replace(str, '@', '%40'); str=replace(str, '[', '%5B'); str=replace(str, ']', '%5D'); str=replace(str, '>', '%3E'); str=replace(str, '<', '%3C'); str=replace(str, chr(10), '%0A'); // Line feed. str=replace(str, chr(39), '%27'); // 39 Apostrophe EncodedText=str; End sub LET noRows = NoOfRows('Timeline'); for i=0 to $(noRows)-1 LET EncodedText=""; LET TextNotEncoded = Peek('text', $(i), 'Timeline'); CALL fEncodeText('$(TextNotEncoded)'); MeaningCloudConnector_SentimentOverall: LOAD status as SentimentOverall_status, status_info as SentimentOverall_status_info, model as SentimentOverall_model, score_tag as SentimentOverall_score_tag, score_tag_expanded as SentimentOverall_score_tag_expanded, agreement as SentimentOverall_agreement, subjectivity as SentimentOverall_subjectivity, confidence as SentimentOverall_confidence, irony as SentimentOverall_irony FROM [$(vQwcConnectionName)] (URL IS [http://localhost:5555/data?connectorID=TextAnalyser_MeaningCloudConnector&table=SentimentOverall&text=$(EncodedText)&txtf=plain&lang=auto&egp=n], qvx); next
Information note URL encoding should be done using UTF-8.

Peek - script function

NoOfRows - chart function

Working with the MeaningCloud API quota limits

The Qlik Web Connectors use the MeaningCloud API to extract data from MeaningCloud and load it into your Qlik Sense app. While reloading you MeaningCloud-based app, you might receive an error message that the connector has reached the MeaningCloud 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 one of the API rate limits.

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

Reference - MeaningCloud developer documentation

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

Troubleshooting

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

Possible cause

You have exceeded the API limits imposed by your MeaningCloud API Key.

Proposed action

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

  • Extract only the data you need.
  • Reload one MeaningCloud-based application at a time.
  • Ensure that loops in your script that make API calls will not result in infinite loops.
Tip noteWhen creating your MeaningCloud data connection, ensure that you chose the correct maximum requests per second for your MeaningCloud subscription level.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!