01Chapter 1: Tokens, types and vocabularyAlmost every NLP system begins by cutting text into units and counting them. Before you build a tokeniser, you need exact definitions for the things being counted. This chapter defines tokens, types, word forms and vocabulary. It then shows how to measure them and how their counts behave as a corpus6 min read
02Chapter 2: Splitting text: whitespace and regular expressionsThis chapter assumes you know basic Python (strings, lists, functions), the re module at the level of character classes, groups and quantifiers, and the difference between a token and a type from the previous chapter. You will build two tokenisers, compare them, and learn where each one fails.6 min read
03Chapter 3: Where simple tokenisers breakThis chapter assumes you can write a basic Python function, read a regular expression, and name English grammar terms such as noun, plural and tense. Earlier chapters introduced tokens, types and two simple tokenisers: splitting on whitespace, and a regular expression that keeps contractions togethe6 min read
04Chapter 4: Normalising text before and after tokenisingThis chapter assumes you can write basic Python (strings, lists, functions, regular expressions) and that you know what a token and a type are from the earlier chapters. You should also be comfortable with the idea of an NLP task such as search or classification, because the right normalisation depe7 min read
05Chapter 5: Subword tokenisation: BPE and WordPieceThis chapter assumes you can read basic Python and you know what a token and a type are. You should also know why word-level tokenisers struggle with rare words, and you should have met the idea of a fixed vocabulary. Earlier chapters covered rule-based tokenisers, stemming and lemmatisation. Here w7 min read
06Chapter 6: Word forms: inflection, derivation, stems and lemmasThis chapter builds the vocabulary you need before stemming and lemmatisation make sense. It assumes you can read basic Python, know what a token and a type are from the earlier chapters, and remember grammar terms such as noun, verb, plural and tense.7 min read
07Chapter 7: Stemming by suffix strippingThis chapter assumes you can write basic Python (strings, lists, functions, regular expressions). It also assumes you know what a token is and what inflection and derivation mean. Both were covered in earlier chapters. You do not need NLTK for the hand-written examples. The library comparisons at th7 min read
09Chapter 9: Overstemming and understemmingThis chapter assumes you can run Python with NLTK installed. It also assumes you know what a stem is and how suffix-stripping stemmers such as Porter and Snowball work. You should also be comfortable with search precision and recall. The chapter covers the two ways a stemmer goes wrong, how to measu6 min read
10Chapter 10: Lemmatisation with a lexiconThis chapter assumes you can write basic Python and regular expressions, and that you know the earlier chapters' terms: token, type, inflection, derivation, stem and lemma. It also assumes you know basic English grammar terms. You will see how a lexicon-based lemmatiser works internally, use NLTK's 6 min read
11Chapter 11: Why part of speech matters for lemmasThis chapter assumes you can read basic Python and know what a lemma is: the dictionary form of a word, such as "run" for "running". It also assumes you have met the WordNet lemmatiser in the previous chapter and know the basic grammar terms noun, verb, adjective, and adverb. You need NLTK installed7 min read
12Chapter 12: Choosing between stemming, lemmatisation and subwordsThis chapter assumes you can write basic Python and read regular expressions. It also assumes you know what an NLP task such as search or classification looks like, and that you have met tokenisation, Porter and Snowball stemmers, and WordNet lemmatisation in the earlier chapters. Here you will comp7 min read