NLTK Essentials

Nitin Hardeniya


Build cool NLP and machine learning applications using NLTK and other Python libraries

About This Book

  • Extract information from unstructured data using NLTK to solve NLP problems
  • Analyse linguistic structures in text and learn the concept of semantic analysis and parsing
  • Learn text analysis, text mining, and web crawling in a simplified manner

Who This Book Is For

If you are an NLP or machine learning enthusiast with some or no experience in text processing, then this book is for you. This book is also ideal for expert Python programmers who want to learn NLTK quickly.

What You Will Learn

  • Get a glimpse of the complexity of natural languages and how they are processed by machines
  • Clean and wrangle text using tokenization and chunking to help you better process data
  • Explore the different types of tags available and learn how to tag sentences
  • Create a customized parser and tokenizer to suit your needs
  • Build a real-life application with features such as spell correction, search, machine translation and a question answering system
  • Retrieve any data content using crawling and scraping
  • Perform feature extraction and selection, and build a classification system on different pieces of texts
  • Use various other Python libraries such as pandas, scikit-learn, matplotlib, and gensim
  • Analyse social media sites to discover trending topics and perform sentiment analysis

In Detail

Natural Language Processing (NLP) is the field of artificial intelligence and computational linguistics that deals with the interactions between computers and human languages. With the instances of human-computer interaction increasing, it's becoming imperative for computers to comprehend all major natural languages. Natural Language Toolkit (NLTK) is one such powerful and robust tool.

You start with an introduction to get the gist of how to build systems around NLP. We then move on to explore data science-related tasks, following which you will learn how to create a customized tokenizer and parser from scratch. Throughout, we delve into the essential concepts of NLP while gaining practical insights into various open source tools and libraries available in Python for NLP. You will then learn how to analyze social media sites to discover trending topics and perform sentiment analysis. Finally, you will see tools which will help you deal with large scale text.

By the end of this book, you will be confident about NLP and data science concepts and know how to apply them in your day-to-day work.



- 使用NLTK從非結構化數據中提取信息,解決NLP問題
- 分析文本中的語言結構,學習語義分析和解析的概念
- 簡化方式學習文本分析、文本挖掘和網絡爬蟲


- 了解自然語言的複雜性以及機器如何處理它們
- 使用分詞和分塊來清理和整理文本,以幫助更好地處理數據
- 探索不同類型的標籤,並學習如何對句子進行標記
- 創建自定義的解析器和分詞器以滿足你的需求
- 構建具有拼寫校正、搜索、機器翻譯和問答系統等功能的實際應用程式
- 使用爬蟲和抓取擷取任何數據內容
- 在不同的文本片段上執行特徵提取和選擇,並構建分類系統
- 使用其他Python庫,如pandas、scikit-learn、matplotlib和gensim
- 分析社交媒體網站以發現熱門話題並進行情感分析