Re: Splitting word based on syllables
- From: "Advait" <advait_raut@xxxxxxxxxxxxxx>
- Date: 3 Jul 2006 11:43:23 -0700
Hi,
mayo_matt@xxxxxxxxxxx wrote:
Hi all,
I'll state up front that I am looking for HELP with an assignment...
not looking to get my work done for me at all. I am finishing up a
course in Prolog and AI, and while I am doing fairly well in the course
and grasping most things, I am stuck on one of the earlier assignment
questions.
I need to read a word in from the user and then split it into syllables
based on one of 2 rules: vowel-consonant-vowel, or
vowel-consonant-consonant-vowel, with the syllabic splits hopefully
intuitive to anyone reading this :)
What I figure I should be doing is reading in the word and then using
name to generate a list of ASCII chars. I should then read char by
char from the list and compare each char to a list of vowels. Once I
encounter a vowel I should then look a the next letter to see if it is
a consonant. A syllable will be formed based on the char that follows
this one (vowel next leads to one rule while consonant leads to the
other).
I really can't figure out how to implement this practically. THe
method I have laid out seems to make sens to me, but I cannot convert
it to code.
First of all, am I on the right track? And if I am, does anyone have a
suggestion of how to star this? If I am not on course, course someone
gently nudge me in the right direction?
I'd appreciate any input or considertation that anyone may have for me.
Thanks in advance.
Probably I can help you.
Use atom_chars to convert user input atom into list.
Then use append to split the list into randome parts.
Define a validator which can validate List's pieces according to
required rules.
end
Yours,
Advait
.
- References:
- Splitting word based on syllables
- From: mayo_matt
- Splitting word based on syllables
- Prev by Date: Choosing relations at random using findall
- Next by Date: Re: Splitting word based on syllables
- Previous by thread: Re: Splitting word based on syllables
- Next by thread: Choosing relations at random using findall
- Index(es):
Relevant Pages
|
|