POS Tagging

NLP grammar sequence labeling syntax

Labelling each word's job

Part-of-speech (POS) tagging assigns every word its grammatical role — noun, verb, adjective, determiner, and so on — based on the word and its context.

It's a classic sequence-labelling task: the tag of each word depends on its neighbours. "book" is a noun in "read a book" but a verb in "book a flight" — only context tells them apart.

Tag a sentence

Watch each word receive its POS tag, including the ambiguous "book" resolved by the words around it.

Common tags

NOUN / PROPN things, names

dog, city, London. The "who/what" of a sentence.

VERB actions

run, is, booked. What's happening.

ADJ / ADV modifiers

happy, quickly. Describe nouns and verbs.

DET / PRON / ADP function words

the, she, on. The grammatical glue.

Why it matters

Lemmatization needs the POS

The lemma of "meeting" depends on whether it's a noun or verb — see Lemmatization.

NER & parsing building block

Tags feed entity recognition and syntactic parsing.

Information extraction patterns

"ADJ + NOUN" patterns pull out product features, key phrases, and more.

How it's done

Classic taggers use Hidden Markov Models or CRFs; modern ones use neural sequence models. Libraries like spaCy and NLTK tag out of the box.