Elamur Research⌕
☰
home / papers / 2006 / NLTK: The Natural Language Toolkit

NLTK: The Natural Language Toolkit

Summary

The paper describes a reworked version of NLTK, an open-source (GPL) collection of Python modules, corpus samples, tutorials and exercises for teaching and prototyping in computational linguistics. Earlier releases had grown complicated. NLTK 1.4 in particular tried to let independent tasks, such as tagging and stemming, share one representation through a blackboard architecture for tokens. That design forced programmers into clumsy code. The new release drops much of this complexity. It uses simpler linguistic data structures and newer Python language features. Through short interactive sessions, the author shows tokenization, Porter stemming, corpus readers, a range of taggers chained by backoff, regex-based chunking, and context-free and probabilistic parsing. The paper also explains how the toolkit helps a single-semester NLP course cover both theory and practice. It does this through graphical step-by-step algorithm demonstrations and assignments that grow in difficulty. The work matters because it lowers the entry barrier to hands-on NLP for students and researchers.

Key points

  • The toolkit ships samples and readers for the Penn Treebank, the CMU Pronunciation Dictionary, the Brown Corpus, the NIST IEER Corpus, the CoNLL-2000 Chunking Corpus and the PP Attachment Corpus, and it also supports the SIL Shoebox format.
  • Taggers range from a default tagger (alone it gets only about 10–20% of tokens right) to regexp, unigram, bigram, Brill (contributed by Christopher Maloof) and HMM (contributed by Trevor Cohn). Accuracy is measured with tag.accuracy() against gold-standard text.
  • The parsers include recursive-descent, shift-reduce, chart parsing with a bottom-up strategy, a Viterbi-style PCFG parser and bottom-up probabilistic chart parsers. A demo sentence yields two parses because of PP-attachment ambiguity.
  • Chunking supports bracket and IOB notations, regular-expression chunk parsers, cascades of chunkers, and evaluation and error-analysis tools.
  • The rewrite was motivated by NLTK 1.4's blackboard token architecture, which made code awkward for programmers.

Interesting ideas

  • I1. Backoff chains of taggers: a bigram tagger falls back to a unigram tagger, which in turn falls back to regex rules. Every token then gets a tag while the statistical models are still used where they apply. The same cascade suits low-resource languages, where trained models leave many unknown words.
  • I2. Simplicity over a unified architecture: the authors admit that a general shared-data design made the toolkit harder to use, and they rolled it back. This is a useful reminder when designing data pipelines. Plain, task-specific structures can serve users better than one elegant universal format.
  • I3. Self-running demo modes: most components can perform a meaningful task without user input, and their state can be viewed step by step in a GUI. Shipping this kind of runnable illustration with any library or dataset helps onboarding and teaching.
  • I4. Graduated assignments built on existing modules: students first use a module, then modify it (for example, turning a recursive-descent parser into a left-corner parser), then build and integrate new components. This staged path also works for training new contributors on a shared codebase.
  • I5. Corpus readers that know the file layout: these readers load annotated data straight into native data structures. This removes repetitive parsing code and is worth copying for any family of in-house corpora.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

Fields: Natural language processing

Topics: Part-of-speech tagging

Cited by

539 papers of our library cite it (of the 140884 whose bibliographies we read); 36 of them have a page here, 503 not yet.

Cite

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.3115/1225403.1225421

@inproceedings{bird2006nltk,
  title = {{NLTK: The Natural Language Toolkit}},
  author = {Bird, Steven},
  booktitle = {Proceedings of the COLING/ACL 2006 Interactive Presentation Sessions},
  year = {2006},
  doi = {10.3115/1225403.1225421},
  url = {https://doi.org/10.3115/1225403.1225421}
}

References

3 references, 0 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Marti Hearst. 2005. Teaching applied natural language processing: Triumphs and tribulations. In Proc 2nd ACL Workshop on Effective Tools and Methodologies for Teaching NLP and CL, pages 1–8, ACL Elizabeth Liddy and Nancy McCracken. 2005. Hands-on NLP for an interdisciplinary audience. In Proc 2nd AC… find
  2. David Beasley. 2006. Python Essential Reference, 3rd Edition. Sams. find
  3. Rune Sætre, Amund Tveit, Tonje S. Steigedal, and Astrid Lægreid. 2005. Semantic annotation of biomedical literature using Google. In Data Mining and Bioinformatics Workshop, volume 3482 of Lecture Notes in Computer Science. Springer. find

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/bird-2006-nltk-natural-language-toolkit/