nltk.test.unit.lm.test_counter module

class nltk.test.unit.lm.test_counter.TestNgramCounter[source]

Bases: object

Tests for NgramCounter that only involve lookup, no modification.

classmethod setup_class()[source]
test_N()[source]
test_bigram_counts_seen_ngrams()[source]
test_bigram_counts_unseen_ngrams()[source]
test_counter_len_changes_with_lookup()[source]
test_ngram_conditional_freqdist()[source]
test_ngram_order_access_unigrams()[source]
test_unigram_counts_completely_unseen_words()[source]
test_unigram_counts_seen_words()[source]
class nltk.test.unit.lm.test_counter.TestNgramCounterTraining[source]

Bases: object

classmethod setup_class()[source]
test_empty_inputs(case)[source]
test_train_on_bigrams()[source]
test_train_on_illegal_sentences()[source]
test_train_on_mix()[source]
test_train_on_unigrams()[source]