These are scripts that I've written to do something
or other having to do with Lojban. I put them up here
in case anyone else might find them useful.
Note: these are quick experiments, not full-length
programs, and I make no guarantee that you will be able
to run them or make any use of them.
A Python script to provide various lujvo analyses is
here. The script can do the following things:
Look up gismu based on rafsi (raf_dict) and rafsi based on gismu (gim_dict).
Divide a lujvo into its constituent rafsi. (function katna, returns a list)
Decide whether a lujvo is morphologically correct according to the rules
in the book. (function is_valid_lujvo)
Return the tanru (the veljvo) that underlies a lujvo. (function tanru)
Return the official score of a lujvo according to the system in the book.
(function score)
Lojbanize a Linnaean name to a fu'ivla or a cmene based on the guidelines
in the book. (function linnaean)
Connect a list of rafsi to form a morphologically valid lujvo, including
tosmabru testing. (function jonsimgau)
Figure out all possible lujvo based on a given tanru.
(combination of rafpoi, vlapoi, and jonsimgau)
Correct a lujvo, in case it's morphologically incorrect. (function verify)
Calculate the best scoring lujvo among a sequence passed to it. (function best_score)
Check if a gismu clashes with an already existing gismu, based
on the clashing rules in the book (function clashes)
Return a list of all possible rafsi based on a gismu form, whether
or not they're already assigned. (function possible_rafsi)
Return a list of all unassigned rafsi based on a given gismu form.
(function available_rafsi)
A Python script to generated random lujvo based on the
gismu
thesaurus is here, and
here is a script to generate
a nice looking html document from its output. (For a better
explanation of what this is supposed to do, see
here.