How the Google Natural Language API Can Save YOU Hundreds of Hours

Jasmine Robinson
4 min readApr 29, 2022

--

For those who find redundant work painful & appreciate automation.

I fell in love with Google Natural Language API, and you will love it too! No coding experience needed!

Google Natural Language API! Save 100’s of hours!!! No coding experience required!

Do you have multiple documents that you need to consolidate into one master document based on overlapping themes?

Let me give you an example. At my current job, most new hires are provided an extensive google onboarding document with all the information they need to succeed on the team. The document includes business context, office information, culture memo, diversity & inclusion best practices, dashboards, brand assets, support resources, food, reading list, tools & resources, quick links, slack channels, distribution lists, and, of course, team-specific information.

About 60% of the context was “general” information applicable to all employees. Yet, the information was maintained by individual teams in their individual documents. If it took ten minutes to maintain that redundant information a month for 100 teams, that is 16 hours a month or 192 hours a year wasted.

TIP: Consolidation is about identifying, centralizing and pointing.

Easy Wins

An obvious and easy win would be:

  1. Identify which information was redundant across all the onboarding documents.
  2. Centralize the location of the general content, such as placing on a website.
  3. Point the document to the site and only have team-specific information on the onboarding document.

Not All, Just Enough

To be successful, you do not need EVERY onboarding document from every team. It would be easiest if you had a sampling across the company to identify patterns. For onboarding documents it helps to focus on employee persona, such as all “engineers” at your company. I identified about 100 teams and collected approximately 30 onboarding documents for a sampling of 30%.

Automation? Yes Please!

I could manually go through each doc, identify overlapping sections and extract links, but I’m a developer, so I have to automate everything. This is where Natural Language Processing (NLP) saves the day. With NLP, it is possible to write a script that will break down and analyze a document. NLP is commonly used for chatbots, search engines, grammar correction, and social media monitoring tools. Google has an API called the Natural Language Cloud API that we can use to process a Google document. Here are a few of the things the API will return:

  • Entity — These are nouns (people, places, or things). I use these as my primary keywords.
    (Examples: Bootcamp, Java, Information Security, AWS, Hackathon, Kubernetes)
  • Entity Type — These are the categories of the keyword
    (Examples: people, location, organization, work of art, event, consumer good)
  • Salience — This is a score, and the closer you are to 1, the more confident Google is that the entity is the primary subject of the content.
    This is useful if you are trying to summarize a document quickly.
  • Number of Mentions — The more it is mentioned, the more likely we have found content that we can place on a centralized website.
Example Output from a Medium Article Pasted into a Google Doc

If you are not a Developer

I wanted to make this so simple that someone with zero coding experience could do it. I created a simple step-by-step tutorial video for a nominal fee. Once the Google Sheet is generated, you have a perfect starting point for identifying which content you want to place in a centralized location.

Watch step-by-step tutorial
https://smartjots.gumroad.com/l/google-nlp-docs

If you are a Developer

For those of you who are developers, you should have no issues walking through the steps.

  1. Google Cloud API
    Create a Google Cloud Platform account, enable billing, enable the “Cloud Natural Language API” and under “Create Credentials” you can create an “API key”
  2. Google App Script
    In your Google Document go to: Tools->Script Editor and paste the code from github. Replace the API key value with your API key
  3. Run the “Main” function
    It will request authorization to your google drive so it can create the new Google sheet titled: NLP_Results_(timestamp)

--

--

Jasmine Robinson
Jasmine Robinson

Written by Jasmine Robinson

Eternal Optimist | Senior Technical Program Manager - http://jazmy.com

No responses yet