[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is Lojban a CFG? (was Re: [lojban-beginners] Re: Enumerating in Lojban)



Moving this to the main list.

I found most of it too technical for me to make much sense of; my CS
degree is 10 years behind me these days.

On Tue, Jul 11, 2006 at 05:34:30PM -0400, Jonathan Gibbons wrote:
> >> then "le nu broda ku brode" and "le nu broda kei brode" are
> >> grammatical, but "le nu broda brode", eliding both terminators,
> >> is not.  But if we rewrote the elidable terminators as optional
> >> elements, then "le nu broda brode" would be grammatical and
> >> ambiguous.
> >
> 
> I've read this at least three or four times already; given that
> grammar and a general context-free language parser, rather than an
> LALR(1) parser, it would find the derivation that splits "le nu
> broda brode" into "(le nu broda) (brode)" by the start symbol, and
> then "((LE) (NU broda)) (brode)" and so on, becuase with the
> requirement of a sumti and a selbri, that statement is /not/
> ambiguous. 

It's actually a two-selbri requirement, not a sumti+selbri
requirement.

Try it with:

le nu broda ku brode brodi

le nu broda kei brode brodi

le nu broda brode brodi

Where should the last one break off the second selbri?  Answer:
no-where; it's simply not valid lojban, and no place is more valid
than any other.  There is no correct fix.

> >Not to claim that this can be done in general (maybe it can, I
> >don't know), I would like to point out that this particular
> >example can easily be fixed by re-iterating the 'selbri' rule in
> >sumti, with minor modifications:
> >
> >        start = sumti selbri
> >        sumti = LE tanru /KU/
> >                | LE NU tanru /KEI/ /KU/
> >                | LE NU tanru /KU/
> >                | LE NU tanru /KEI/
> >        selbri = tanru | NU tanru /KEI/
> >        tanru = BRIVLA | tanru BRIVLA
> >
> 
> That certainly does remove the (unambiguous given the previous
> grammar) statement "le nu broda brode", if the elements in "/"s
> are now required. Although it does look like there would need to
> be an option under selbri for "NU tanru" by itself, to accept all
> of the above statements. If, on the other hand, they are optional,
> then it accepts the same language as the above. If they're a hack,
> then they're still a hack.

They were intended to be optional; I never tested this grammar that
I can recall.

> That said, I suspect this discussion may be outside the scope of
> the beginners' list; would it be more polite to swap to a less
> spam-everyone forum?

Done.

-Robin

-- 
http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/
Reason #237 To Learn Lojban: "Homonyms: Their Grate!"
Proud Supporter of the Singularity Institute - http://singinst.org/