Subject: Re: [lojban] How do you parse lujvo into the component rafsi?

From: Richard Curnow <[email-masked]>
Date: Sun, 11 Mar 2001 22:41:22 +0000

On Fri, Mar 09, 2001 at 09:12:33PM -0800, seidensticker wrote:
> I'm working on an algorithm for breaking a lujvo into its component
> parts. (My goal: given an unknown lujvo, break it up into parts and
> display the definitions of each of those parts.) Chapter 4, section
> 11 of the grammar book ("The lujvo-making algorithm") talks about
> creating lujvo, but my question is about the reverse. Is there a
> place where this is simply described?

Another "rival" piece of source code you might want to look at is within
my "jbofi'e" program, available at
http://www.rrbcurnow.freeuk.com/jbofihe. There is an algorithm of sorts
within the split_lujvo function in canonluj.c for breaking lujvo into
constituent rafsi. This algorithm is pretty lax about whether consonant
clusters etc are valid or not. It assumes the "lujvo" it has been given
to break up is valid in the first place. To do the legality checking
(in the early stages of processing the input), a fairly complex
automatically generated state machine is used - see morf.c, morf_nfa.in
and the builder sources in the n2d subdirectory. BTW, a new release is
hopefully going to appear quite soon now.

-- 
----------------------------------------------------------------------
Richard P. Curnow [email-masked]
Weston-super-Mare
United Kingdom http://go.to/richard.curnow/