Mova0.5 pre-release⌕
☰
home / docs / papers / A Good Part-of-Speech Tagger in about 200 Lines of Python

A Good Part-of-Speech Tagger in about 200 Lines of Python

Summary

This article is a practical walkthrough of how to build a fast, accurate part-of-speech tagger with very little code. It argues that a greedy, left-to-right averaged perceptron with a well-chosen set of features gets close to state-of-the-art accuracy, while being much simpler and faster than CRFs or beam-search taggers. Each word is tagged once, using features of the current word, its neighbours, its suffixes and prefixes, and the tags already assigned to the previous words. To work around the train/test mismatch for previous-tag features, training uses the model's own predictions rather than gold tags. The article also stresses small engineering choices that matter in practice, such as a tag dictionary for frequent unambiguous words, word normalisation, and weight averaging. The overall message is that a simple, well-understood linear model is often a better engineering choice than a more complex one.

How Mova uses it

Effectiveness in Mova

Measured on UD English EWT test (from en/src/ptag.rs and the en README):


👨‍🔬💥

More ideas (a second reading)

Topics: Part-of-speech tagging

Cite

The paper itself, not this card. BibTeX from the library's record of the work.

@inproceedings{honnibal2013good,
  title = {{A Good Part-of-Speech Tagger in about 200 Lines of Python}},
  author = {Honnibal, Matthew},
  booktitle = {Blog post (2013-09-18), explosion.ai blog},
  year = {2013},
  url = {https://explosion.ai/blog/part-of-speech-pos-tagger-in-python}
}

This page in Markdown → https://md.mova.elamur.ai/free/en/docs/papers/honnibal-2013-good-part-of-speech-tagger/