Skip to content

bigfunctions > sentiment_score

sentiment_score

Call or Deploy sentiment_score ?

✅ You can call this sentiment_score bigfunction directly from your Google Cloud Project (no install required).

  • This sentiment_score function is deployed in bigfunctions GCP project in 39 datasets for all of the 39 BigQuery regions. You need to use the dataset in the same region as your datasets (otherwise you may have a function not found error).
  • Function is public, so it can be called by anyone. Just copy / paste examples below in your BigQuery console. It just works!
  • You may prefer to deploy the BigFunction in your own project if you want to build and manage your own catalog of functions. This is particularly useful if you want to create private functions (for example calling your internal APIs). Discover the framework

Public BigFunctions Datasets:

Region Dataset
eu bigfunctions.eu
us bigfunctions.us
europe-west1 bigfunctions.europe_west1
asia-east1 bigfunctions.asia_east1
... ...

Description

Signature

sentiment_score(content)

Description

Compute sentiment score of content

Examples

select bigfunctions.eu.sentiment_score('BigFunctions Rocks!')
select bigfunctions.us.sentiment_score('BigFunctions Rocks!')
select bigfunctions.europe_west1.sentiment_score('BigFunctions Rocks!')
+-----------------+
| sentiment_score |
+-----------------+
| 0.945           |
+-----------------+

Need help using sentiment_score?

The community can help! Engage the conversation on Slack

For professional suppport, don't hesitate to chat with us.

Found a bug using sentiment_score?

If the function does not work as expected, please

  • report a bug so that it can be improved.
  • or open the discussion with the community on Slack.

For professional suppport, don't hesitate to chat with us.

Use cases

A company wants to analyze customer feedback left on their website. They store the feedback text in a BigQuery table called customer_feedback. They can use the sentiment_score function to determine the sentiment (positive, negative, or neutral) of each feedback entry.

SELECT
    feedback_id,
    feedback_text,
    bigfunctions.us.sentiment_score(feedback_text) AS sentiment_score
  FROM
    `your-project.your_dataset.customer_feedback`

This query adds a new column called sentiment_score to the table. This score will be a numerical value indicating the sentiment. A higher score indicates more positive sentiment, while a lower score indicates more negative sentiment. They can then use this score to:

  • Identify trends: Track changes in overall customer sentiment over time.
  • Categorize feedback: Group feedback into positive, negative, and neutral categories for easier analysis.
  • Prioritize responses: Address negative feedback first to mitigate customer dissatisfaction.
  • Measure campaign effectiveness: Analyze sentiment before and after a marketing campaign to gauge its impact.
  • Improve products/services: Identify areas where customers express negative sentiment and use that information to make improvements.

By applying this function to their existing feedback data, the company can gain valuable insights into customer opinions and make data-driven decisions to improve their business.

Spread the word

BigFunctions is fully open-source. Help make it a success by spreading the word!

Share on Add a on