Z13091: Difference between revisions

From Wikifunctions
extend -ee -ie rule to -oe and -ye
Pipe removed
(6 intermediate revisions by the same user not shown)
Line 14: Line 14:
"Z61K1": "python"
"Z61K1": "python"
},
},
"Z16K2": "def Z13087(Z13087K1):\n\timport re\n\tif Z13087K1.endswith('c') \\\n\t\t\tand re.search(r'[aeiou]c$', Z13087K1):\n\t\treturn Z13087K1 + 'k' + 'ing'\n\tif re.search(r'[aeiou][bdfgkmnprstvz]$', Z13087K1) \\\n\t\t\tand not re.search(r'[aeiou][aeiou][bdfgkmnprstvz]$', Z13087K1):\n\t\treturn Z13087K1 + Z13087K1[-1] + 'ing'\n\tif Z13087K1.endswith('ie') :\n\t\treturn Z13087K1[:-2] + 'ying'\n\tif Z13087K1.endswith('e') \\\n\t\t\tand not re.search(r'[eioy]e$', Z13087K1):\n\t\treturn Z13087K1[:-1]+ 'ing'\n\treturn Z13087K1 + 'ing'"
"Z16K2": "def Z13087(Z13087K1):\n\timport re\n\tlemma = Z13087K1.lower()\n\tform = lemma + 'ing'\n\tif re.search(r'[aeiou]c$', lemma):\n\t\tform = lemma + 'k' + 'ing'\n\tif re.search(r'[aeiou][bdfgkmnprstvz]$', lemma) \\\n\t\t\tand not re.search(r'[aeiou][aeiou][bdfgkmnprstvz]$', lemma):\n\t\tform = lemma + lemma[-1] + 'ing'\n\tif lemma.endswith('ie') :\n\t\tform = lemma[:-2] + 'ying' # Very few exceptions like \"boogieing\" \n\tif lemma.endswith('e') \\\n\t\t\tand not re.search(r'[éeioy]e$', lemma) \\\n\t\t\tand not re.search(r'[cg][cg]e$', lemma) \\\n\t\t\tand not re.search(r'[bcdfghjklmnpqrstvwxz][bdfjkmnpqrstvwxz]e$', lemma):\n\t\tform = lemma[:-1]+ 'ing'\n\treturn form"
}
}
},
},
Line 37: Line 37:
"Z1K1": "Z12",
"Z1K1": "Z12",
"Z12K1": [
"Z12K1": [
"Z11"
"Z11",
{
"Z1K1": "Z11",
"Z11K1": "Z1002",
"Z11K2": "Sometimes double some final consonants, drop final e (generally), mutate final ie to y, and add -ing"
}
]
]
}
}

Revision as of 21:10, 22 February 2024

This page displays in a limited way without JavaScript.