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

[lojban] Lojban parsing using Common Lisp



I have posted the first version of my Common Lisp PEG parser generator to
http://common-lisp.net/project/cl-peg/.

Using this program in combination with the lojban PEG grammar
(http://people.debian.org/~jewel/lojban_peg/lojban_grammar.peg) it is possible to parse
lojban text into a tree of objects.

Like Robin's RATS! parser
(http://www.digitalkingdom.org/~rlpowell/hobbies/lojban/grammar/index.html) this gives us
the potential to:

* Check whether the input is well-formed (is grammatically correct or not)
* Guess at which part of the text is malformed
* Transform the input into another form (such as marked up HTML, or glossed output like
that produced by jbofihe)
* Interpret the data against some existing knowledge (see
http://sow.lcs.mit.edu/2004/proceedings/Speer.pdf) or manipulate it in some way for
searching or publishing electronic data (eg http://jorne.sourceforge.net/)

The reason I specifically implemented this parser in Lisp is because I think it makes a
great platform for interactively manipulating lojbanic input and interactive programming
of lobjan-related programs.

Although we already have several software tools that process lojban I think we have only
scratched the surface of possible applications. 

I would love to see a syntax-aware editing environment for composing lojban text. Not only
would it provide lookup information for lojban word lists and fuihvla, but also give hints
as to the grammaticality and semantics of your text.

Notes:

- To use my grammar I suggest you install the SBCL Lisp compiler and the SLIME editor.
- Here is a graph of a part of the parse tree produced for "ko sipna". In this picture the
nodes are in reverse order (fixed in a later version of my program)
http://people.debian.org/~jewel/lojban_peg/ko_sipna.png

John Leuner


---------------------------------------------
This message was sent using M-Web Airmail - JUST LIKE THAT
Get an SMS sent to your phone when you receive an email and save time and money.
M-Web members only. http://mweb.co.za/mobile .




To unsubscribe from this list, send mail to lojban-list-request@lojban.org
with the subject unsubscribe, or go to http://www.lojban.org/lsg2/, or if
you're really stuck, send mail to secretary@lojban.org for help.