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

Function step_3

pattern/vector/stemmer.py:198–207  ·  view source on GitHub ↗

Step 3 replaces -ic, -ful, -ness etc. suffixes. This only happens if there is at least one vowel-consonant pair before the suffix.

(w)

Source from the content-addressed store, hash-verified

196 ("s", (("ness", ""),))
197]
198def step_3(w):
199 """ Step 3 replaces -ic, -ful, -ness etc. suffixes.
200 This only happens if there is at least one vowel-consonant pair before the suffix.
201 """
202 for suffix, rules in suffixes3:
203 if w.endswith(suffix):
204 for A,B in rules:
205 if w.endswith(A):
206 return R1(w).endswith(A) and w[:-len(A)] + B or w
207 return w
208
209suffixes4 = [
210 ("al", ("al",)),

Callers

nothing calls this directly

Calls 2

R1Function · 0.85
lenFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…