Fetch google nlp text sentiment¶
3rd party API ·
Analyze the overall sentiment of texts using Google Cloud's NLP endpoint.
Each text's sentiment will be expressed as a magnitude (in [0, inf]) and a positive or negative score (in [-1, 1]).
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_text_sentiment(ds.text_column) -> (ds.magnitude, ds.score)
The following are the step's expected inputs and outputs and their specific types.
fetch_google_nlp_text_sentiment(text_column: text) -> (magnitude: number, score: number)
Column containing the texts to analyze.
A numerical column indicating the overall strength of emotion (both positive and negative) within the given text, with values ranging between 0.0 and +inf. Each expression of emotion within the text contributes to the text's magnitude, so longer text blocks may have greater absolute values.
A numerical column indicating the overall emotional leaning of the text in normalized form, with values ranging between -1.0 (negative) and 1.0 (positive).