CourseAI Engineering: The Complete Course · Module 5: NLP for Applications · part 35 of 105
Part 35 · Module 5: NLP for Applications

Lesson 1: From a messy ticket to tokens a model can count

17 min read·13 Oct 2026
Module 5 · Lesson 1 · About 40 minutes · Needs: Module 1 (Python strings and regular expressions)

The situation

Priya wants to know what customers complain about most, so Dev exports a week of tickets and counts the words. The count is useless: refund, Refund and refund. count as three words. Tickets from the web form carry <p> tags and &amp; where the customer typed &. One has an apostrophe that looks normal but matches nothing.

Nothing is wrong with the counting. The text was never made ready. This lesson takes one messy ticket from raw string to tokens, the pieces search and language models work with, and shows what each step keeps and loses.

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.