Find words with alternating vowels and consonants: Difference between revisions

Content deleted Content added
Wherrera (talk | contribs)
Petelomax (talk | contribs)
Line 378: Line 378:
telekinesis teratogenic topologize unilateral unimodular uninominal
telekinesis teratogenic topologize unilateral unimodular uninominal
verisimilitude
verisimilitude
</pre>

=={{header|Phix}}==
Not even slightly challenging, or in any way possibly ever useful, or the slightest bit interesting.... Yawneroo.
<lang Phix>function odd(integer idx) return remainder(idx,2)=1 end function
function vowel(integer ch) return find(ch,"aeiou")!=0 end function
function oddeven(string word)
if length(word)<=9 then return false end if
sequence consonants = apply(word,vowel),
ohoneohone = apply(tagset(length(word)),odd)
return find(consonants,{ohoneohone,sq_not(ohoneohone)})
end function
sequence words = filter(get_text("demo/unixdict.txt",GT_LF_STRIPPED),oddeven)
printf(1,"%d olacelavovv words found: %s\n",{length(words),join(shorten(words,"",3),", ")})</lang>
{{out}}
<pre>
67 olacelavovv words found: aboriginal, apologetic, bimolecular, ..., unimodular, uninominal, verisimilitude
</pre>
</pre>