Natural Language API & Google Docs

Setup and Requirements

The setup and requirements of this lab are very simple. You just need to follow the instructions carefully.

Enable the Natural Language API

Now this lab gets more interesting as you will enable the natural language API. The first step which you need to follow is to create an API key. Follow the instructions as given in the lab and create your own API key.

Set up your Google Doc

Before you start experimenting with the Natural Language API, you need to set up your Google doc. Create a new Google doc by clicking on the link given in the lab instructions. You will be embedding a App Script Code for your Google Doc. Navigate to script editor as given in the instructions.

Call the Natural Language API

This is the last step in the lab which is calling the Natural Language API. This can be easily done by changing the code in the script editor. You need to basically add the retrieveSentiment function, in the code.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store