Fetch meaningcloud sentence sentiment¶
NLP • text • 3rd party API • integration • model
Analyze sentence and entity sentiments in a text with MeaningCloud.
Each original text will be separated into individual sentences (one per row) in the resulting dataset. For each sentence an overall sentiment score will be calculated. Additionally, for each of five sentiment polarity levels (see below), any entities about which the respective sentiment has been expressed will be collected in a corresponding list.
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. You can configure API integrations following the INTEGRATIONS
or ADD INTEGRATION
link in the top-left corner of your Team's page, selecting API keys
, and then the name of the desired third-party service.
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.
Usage¶
The following are the step's expected inputs and outputs and their specific types.
fetch_meaningCloud_sentence_sentiment(
text_column: text,
lang_column: category,
{
"param": value
}
) -> (ds_out: dataset)
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.
Example¶
Without explicitly limiting the number of requests per second (which may depend on your MeaningCloud subscription), simply use:
fetch_meaningCloud_sentence_sentiment(ds.text_column, ds.lang) -> (ds_out)
Inputs¶
text_column: column:text
lang_column: column:category
Outputs¶
ds_out: dataset
The new dataset will have the following columns:
original_index
: index of the original text row a sentence was extracted fromsentence
: the sentence extracted from the original text.lang
: identifier of the language of the sentence.sentiment
: sentiment polarity found (or not found) in the sentence, see hereent_sent_PP
: names of the entities detected with strong positive sentimentent_sent_P
: names of the entities detected with positive sentimentent_sent_NONE
: names of the entities detected without sentimentent_sent_NEU
: names of the entities detected with neutral sentimentent_sent_N
: names of the entities detected with negative sentimentent_sent_NN
: names of the entities detected with strong negative sentiment.
Parameters¶
requests_per_second: number = 2
Request per Second.
integration: string
ID of the integration you'd like to use.