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

Function step_1c

pattern/vector/stemmer.py:158–164  ·  view source on GitHub ↗

Step 1c replaces suffix -y or -Y by -i if preceded by a non-vowel which is not the first letter of the word (cry => cri, by => by, say => say).

(w)

Source from the content-addressed store, hash-verified

156 return w
157
158def step_1c(w):
159 """ Step 1c replaces suffix -y or -Y by -i if preceded by a non-vowel
160 which is not the first letter of the word (cry => cri, by => by, say => say).
161 """
162 if len(w) > 2 and w.endswith(("y","Y")) and is_consonant(w[-2]):
163 return w[:-1] + "i"
164 return w
165
166suffixes2 = [
167 ("al", (("ational", "ate"), ("tional", "tion"))),

Callers

nothing calls this directly

Calls 2

lenFunction · 0.85
is_consonantFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…