MCPcopy Index your code
hub / github.com/clips/pattern / test_stem

Method test_stem

test/test_vector.py:152–160  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

150 ]
151
152 def test_stem(self):
153 # Assert the accuracy of the stemmer.
154 i = 0
155 n = len(self.input)
156 for a, b in zip(self.input, self.output):
157 if vector.stemmer.stem(a, cached=True) == b:
158 i += 1
159 self.assertEqual(float(i) / n, 1.0)
160 print "pattern.vector.stemmer.stem()"
161
162 def test_stem_case_sensitive(self):
163 # Assert stemmer case-sensitivity.

Callers

nothing calls this directly

Calls 2

lenFunction · 0.85
zipFunction · 0.85

Tested by

no test coverage detected