Introduction to Natural Language Processing (NLP)

Shashank Kapadia
3 min readFeb 3, 2019

--

Before we dive into technicalities, let’s begin by understanding the brief history around language, and why it makes exploring an interesting subject. Somewhere around, give or take, 100,000 years ago, humans learned how to speak, and about 7,000 years ago learned to write. Wait, why are we discussing it? Well, because (1) it relates to the test proposed by Alan Turing in 1950, Turing Test, which was designed to provide a satisfactory operational definition of intelligence, and (2) it presents a magnitude of why it is a critical piece to achieving machine intelligence as we as human beings go about the world mainly in terms of a language. According to this test, the computer needs to possess the following capabilities:

Natural Language Processing: To enable it to communicate successfully

Knowledge Representation: To store what is knows or hears

Automated Reasoning: To use stored information to answer questions and to draw new conclusions

Machine Learning: To adapt to new circumstances and to detect and extrapolate patterns

So, what is Natural Language Processing (NLP)?

The term NLP (Natural Language Processing) is typically used to describe the function which analyzes or synthesize spoken or written language. The natural word is meant to distinguish human speech and writing from more formal languages. Simple? Yes and No. The main problem with NLP is that of perception. So when we talk about perception, we have to start thinking about what intelligence really means. Let’s look at an example from when chatbots go wrong.

https://img.purch.com/o/aHR0cDovL3d3dy5idXNpbmVzc25ld3NkYWlseS5jb20vaW1hZ2VzL2kvMDAwLzAxNC83NTQvaTAyL3BvbmNoby0xLmpwZz8xNTEyNzU5NzUy

Language is ambiguous!! Unlike Math, it is not a universal language

To understand our language, computers need to know our world. They need to be able to answer questions like “Why does it only rain outside?” and “If a book is on a table, and you push the table, what happens?” We understand the language in a way that is grounded in sensation and action. When someone says the word “chicken,” we map that to our experience with chickens, and we can talk to each other because we have had similar experiences with chickens. This is how computers need to understand language.

How can I get started?

Before getting started, I spent good amount of time searching online for a reference that could provide answers to the questions, I believe most of you will relate to. How do I get started? What is NLP’s taxonomy? What should be the sequence of topics I should be learning? and many more…

While I didn’t find one that addresses all the above (comment below, I am still searching), I found an article that helped me with understanding how I should be thinking of NLP, and its current state. I would strongly encourage you to read it, but, to summarize: There are essentially two paths to it:

The first path is a symbolic one that is traversed by hard-coding our world into computers. To follow the symbolic path, we segment text into meaningless tokens that correspond to words and punctuation. We then manually create representations that assign meanings to these tokens by putting them into groups and creating relationships between the groups. With those representations, we build a model of how the world works, and we ground that model in the manually created representations

The second path is sub-symbolic, which we initially follow by having computers learn from text. This path is synonymous with neural networks (also called deep learning), and it begins with representing words as vectors. It then progresses to representing whole sentences with vectors, and then to using vectors to answer arbitrary questions. To complete this path, we must create algorithms that allow computers to learn from rich sensory experience that is similar to our own [1]

Great, what’s next?

In the next article, together, we’ll be going through the fundamental blocks of text processing, along with building a template that is reproducible.

References:

[1] https://medium.com/intuitionmachine/the-two-paths-from-natural-language-processing-to-artificial-intelligence-d5384ddbfc18

If you have any feedback, please reach out by commenting on this post, messaging me on LinkedIn, or shooting me an email (shmkapadia[at]gmail.com)

--

--

Shashank Kapadia

Data Science Leader @Randstad building scalable and operationalized ML solutions for data-driven products. My articles on Medium don’t represent my employer.