Jump to content

Z13091៖ ភាពខុសគ្នារវាងកំណែនានា

ពីWikifunctions
Replace multiple conditional returns with a single final return
Converting reference to programming language to use an ID
 
(៥ intermediate revisions by one other user not shown)
បន្ទាត់ទី១០៖ បន្ទាត់ទី១០៖
"Z14K3": {
"Z14K3": {
"Z1K1": "Z16",
"Z1K1": "Z16",
"Z16K1": {
"Z16K1": "Z610",
"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"
"Z1K1": "Z61",
"Z61K1": "python"
},
"Z16K2": "def Z13087(Z13087K1):\n\timport re\n\tlemma = Z13087K1.lower()\n\tform = lemma + 'ing'\n\tif lemma.endswith('c') \\\n\t\t\tand 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'\n\tif lemma.endswith('e') \\\n\t\t\tand not re.search(r'[eioy]e$', lemma):\n\t\tform = lemma[:-1]+ 'ing'\n\treturn form"
}
}
},
},
បន្ទាត់ទី៣៧៖ បន្ទាត់ទី៣៤៖
"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"
}
]
]
}
}

កំណែថ្មីបំផុតនៅ ម៉ោង១៦:១៧ ថ្ងៃពុធ ទី២២ ខែឧសភា ឆ្នាំ២០២៤

This page displays in a limited way without JavaScript.