nltk.test.unit.test_stem module¶
- class nltk.test.unit.test_stem.SnowballTest[source]¶
Bases:
TestCase
- class nltk.test.unit.test_stem.PorterTest[source]¶
Bases:
TestCase
- test_vocabulary_martin_mode()[source]¶
Tests all words from the test vocabulary provided by M Porter
The sample vocabulary and output were sourced from https://tartarus.org/martin/PorterStemmer/voc.txt and https://tartarus.org/martin/PorterStemmer/output.txt and are linked to from the Porter Stemmer algorithm’s homepage at https://tartarus.org/martin/PorterStemmer/
- test_oed_bug()[source]¶
Test for bug https://github.com/nltk/nltk/issues/1581
Ensures that ‘oed’ can be stemmed without throwing an error.
- test_lowercase_option()[source]¶
Test for improvement on https://github.com/nltk/nltk/issues/2507
Ensures that stems are lowercased when to_lowercase=True