MeaningCloud

The Qlik MeaningCloud connector uses the Sentiment Analysis API to fetch the sentiment score for a text. The Sentiment Analysis API returns other sentiment information such as, subjectivity, irony, and agreement.

Note:

In previous versions of the Qlik Web Connectors, the MeaningCloud API was accessible through the Sentiment and Text Analytics Connector.

Ways to access your data

To access your MeaningCloud data, you need to authenticate the connector with your MeaningCloud API key. Your MeaningCloud API key is the same as your license key.

Loading data from tables

Table Description
Sentiment Use this table to fetch a single sentiment score for the full text.
Note: The MeaningCloud Sentiment Analysis API supports Catalan, English, French, Italian, Portuguese, Spanish. The language of the text is detected automatically.

Response

The table returns the following information:

Response Value Possible values

status

Shows the status of the API call.

OK

ERROR

status_info    
model Shows the extraction model and language. The extraction model is always general.

_en

_ca

_es

_fr

_pt

_it

score_tag Shows the global sentiment score of the text.

P+

P

NEU

N

N+

NONE

agreement Shows the agreement of sentiment among the parts of the text.

AGREEMENT

DISAGREEMENT

subjectivity Shows whether the text is subjective or objective.

OBJECTIVE

SUBJECTIVE

confidence Shows the confidence of the sentiment analysis. Integer from 0-100.
irony Shows whether the text was analyzed as ironic.

NONIRONIC

IRONIC

length Shows the character length of the text. Integer

Using the Sentiment table to get sentiment data for comments

The most effective way to use the MeaningCloud Connector is to pass data from a table into to the MeaningCloud Connector to produce a new table with the connector results. The example script below loads a table from an xlsx file, passes rows of data into the MeaningCloud connector, and produces a new table.

Example:  

LOAD comment, handle FROM [lib://AttachedFiles/comments.xlsx] (ooxml, embedded labels, table is Sheet1); LET noRows = NoOfRows('Sheet1'); for i=0 to $(noRows)-1 let comment = Peek('comment', $(i), 'Sheet1'); let handle = Peek('handle', $(i), 'Sheet1'); MeaningCloudConnector_Sentiment: LOAD status as Sentiment_status, status_info as Sentiment_status_info, model as Sentiment_model, score_tag as Sentiment_score_tag, agreement as Sentiment_agreement, subjectivity as Sentiment_subjectivity, confidence as Sentiment_confidence, irony as Sentiment_irony, length as Sentiment_length, '$(comment)' as comment, // include original table columns in new table '$(handle)' as handle // include original table columns in new table FROM [http://localhost:5555/data?connectorID=TextAnalyser_MeaningCloudConnector&table=Sentiment&text=$(comment)&appID=&loadAccessToken=1h7jh3i6h3o7k] (qvx); next //remove original table from memory drop table Sheet1;

When you load data with a script like the one above, you should see one table called MeaningCloudConnector_Sentiment that has all of the MeaningCloud sentiment fields plus the two columns from the original data table. The original table that is used to pass data into the RegEx engine should not be available in Qlik Sense.

Note: The MeaningCloud connector does not parse non-URL encoded strings. For an example on how to URL encode your data, see Text is not URL encoded.

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 restriction 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 that are imposed on the Qlik Web Connectors by one of the MeaningCloud APIs.

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.

Did this information help you?

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