SPEAKER: As a business, you're probably
collecting customer feedback.
This is because collecting and implementing user feedback
is one of the best ways to improve your process
or product.
But as many of you have probably discovered
as the amount of data grows, manually
reviewing open-ended feedback can be resource intensive.
How do you turn a growing repository of feedback data
into insights?
Welcome to the "Sheets to App" show
where we talk about how to tame these tabular beasts
into productive applications.
In this session, we're looking at how
to analyze the sentiment of freeform feedback at scale
so stick around.
Back to that ever-growing set of feedback data?
Besides bringing on more humans to read and classify
the feedback, are there any other options?
Enter machine learning.
Machine learning technology is what powers products
like Google Photos, Google Translate, and Gmail Smart
Reply.
Without needing a data science degree,
you can use machine learning in your own applications
through pre-trained machine learning models.
These models will help you interpret feedback
in a scalable and consistent way,
and you can take advantage of this technology
directly from Google Sheets, which
is often where your feedback data lives in the first place.
So what kind of Sheets-based, ML-powered solution do?
The app looks like this.
Within Google Sheets, there's an extra menu
where, with a click of the button,
freeform feedback will be analyzed and translated
into a list of what people are talking about--
let's call them entities--
and a score that indicates whether the entities are
mentioned in a positive or negative way.
The quantitative results are then
aggregated into a PivotTable and a chart
so you can spot trends and gain insights.
What's the key to making this possible?
That is Cloud Natural Language.
Cloud Natural Language is a collection of machine learning
models trained to understand text,
and it's a service of the Google Cloud Platform.
One feature available in the service
combines both entity analysis and sentiment analysis
and attempts to determine the sentiment expressed
about entities within a block of text.
For example, take this review of a vacation rental property.
Cloud Natural Language will analyze the text
and identify a list of entities.
Then it will assign each entity with a sentiment score.
These sentiment scores range from a clearly negative
negative 1 to a clearly positive positive 1.
Imagine you perform this analysis
across hundreds of reviews.
By aggregating and analyzing those results,
you'll start to see at a high level, what
people are talking about the most
along with their sentiment.
In order to access Cloud Natural Language from your Google
Sheet, you'll use Apps Script, specifically
the URL fetch service in Apps Script,
which allows the script to communicate
with external services on the internet.
Cloud Natural Language documentation
outlines the structure it expects in the request
body sent by URL fetch.
This includes the type of document, the language,
and the feedback text itself.
Each time a piece of feedback is sent to Cloud Natural Language
for analysis, the results are pasted directly
into a new tab of the Google Sheet using range.setValues.
Take note of this protip which I learned from my colleague Eric
Carlita.
When adding multiple rows of data
to a spreadsheet with Apps Script,
it is much faster to collect them into an array
and then add the rows to your sheet all at once using
range.setValues.
An often seen alternative is using
[? Sheet ?] dot [INAUDIBLE].
While this method provides simplicity,
it will only process one row at a time.
It just cannot compare on speed for the solution.
Time to set up your own feedback sentiment analysis app
and see it in action.
All the details including a template Google Sheet
are available in the G Suite Solutions Gallery linked below.
The full source code is also available in the gallery
if you're interested in diving into some of those methods we
talked about.
Thank you for joining this episode of "Sheets to Apps."
If you found this episode helpful,
please click like and subscribe to the channel.
[MUSIC PLAYING]