What’s it all About? How To Use Google’s Natural Language API

Wait! Don’t hit Publish just yet. Not before knowing what your article’s about. Sure you might think you do, but Google could have other ideas.

So in this article, we’re going to look at how you can use the Google Natural Language API to fine-tune your content and get more targeted search traffic.

This free tool lets you get inside Google’s head, allowing you to gain a deeper understanding of how its algorithm interprets human speech. So you can see your content much the same way as Google sees it.

Now obviously Google isn’t giving away all their secrets but you’ll still get some valuable insights. You can then use this information to better tweak your text and create more effective and impactful content.

Context Is King 

Content without context won’t bring you traffic. If anything it might be costing you traffic.

That’s why it’s important to make everything as contextually tight as possible – so you’re not diluting the overall effectiveness of your content.

Previously we looked at user intent, why it’s so important to have a point to every single piece of content you publish and why you need to get to the point as quickly as possible.

Getting to the point isn’t just a best practice from a user experience standpoint, as we’ll see, it also helps your SEO performance.

Using the Google Natural Language API will help you tweak your content, so Google knows what the main point of each content piece is and better understands its overall meaning and context.

What Is Google The Natural Language API?

Google continuously makes changes to its search algorithm. One of the most monumental shifts in how Google search works, was its inclusion of advanced artificial intelligence systems to help it better understand language.

Previously, we looked at this technology, known as Natural Language Processing (NLP), and how it is used by Google and other companies to better understand the nuances of human speech.

The Google Natural Language API is a product that incorporates NLP technology. It analyses text, connects the meanings of words together, detects entities (i.e. specific names topics or keywords) as well as the sentiment of the piece, to better understand the overall meaning of the text.

Using the free demo you can quickly analyse your text and find ways to tighten it up to improve performance.

Using The Google Natural Language API Demo

  1. Go to the Natural Language API Demo page: https://cloud.google.com/natural-language
  2. Scroll down until you get to the “Try the API” demo box.
  3. Click inside the box, delete the existing text (“Google, headquartered in Mountain View” etc.) and paste your own text inside.
  4. When you’re ready click the Analzse button and tick the Recaptcha box.
  5. Wait for a second or so for the results to appear underneath.

Keywords Vs Entities

The first thing you’re likely to notice is that the Google Natural API doesn’t view your text in terms of keywords. Instead, it lists something called entities.

These entities comprise the main topics of any given piece of content.

The main difference between keywords and entities is context.

The difference between a keyword and an entity is the level of context involved. A keyword is just a string of characters that can potentially mean anything.

Sometimes keywords have more than one meaning, which is why search engines often returned incorrect or mixed results in the past.

Entities are different. They use Natural Language Processing to connect the dots based on adjoining words and how they all fit together.

Originally Google operated only on keywords, but now they have also added entities into the mix to better understand context.

So Google ties the word “apple” + “computers” together and understands the context is a company.

It ties the word “apple” + “sauce” together to mean a type of food, and will show you apple sauce recipes in the search results.

It also knows that HP can mean a computer company or a brand of sauce.

A search for “HP” will show results for Hewlett-Packard by default, as it is the largest company and has the largest amount of relevant search results.

But Google also knows that HP sauce is an entity. You can tell this because a search for “HP sauce” triggers a knowledge graph result with information pulled from Wikipedia. It lists the sauce as “food” and links it to the product’s manufacturer, “Heinz”. Each of these, “HP sauce”, “food” and “Heinz” are interconnected search entities.

Comparison of knowledge graphs for “HP” and “HP Sauce”.

These are just a few examples off the top of my head – the search engine is making almost 100,000 such decisions every second.

Natural Language API Salience 

The Natural Language API assigns a salience score to each entity.

This is an indicator of the perceived importance of each individual entity. The entity with the highest salience score is what Google considers to be the main topic of the piece. So make sure that your main topic or keyword(s) have the highest scores.

It’s also worth noting that entities which appear closer to the beginning of the content, particularly when placed in the opening sentence, are given a higher salience score.

So avoid long rambling introductions and get to the point right away.

This is also a best practice from a user experience point of view because you want to make sure that anyone arriving on your page knows immediately what the main topic is. Otherwise, you run the risk that they get frustrated and go elsewhere.

Optimising Content Based on Salience Score

Consider the following piece of content, based on a real-life example.

It’s an introduction to a piece about the Monaco Grand Prix for a fictional tour operator. The aim of this content piece is to get people to buy tickets for the event.

I changed the sport and created a fake company name to protect the “innocent” (an SEO agency and the company who hired them) but stuck to the same exact same format of their text to demonstrate what went wrong.

See if you can guess what that was.

“Juan Manuel Fangio in 1950, Stirling Moss in ’61, Graham Hill’s triple crown in 69 and the epic clash of the titans between Nigel Mansel and Ayrton Senna in 1992 – just some of the many unforgettable motorsport moments at Monaco over the years.

Ever since 1929, the glamorous principality has been holding its prestigious Grand Prix. Set against the backdrop of Monte Carlo with its yachts, casinos and luxury hotels, Monaco is one of the highlights of the Formula 1 calendar.

Last year saw Red Bull’s Sergio Perez win the race while his teammate Max Verstappen had to be satisfied with third.

Will the Flying Dutchman get his revenge this year? Or are more surprises in store?

Almost a million and a half TV viewers tune in to watch the event each year, but there’s nothing quite like the real thing. If you’re a fan of F1 then you owe it to yourself to see the event up close.

Meandering Holidays offers special package tours to Monaco so you can experience the event live. Hear the roar of the engines, rub shoulders with the glitterati and enjoy this motor racing spectacle like never before.

The 2023 Monaco Grand Prix will be held on the last weekend of May, starting on Thursday 25th, with the race itself taking place on Sunday 28th. We offer a range of package options whether you want to enjoy the whole weekend, or just go to watch the race itself.”

You can’t fault it for passion. Clearly the writer loves F1, but let’s see what Google thinks:

So first the good news – Google knows the piece is talking about Monaco, but not about the Grand Prix. Instead it gives higher salience points to random words and to drivers who haven’t been involved in the sport for decades. 

Remember the entire point of the piece was to try to sell tickets and package tours for the Monaco Grand Prix.

But Google doesn’t see that. 

Because the entity “Monaco Grand Prix” is not mentioned until the fourth paragraph, it’s given a salience score of zero, while other irrelevant entities like “nothing”, “yachts”, “casinos”, “surprises” and “thing”, score higher. 

The company name, Meandering Holidays (I just made that name up) and the phrase “package tours” also score zero. While the entity “tickets” doesn’t appear at all, because the writer never mentioned the fact that the company sells tickets once in all four paragraphs. 

So since the entire point was to rank for “Monaco Grand Prix tickets”, it’s fair to say this piece isn’t getting anywhere near pole position. 

So let’s change the text dramatically, by getting straight to the point and focussing more on getting higher salience scores for our target entities / keywords: 

Looking for Monaco Grand Prix tickets? Meandering Tours offers special package tours and great deals on tickets for the 2023 Monaco Grand Prix. 

Running from Thursday 25th to Sunday 28th of May, the Monaco Grand Prix is one of the highlights of the motor racing calendar. If you love Formula 1, you owe it to yourself to see the event up close and personal. 

Meandering Tours is an official seller of Monaco Grand Prix tickets. We also offer a range of package deals whether you want to enjoy the whole weekend, or to watch the race itself.”

Ok, so I admit that’s not going to win the Pulitzer Prize but let’s see what Google thinks: 

Now the entities “Monaco Grand Prix” and “tickets” have the highest salience scores, alongside words like “tours” and “package tours”. 

Obviously “Meandering Tours” isn’t picked up as an entity, because I just made that name up. But if your organisation is a fairly well-known one – i.e. if it’s a multinational with an entry on Wikipedia – then there’s a strong chance it will. 

Either way, you should also feature your brand’s name prominently in the piece to give it a higher salience score. This way Google will be better able to connect the dots between your company and the content piece’s main target entity. 

Salience Scores And Rankings 

So does that mean your Salience score directly affects your ranking?

This is a topic of much debate.

Google’s unofficial answer to the topic was predictably non-committal, stating that the Google Natural Language API is merely a tool and, as such, its results should not be taken as gospel.

This answer makes sense.

Google’s algorithm is a far more complex and multi-layered affair with lots of moving parts. The Natural Language API demo should be viewed as a simplified demonstration of how just one aspect of Google’s search algorithm operates.

Reading between the lines it’s clear that, ranking factor or not, entity salience matters. This is why, if you want to help Google better understand the main key topic of your content, you need to feature it up front and mention it often, in a natural manner.

So use the API before you publish, check your content, edit it, re-read it. Then check it again.

Dust off old content pieces and put them through the wringer – is there room for improvement? Most likely the answer is yes. A few tweaks here and there could make all the difference to your rankings.

Once you’ve done this a few times, you’ll train yourself to incorporate entity salience automatically as part of your writing, so you won’t need to check it using the API as regularly.

So instead you can play around with the other parts of the tool, such as Sentiment and Syntax, which also provides some interesting insights into how Google’s AI brain interprets the content we read on the web every day.

Leave a Reply

Your email address will not be published. Required fields are marked *

fifteen − ten =