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

Re: lujvo ...




On 20 Aug 98 at 22:39, C.D. Wright wrote:

> Question ...
>
> I vaguely know how to construct  lujvo,  and I vaguely
> know about CCV, CVV, etc., rules.  What I was wondering
> was - is there a simple algorithm that can break apart
> a  lujvo  into its consituent pieces?

Yes, it's not too difficult.  I made a program to do this by
recursively matching the first characters of right-substrings of the
lujvo with rafsi masks, and performing a few checks on the results.
It's not a perfect filter, i.e. it lets through some non-lujvo, but
if you type a valid lujvo it will split it into its component rafsi.
Examples:

    >jvokatna bralo\'i
    bra-lo'i

    >jvokatna soirsai
    soi-r-sai

As you can see, it understands hyphens.  But it would also have read
"soisai" as "soi-sai", when in fact it cannot be a lujvo because it
doesn't have a consonant cluster in the first five letters.  My
program does a few checks, testing valid consonant clusters and vowel
clusters for example, but it wasn't really designed to verify lujvo,
only to help in machine-translating them.

In fact I think it would be very awkward to write a lujvo verifier,
since (if I understand correctly) the only valid lujvo are those
produced by the algorithm in the reference grammar -- at least, in
many places it is stated that you must do exactly what the algorithm
tells you.

In case you're interested in the above program, I uploaded it.  You
can download the C source (written using djgpp, but should be fairly
portable), which is 5k, or a DOS executable (the C source compiled
with djgpp), which is 20k.

    http://users.ox.ac.uk/~mert0407/jvokatna.c
    http://users.ox.ac.uk/~mert0407/jvokatna.exe

--
george.foot@merton.oxford.ac.uk