Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: [REBOL parse] Parsing AEIOU and sometimes Y

From: edoconnor::gmail::com at: 2-May-2007 15:25

Hi Ladislav-- On 5/2/07, Ladislav Mecir wrote:
> you can forget about the "sometimes" y when using my suggestion:
I'd be delighted to forget about that! I sure am glad there aren't other special rules, such as "i before e, except after c."
> parse "banana" rule > the trouble is, that your pair counting rule still doesn't look exact
Hmmm... it appears to generate correct results... here is the relevant passage from the research paper: [C]VCVC ... [V] where the square brackets denote arbitrary presence of their contents. Using (VC){m} to denote VC repeated m times, this may again be written as [C](VC){m}[V]. m will be called the measure of any word or word part when represented in this form. The case m=0 covers the null word. Here are some examples: m=0 TR, EE, TREE, Y, BY. m=1 TROUBLE, OATS, TREES, IVY. m=2 TROUBLES, PRIVATE, OATEN, ORRERY. The rule you've written returns the correct m for these words, as well as anything I've thrown at it so far. Thanks