NLP Starter · free course

Free course · Lesson 4 of 5

Tokens, Stop Words and Spelling Variation

In this lesson you will

  • Split text into tokens
  • Explain stop words and normalisation

A token is a unit the computer treats as one item, usually a word, number or punctuation mark. Splitting on spaces is not enough, because punctuation stays attached ("fees," and "fees" become different tokens). Libraries such as spaCy tokenise text properly.

  • Stop words are very common words (the, is, to). Removing them shrinks the vocabulary, but never remove "not" or "no" without checking: "not paid" and "paid" mean opposite things.
  • Lemmatisation reduces words to a base form: "paid" becomes "pay" and "children" becomes "child".
  • Spelling variation: informal messages use "pls", "plz" and "please" for the same word, and Juba Arabic written in Latin script has no single standard spelling. Group variants with the help of speakers and record every rule.

Practical Skill: Count the most frequent unusual tokens in your data; they show you which abbreviations and spelling variants to handle first.

TemplateNormalising a Message
Worksheet
Original:    "Plz I havnt received my ID card, not happy!!"Cleaned:     "plz i havnt received my id card, not happy!"Tokens:      plz | i | havnt | received | my | id | card | , | not | happy | !Normalised:  please | i | have not | received | my | id | card | not | happyContent:     received | id | card | not | happy Normalisation dictionary entries used:  plz   -> please     (checked: common SMS spelling)  havnt -> have not   (checked: common SMS spelling)

Practice exercise

Tokenise one sentence by hand, then mark which tokens you would remove as stop words and which you must keep.

Key takeaways

  • Never remove negations such as 'not' without checking
  • Spelling variants should be grouped with speakers' help
In the full program Module 4: Tokenization and Text Normalization See how this topic is taught in depth, with practical activities and an assessment.

Free self-study lesson — no certificate. For the full instructor-led program, see registration options.