© 2019

Text Analytics with Python

A Practitioner's Guide to Natural Language Processing


Table of contents

  1. Front Matter
    Pages i-xxiv
  2. Dipanjan Sarkar
    Pages 1-68
  3. Dipanjan Sarkar
    Pages 69-114
  4. Dipanjan Sarkar
    Pages 115-199
  5. Dipanjan Sarkar
    Pages 201-273
  6. Dipanjan Sarkar
    Pages 275-342
  7. Dipanjan Sarkar
    Pages 343-451
  8. Dipanjan Sarkar
    Pages 453-517
  9. Dipanjan Sarkar
    Pages 519-566
  10. Dipanjan Sarkar
    Pages 567-629
  11. Dipanjan Sarkar
    Pages 631-659
  12. Back Matter
    Pages 661-674

About this book


Leverage Natural Language Processing (NLP) in Python and learn how to set up your own robust environment for performing text analytics. The second edition of this book will show you how to use the latest state-of-the-art frameworks in NLP, coupled with Machine Learning and Deep Learning to solve real-world case studies leveraging the power of Python.

This edition has gone through a major revamp introducing several major changes and new topics based on the recent trends in NLP. We have a dedicated chapter around Python for NLP covering fundamentals on how to work with strings and text data along with introducing the current state-of-the-art open-source frameworks in NLP. We have a dedicated chapter on feature engineering representation methods for text data including both traditional statistical models and newer deep learning based embedding models. Techniques around parsing and processing text data have also been improved with some new methods.

Considering popular NLP applications, for text classification, we also cover methods for tuning and improving our models. Text Summarization has gone through a major overhaul in the context of topic models where we showcase how to build, tune and interpret topic models in the context of an interest dataset on NIPS conference papers. Similarly, we cover text similarity techniques with a real-world example of movie recommenders. Sentiment Analysis is covered in-depth with both supervised and unsupervised techniques. We also cover both machine learning and deep learning models for supervised sentiment analysis. Semantic Analysis gets its own dedicated chapter where we also showcase how you can build your own Named Entity Recognition (NER) system from scratch. To conclude things, we also have a completely new chapter on the promised of Deep Learning for NLP where we also showcase a hands-on example on deep transfer learning.

While the overall structure of the book remains the same, the entire code base, modules, and chapters will be updated to the latest Python 3.x release.
Also the key selling points
• Implementations are based on Python 3.x and state-of-the-art popular open source libraries in NLP 
• Covers Machine Learning and Deep Learning for Advanced Text Analytics and NLP
• Showcases diverse NLP applications including Classification, Clustering, Similarity Recommenders, Topic Models, Sentiment and Semantic Analysis


Text Mining Python Natural Language Basics Text Classification Text Clustering Sentiment Analysis Deep Learning in Text Analysis

Authors and affiliations

  1. 1.BangaloreIndia

About the authors

Dipanjan (DJ) Sarkar is a Data Scientist at Red Hat, a published author and a consultant and trainer. He has consulted and worked with several startups as well as Fortune 500 companies like Intel. He primarily works on leveraging data science, advanced analytics, machine learning and deep learning to build large- scale intelligent systems. He holds a master of technology degree with specializations in Data Science and Software Engineering. He is also an avid supporter of self-learning and massive open online courses. He has recently ventured into the world of open-source products to improve the productivity of developers across the world.

Dipanjan has been an analytics practitioner for several years now, specializing in machine learning, natural language processing, statistical methods and deep learning. Having a passion for data science and education, he also acts as an AI Consultant and Mentor at various organizations like Springboard, where he helps people build their skills on areas like Data Science and Machine Learning. He also acts as a key contributor and Editor for Towards Data Science, a leading online journal focusing on Artificial Intelligence and Data Science. Dipanjan has also authored several books on R, Python, Machine Learning, Social Media Analytics, Natural Language Processing and Deep Learning.

Dipanjan's interests include learning about new technology, financial markets, disruptive start-ups, data science, artificial intelligence and deep learning. In his spare time he loves reading, gaming, watching popular sitcoms and football and writing interesting articles on and He is also a strong supporter of open-source and publishes his code and analyses from his books and articles on GitHub at

Bibliographic information