Skip to content

Fetch meaningcloud text sentiment

NLP · text · 3rd party API · integration · model

Analyze sentiment of a text and its entities with MeaningCloud.

API integration

To use this step your team needs to have the Meaning Cloud integration configured in Graphext. The corresponding credentials are required to connect to a third-party API. See our help center for details on how to configure your team's integrations.

To enable the Meaning Cloud integration in particular you will need access to Meaning Cloud's NLP service. Follow the instructions here to create the required API key.

Example

Without explicitly limiting the number of requests per second (which may depend on your MeaningCloud subscription), simply use:

fetch_meaningCloud_text_sentiment(ds.text_column, ds.lang) -> (
      ds.sentiment,
      ds.agreement,
      ds.confidence,
      ds.irony,
      ds.subjectivity,
      ds.ent_sent_PP,
      ds.ent_sent_P,
      ds.ent_sent_NONE,
      ds.ent_sent_NEU,
      ds.ent_sent_N,
      ds.ent_sent_NN
)

Usage

The following are the step's expected inputs and outputs and their specific types.

fetch_meaningCloud_text_sentiment(
    text_column: text,
    lang_column: category, 
    {
        "param": value
    }
) -> (
    sentiment: category,
    agreement: category,
    confidence: number,
    irony: category,
    subjectivity: category,
    ent_sent_PP: list[category],
    ent_sent_P: list[category],
    ent_sent_NONE: list[category],
    ent_sent_NEU: list[category],
    ent_sent_N: list[category],
    ent_sent_NN: list[category]
)

where the object {"param": value} is optional in most cases and if present may contain any of the parameters described in the corresponding section below.

Inputs


text_column: column:text

Column containing the texts to analyze.


lang_column: column:category

Identifies the language of each text.

Outputs


sentiment: column:category

Sentiment polarity found in the sentence (https://www.meaningcloud.com/developer/sentiment-analysis/doc/2.1/response).


agreement: column:category

Agreement polarity found in the sentence.


confidence: column:number

Confidence polarity found (or not found) in the sentence.


irony: column:category

irony polarity.


subjectivity: column:category

subjectivity polarity found (or not found) in the sentence.


ent_sent_PP: column:list[category]

name of the entities detected with strong positive sentiment.


ent_sent_P: column:list[category]

name of the entities detected with positive sentiment.


ent_sent_NONE: column:list[category]

name of the entities detected without sentiment.


ent_sent_NEU: column:list[category]

name of the entities detected with neutral sentiment.


ent_sent_N: column:list[category]

name of the entities detected with negative sentiment.


ent_sent_NN: column:list[category]

name of the entities detected with strong negative sentiment.

Parameters


requests_per_second: number = 2

Request per Second.