NLTK Guides: Demonstration Code and Regression Tests

These files serve two purposes. First, they demonstrate to use NLTK to perform a variety of tasks. And second, they act as a regression test suite, to ensure that new bugs are not accidentally introduced into NLTK.

Each file typically begins with a description of the topic(s) covered by that file, followed by several sections containing explanatory examples. These examples should be helpful to anyone who wants to learn more about specific pieces of NLTK.

These explanatory sections are followed by "regression test" sections, which are meant to verify that NLTK's implementation is functioning properly. These sections tend to explore NLTK's behavior in a variety of exceptional cases. The "regression test" sections may be useful to NLTK users, but are mainly intended for testing purposes. In order to help develop complete test sets, we automatically determine which parts of NLTK's source code are covered by tests. Our goal is to have 100% coverage for all modules.

Topic Lines Tests Test Outcome
Chunking 350 80 Passed!
Classifiers 130 16 1 test failed!
Corpus Readers 2,100 430 7 tests failed!
Discourse Checking 490 40 29 tests failed!
Discourse Representation Theory 250 100 Passed!
Examples for Portuguese Processing 320 60 2 tests failed!
Feature Grammar Parsing 470 70 10 tests failed!
Feature Structures & Unification 1,200 340 Passed!
Glue Semantics 320 140 Passed!
Information Extraction 240 23 1 test failed!
Loading Resources From the Data Package 300 60 3 tests failed!
Logic & Lambda Calculus 380 200 Passed!
Logical Inference and Model Building 420 60 22 tests failed!
Parsing 500 100 Passed!
Resolution Theorem Prover 160 90 22 tests failed!
Resolution Theorem Prover 210 90 3 tests failed!
Semantics 600 120 6 tests failed!
Semantics Exercises 500 100 Passed!
Stemmers 160 50 Passed!
Taggers 410 70 Passed!
Test Suites for Grammars 90 16 Passed!
Tokenizers 290 50 Passed!
Unit test cases for ''toolbox'' 300 110 Passed!
Unit test cases for ''toolbox'' 13 4 Passed!
Unit tests for nltk.tree.Tree 1,100 290 Passed!
Unit tests for the TreeTransformation class 150 23 Passed!
Unit tests for the miscellaneous sort functions. 110 19 Passed!
Unit tests for the nltk.utilities module 150 48 Passed!
WordNet Interface 320 70 Passed!

Return to the NLTK Homepage