Thursday, 15 September 2011

python - Testing to see if a word contains only specified syllables -



python - Testing to see if a word contains only specified syllables -

i need test if word contains syllables. illustration if word, "pikakapichu" contains syllables, "pi", "ka", or "chu", want homecoming "yes". if contains other syllables or characters want homecoming "no".

another example:

word= "pikapikachudo"

returns: "no" because has syllable other 'pi', 'ka', , 'chu'

you appear describing phonology each syllable open , nucleus vowel preceded cluster of consonants. (with additions hope unimportant here, japanese language structure.) can utilize regular look like

[bcdfghj-np-tvwxz]+[aeiou]

to describe each syllable.

python

No comments:

Post a Comment