All courses

Intermediate · module I8

Natural Language Processing in Practice

By the end: Clean and represent text, build a text classifier and sentiment analyser, and build an intent-based chatbot

Covers
Processing text in Python, from tokens to sentiment analysis and chatbots
Contents
3 chapters, 13 topics
Time
About 2 hours
Level
Intermediate
Your progress
0 / 13

This module builds on Machine Learning Foundations. We suggest looking at it first, but the choice is yours.

Chapter 1 Text Processing

  1. 1.1

    Stages of NLP

    Lexical, syntactic, semantic, discourse and pragmatic analysis

    Interactive: trace a sentence through the stages

    8 minBeing written
  2. 1.2

    Tokenisation and Text Cleaning

    Splitting text, lowercasing, removing punctuation and stopwords

    Code: clean product reviews

    10 minBeing written
  3. 1.3

    Stemming and Lemmatisation

    Reducing words to their root

    Code: compare a stemmer and a lemmatiser

    8 minBeing written
  4. 1.4

    Parts of Speech and Named Entities

    Tagging nouns, verbs, people, places and dates

    Code: extract entities from news

    10 minBeing written

Chapter 2 Representing Text

  1. 2.1

    Bag of Words

    Counting words to turn text into numbers

    Code: build a vocabulary

    10 minBeing written
  2. 2.2

    TF-IDF

    Weighting words that are frequent here but rare elsewhere

    Code: find the keywords of a document

    tf-idf = tf × log(N / df)

    10 min Read
  3. 2.3

    Word Embeddings

    Words as vectors whose distance reflects meaning

    Interactive: explore word neighbours

    10 minBeing written

Chapter 3 NLP Applications

  1. 3.1

    Sentiment Analysis

    Classifying text as positive, negative or neutral

    Code: a review sentiment analyser

    15 minBeing written
  2. 3.2

    Text Classification

    Spam, topic and intent classification

    Code: a news topic classifier

    12 minBeing written
  3. 3.3

    Intent-Based Chatbots

    Intents, entities and responses

    Lab: build a shop assistant chatbot

    15 minBeing written
  4. 3.4

    Speech to Text and Text to Speech

    Using speech services from Python

    Code: transcribe a voice note

    10 minBeing written
  5. 3.5

    NLP for Indian Languages

    Scripts, code-mixing and multilingual models

    Code: translate and analyse Hinglish text

    10 minBeing written
  6. 3.6

    Module Review and Assessment

    Exercises and a scored quiz

    Graded lab

    15 minBeing written