Categorizing and Tagging Words

Back in elementary school you learned the difference between nouns, verbs, adjectives,
and adverbs. These “word classes” are not just the idle invention of grammarians, but
are useful categories for many language processing tasks. As we will see, they arise from
simple analysis of the distribution of words in text. The goal of this chapter is to answer
the following questions:

  1. What are lexical categories, and how are they used in natural language processing?
  2. What is a good Python data structure for storing words and their categories?
  3. How can we automatically tag each word of a text with its word class?