Having had three Amazon Alexa units in my house for years, I’ve always wondered how my utterances are interpreted and understood by a machine, and how a machine talks back to me and carries out my commands without error (almost!). This book quenched my curiosity.
I must admit: I am always a little intimated by linguistics terms, which is the main reason why I have avoided the natural language processing (NLP) topic in the past. The good news: you don’t need to be a linguist to read and understand this book. Fortunately, there is an appendix, “Linguistics Primer,” and that’s where I started my reading. After a quick review of common grammar concepts, and with a better understanding of dependency and phrase structure grammars, I felt I was ready to dive into NLP. I spent about ten hours reading this book from cover to cover, which turned out to be an easy and pleasant experience. I would expect anyone with a decent knowledge of Python to feel the same.
This book primarily focuses on the implementation of NLP operations. Chapter 1 is the only chapter that briefly describes the basics of NLP, including vector-based representations of words, sentences, documents, and statistical models based on the neural network architecture. The author uses the rest of the book to cover components of the text processing pipeline, which is a series of basic NLP operations using spaCy, a popular Python library for NLP models and algorithms, with step-by-step instructions. Each component in the NLP process is clearly illustrated in linguistic terms.
Meanwhile, sample sentences and real-life application scenarios, such as a chatbot, are used to explain the processes “in action,” which is very helpful to a linguistic layman such as myself. Important concepts and techniques are covered: the container concept; the extracting of linguistics features such as part-of-speech tags, syntactic dependencies, and named entities; the concept of word vectors and their application; finding patterns in sentences using dependency tree walking; visualization to identify patterns; and intent recognition techniques such as using synonymous and semantic similarity.
While the examples and instructions are easy to follow, readers must know Python in order to understand them. Each Python snippet is followed by a detailed explanation, which really makes it easy to understand the Python program. The author leaves some challenge tasks after each module--called “Try This”--for readers to explore and experiment. In the last three chapters, the author provides detailed steps and coding examples to help ambitious readers do more advanced NLP experiments, including training their own NLP models, deploying their own chatbots, and dealing with web data and processing images.
Several features of the book make it a fun and interesting read. If you are someone who happens to be curious about NLP and knows Python, read this book. After all, NLP, as an important branch of artificial intelligence (AI), was never so close to my understanding and implementation before I read this book. In fact, I feel motivated and confident to use the examples in this book to build my own chatbot. Why not?