Google Natural Language Api and Sentiment Analysis

Here we discuss Natural Language processing using the Google Natural Language API. Our goal is to do sentiment analysis.

Definition

Sentiment analysis means seeing whether what someone writes is positive or negative. Business can use this to look at Twitter, Yelp, or whoever offers a API and then change their marketing, practices, or even reach out to the person who has complained about their brand and offer to fix what has irked them so.

To do sentiment analysis you could write your own code or use any of the many cloud APIs from different vendors and pay for the service. Writing it yourself would save you money. You just need to understand concepts like bag of words and master the NLP APIs in a deep learning ML library like Torch.

Sign up for a Google Cloud free trial here and enable the Google Natural Language Processing (NLP) API. This gives you $300 credit that you can use in 365 days. Don’t worry, they promise they will not bill your credit card without asking you first. So you should be able to use it for free for this tutorial and other tutorials that we will write on Google Cloud.

Setup

You need to install the Google cloud utilities on your system.

Download the Google cloud utilities and SDK following these instructions to set it up, but STOP at the gcloud init step since we are using the NLPTutorial, which is already partially set up.

Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article