1/40 What is NLP?
2/40 What is NLP?

You might use the technology every day without even knowing it.

For example,

3/40 What is NLP?

Google Search knows what you’re looking for through either text or speech.

4/40 What is NLP?

Gmail generates Smart Reply based on messages.

5/40 What is NLP?

Google Translate translates in 133 languages, including 24 new languages, according to the Google I/O 2022 keynote.

6/40 What is NLP?

Google Assistant interprets your intention and conducts interactive conversations.

7/40 What is NLP?

Google is launching a new auto summary function for products in Workspace, including Docs, Google Chat, and Meet.

8/40 What is NLP?

Behind all these applications, NLP technology plays a crucial role.

9/40 What is NLP?

So what is NLP exactly?

Well, the name tells it all;

10/40 What is NLP?
11/40 What is NLP?

At first, that sounds impossible to achieve.

The nuance of languages is difficult to catch even for a human.

12/40 What is NLP?

How is it possible for a machine to understand languages?

13/40 What is NLP?

Well, equipped with

  • nearly unlimited memory (such as cloud storage services),

14/40 What is NLP?
  • super computing power (such as TPU, the Tensor Processor Unit), and

15/40 What is NLP?
  • ever-evolving techniques (such as advanced ML models), computers might make the impossible possible.

16/40 What is NLP?

Imagining NLP as an input-process-output system.

17/40 What is NLP?

The input is natural human languages, which can be either text or speech.

18/40 What is NLP?

The computer faces a couple of challenges to process natural language.

19/40 What is NLP?

First, the human language has to be translated to a machine language that a computer understands.

This process is called text representation.

20/40 What is NLP?

Second, how can language be processed?

There are two methods: Rule-based reasoning means that the computer is told what to do based on hand-coded rules such as dictionary lookup.

For example, the machine is told to match hello in English to hola in Spanish.

21/40 What is NLP?

Machine learning means that the computer learns the rules on its own through a large amount of data and its corresponding results.

For example, fed with thousands and thousands of instances of customer feedback and ratings, the machine is able to predict a rating the next time it reads the comments.

Obviously the second method is much more scalable.

22/40 What is NLP?

What is the output? Among the many tasks NLP can do, here a list of a few essentials:

  • Text classification: predict correct labels that you want to assign to a document. For example,

    • sentiment analysis (deciding the rating based on the comments of a customer),

    • spam identification (determining whether an email is potentially a spam), and

    • topic classification (identifying the topic of the content).

23/40 What is NLP?

Entity extraction (or entity recognition): identify entities, or the relevant specifics, within text. For example, Google Assistant understands that you’re asking about the weather (which is the topic) for today (which is the date) in Denver (which is the location).

24/40 What is NLP?

Machine translation.

25/40 What is NLP?

Interactive conversation: such as chatbot.

26/40 What is NLP?

You may already discover that NLP is a marriage between linguistics and artificial intelligence.

27/40 What is NLP?

It’s multidisciplinary …and involves

28/40 What is NLP?

linguistics,

29/40 What is NLP?

computer science,

30/40 What is NLP?

AI and ML,

31/40 What is NLP?

and statistics.

32/40 What is NLP?

Let’s discuss natural language models in more detail.

33/40 What is NLP?

Natural language is a sequence.

The order of the words matters.

34/40 What is NLP?

Sequence models have been used to capture and model natural language.

Sequences can be the input and the output of a machine learning model.

Broadly, sequence models fit into three types:

35/40 What is NLP?

one-to-sequence,

36/40 What is NLP?

sequence-to-one,

37/40 What is NLP?

and sequence-to-sequence.

38/40 What is NLP?

In a one-to-sequence model, one input is passed in, and the model generates a sequence as the output.

A typical example is image captioning, where the description of an image, normally a few sentences, is generated based on this one image.

39/40 What is NLP?

In a sequence-to-one model, a sequence is passed in and one output is generated.

For example, sentiment analysis is a typical sequence-to-one problem.

Based on the comments of a few sentences, the machine can generate one rating.

40/40 What is NLP?

Finally, in a sequence-to-sequence model, sequences serve as both the input to and the output of the model.

Google Translate is a typical example in dealing with sequence-to-sequence problems.