python - Testing to see if a word contains only specified syllables -
I have to check that only one syllable contains only one word. For example, if a word "pickuppieu" contains only syllables , "P", "ka", or "chu", then I have to return "yes". If there are other syllables or characters in it, I want to "no" back.
Another example:
The word "peakapacchudo" returns
Returns: "No" because it contains 'P', 'K' and 'Chu' P>
There is no other word for describing a stroke where each letter is open and the nuclei Is always done by a cluster before. (With some extra, which I hope is unimportant here, Japanese is a language with this structure.) In this way you get a regular expression like pc Aeou]
to describe each syllable.
Comments
Post a Comment