Skip to content

Fetch google nlp entities sentiment

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

Analyze sentiment about entities in a text using Google Cloud's NLP endpoint.

Each text will be analyzed using Google's API. Any detected entity will generate a row containing information about its sentiment and type, along with a reference to the original text (its index in the input dataset). For more information about the columns in the resulting dataset see the Outputs section below.

API integration

To use this step your team needs to have the Google NLP 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 Google NLP integration in particular you will need access to Google's NLP service. Follow the instructions here to create the required API key.


The step has no parameters, so simply use

fetch_google_nlp_entities_sentiment(ds.text_column) -> (ds_out)


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

fetch_google_nlp_entities_sentiment(text_column: text) -> (ds_out: dataset)


text_column: column:text

Column containing the texts to analyze.


ds_out: dataset

The result of the analysis.

The new dataset will have the following columns:

  • sentiment_magnitude: Indicates the overall strength of emotion (both positive and negative) within the given text, between 0.0 and +inf.
  • sentiment_score: Ranges between -1.0 (negative) and 1.0 (positive) and corresponds to the overall emotional leaning of the text.
  • entity: name of the entity detected in the texts.
  • type: category related to Google NLP's categories. See more here
  • name_type: name of the previous column's category.
  • original_text: The text the entity was extracted from
  • original_index: Original index of the text in your input column so you can join if you see fit.