Part-of-speech tagging: assign and evaluate word classes in context
Learn how POS tags depend on context, how to choose a tag scheme, and what to check when evaluating across datasets.
Part-of-speech tagging: assign and evaluate word classes in context
Part-of-speech (POS) tagging assigns a grammatical category to each token in context. The same word form can play different roles, so a word list alone is not enough. Before choosing a tagger or preparing data, fix the tokenization and tag scheme, then evaluate on text that represents the target language and domain.
Classify the use, not the word in isolation
In “I read a book,” book is a noun; in “Book a room,” it is a verb. A tagger uses surrounding words and sentence structure to distinguish the uses. POS tagging therefore differs from assigning one permanent part of speech to each dictionary entry.
POS gives a broad grammatical category. Morphological features add more detail. In Universal Dependencies (UD), UPOS holds a universal POS category; XPOS can optionally hold a language- or treebank-specific tag; FEATS can record properties such as number, case, or tense. Dependency parsing is a separate task that connects words through grammatical relations. CoNLL-U stores these annotations in separate fields.
Consider the Korean sentence “나는 책을 읽었다” (“I read a book”). The tokens and tags depend partly on whether particles and endings are split into separate morphemes. This is an illustrative example of how segmentation affects analysis, not a gold annotation for a particular corpus.
Choose a tag scheme first
No universal tagset expresses every language distinction at the same level of detail. UD v2 defines 17 UPOS categories, including ADJ, NOUN, and VERB; language-specific detail can be represented with XPOS and morphological features. Petrov, Das, and McDonald (2012) describe mapping existing treebank tags to universal categories to compare resources across languages. Such mappings aid comparison, but should not be assumed to preserve every distinction in the original scheme.
For a practical project:
**Fix input units:** define sentence boundaries and tokenization. For languages that need morpheme-level analysis, align segmentation and tagging rules.
**Document labels:** record the tagset version and examples of what each label includes and excludes. Keep explicit mappings when combining treebanks.
**Control comparisons:** use the same tokenization, data splits, scoring rules, and evaluation script for candidate taggers.
**Inspect errors:** look beyond overall accuracy at confusing pairs such as nouns and verbs, unknown words, punctuation, and tokenization mistakes.
Read accuracy with its conditions
Token accuracy is the share of tokens whose predicted tag matches the reference. It can hide the effects of tokenization differences or inconsistent label schemes. Wisniewski and Yvon’s 2019 study of Universal Dependencies treebanks discusses how cross-treebank performance differences may be related to annotation divergence between training and evaluation data. Read a score together with the test set and annotation guidelines.
| Situation | What to check |
|---|---|
| Applying to a new domain | Evaluate separately on the expected input, such as news, conversation, or technical text |
| Comparing languages or treebanks | Check UPOS/XPOS mapping, tokenization, and annotation guidelines |
| High score but odd outputs | Inspect per-tag confusions and representative sentences |
| Using new data in production | Review a sample and reevaluate when the tag policy changes |
Before deployment, have people review a sample of target text to establish reference labels, and split train, development, and test data by document. Duplicated sentences or documents across splits can overstate generalization. Reevaluate when the domain or annotation policy changes. Tagger quality depends not only on model scores but also on whether segmentation, labels, annotation consistency, and use context fit together.
References
[Universal Dependencies: Universal POS tags](https://universaldependencies.org/u/pos/index.html) (UD v2)
[Universal Dependencies: CoNLL-U Format](https://universaldependencies.org/format.html) (UPOS, XPOS, and FEATS fields)
Petrov, Das & McDonald, [A Universal Part-of-Speech Tagset](https://aclanthology.org/L12-1115/), LREC 2012.
Wisniewski & Yvon, [How Bad are PoS Tagger in Cross-Corpora Settings?](https://aclanthology.org/N19-1019/), NAACL 2019.