Step 3 replaces -ic, -ful, -ness etc. suffixes. This only happens if there is at least one vowel-consonant pair before the suffix.
(w)
| 196 | ("s", (("ness", ""),)) |
| 197 | ] |
| 198 | def 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 | |
| 209 | suffixes4 = [ |
| 210 | ("al", ("al",)), |