Chapter 15. Cloud Natural Language: text analysis

 

This chapter covers

  • An overview of natural language processing
  • How the Cloud Natural Language API works
  • The different types of analysis supported by Cloud Natural Language
  • How Cloud Natural Language pricing is calculated
  • An example to suggest hashtags

Natural language processing is the act of taking text content as input and deriving some structured meaning or understanding from it as output. For example, you might take the sentence “I’m going to the mall” and derive {action: "going", target: "mall"}. It turns out that this is much more difficult than it looks, which you can see by looking at the following ambiguous sentence:

Joe drives his Broncos to work.

There’s obviously some ambiguity here in what exactly is being “driven.” Currently, “driving” something tends to point toward steering a vehicle, but about 100 years ago, it probably meant directing horses. In the United States, Denver has a sports team with the same name, so this could refer to a team that Joe coaches (for example, “Joe drives his Broncos to victory”). Looking at the term Bronco on Wikipedia reveals a long list of potential meanings: 22 different sports teams, 4 vehicles, and quite a few others (including the default, which is the horse).

15.1. How does the Natural Language API work?

15.2. Sentiment analysis

15.3. Entity recognition

15.4. Syntax analysis

15.5. Understanding pricing

15.6. Case study: suggesting InstaSnap hash-tags

Summary