Preface
Introduction
- What is Natural Language Processing?
- Challenges in Natural Language Processing
- What makes this book different?
- Part 1: Introduction to NLTK
NLTK Fundamentals
- Installing NLTK
- Splitting Text
- Building a vocabulary
- Fun with Bigrams and Trigrams
- Pointwise Mutual Information
- Part Of Speech Tagging
- Named Entity Recognition
Getting started with Wordnet
- Wordnet Structure
- Lemma Operations
Lemmatizing and Stemming
- How stemmers work
- How lemmatizers work
- Part 2: Create a Text Analysis service
Introduction to Machine Learning
- A Practical Machine Learning Example
Getting Started with Scikit-Learn
- About NumPy
- Installing Scikit-Learn and building a dataset
- Training a Scikit-Learn Model
- Making Predictions
Finding the data
- Existing corpora
- Ideas for Gathering Data
- Getting the Data
Learning to Classify Text
- Text Feature Extractor
- Scikit-Learn Feature Extraction
- Text Classification with Naive Bayes
Persisting models
Building the API
- Building a Flask API
- Deploy to Heroku
- Part 3: Create a Social Media Monitoring Service
Basics of Sentiment Analysis
- Be Aware of Negations
- Machine Learning doesn’t get Humour
- Multiple and Mixed Sentiments
- Non-Verbal Communication
Twitter Sentiment Data
- Twitter Corpora
- Other Sentiment Analysis Corpora
- Building a Tweets Dataset
- Sentiment Analysis - A First Attempt
- Better Tokenization
Fine Tuning
- Try a different classifier
- Use Ngrams Instead of Words
- Using a Pipeline
- Cross Validation
- Grid Search
- Picking the Best Tokenizer
Building the Twitter Listener
Classification Metrics
- Binary Classification
Multi-Class Metrics
- The Confusion Matrix
- Part 4: Build Your Own NLP Toolkit
Build Your Own Part-Of-Speech Tagger
- Part-Of-Speech Corpora
- Building Toy Models
- About Feature Extraction
- Using the NLTK Base Classes
- Writing the Feature Extractor
- Training the Tagger
- Out-Of-Core Learning
Build a Chunker
- IOB Tagging
- Implementing the Chunk Parser
- Chunker Feature Detection
Build a Named Entity Extractor
- NER Corpora
- The Groningen Meaning Bank Corpus
- Feature Detection
- NER Training
Build a Dependency Parser
- Understanding the Problem
- Greedy Transition-Based Parsing
- Dependency Dataset
- Writing the Dependency Parser Class
Adding Labels to the Parser
- Learning to Label Dependencies
- Training our Labelled Dependency Parser
- Part 5: Build Your Own Chatbot Engine
General Architecture
- Train the Platform via Examples
- Action Handlers
Building the Core
- Chatbot Base Class and Training Set
- Training the Chatbot
- Everything together
MovieBot
- The Movie DB API
- Small-Talk Handlers
- Simple Handlers
- Execution Handlers
MovieBot on Facebook
- Installing ngrok
- Setting up Facebook
- Trying it Out
- What Next?