teleological/camxes-py — pull request #3 by durka (2014-10-23 04:46:07+00:00)
Title: Lujvo: various features

I'm not trying to suggest that this branch is ready to pull, but I wanted to share what I've been working on...

- jvocuhadju.py is added. It is quite slow because it calls the parser multiple times, but it seems to work.
- vlatai.py got a lot smarter, knowing how to decompose lujvo, type-3 fu'ivla, and cmavo compounds, and showing selma'o in the output. All this can be turned off with `-s`/`--simple` to get the output jbovlaste expects.
- two new transformers: lujvo-break (which returns the bare rafsi) and lujvo-expand (which uses a jbovlaste dump to look up gismu). Currently vlatai.py uses a different method for breaking lujvo. I mean to merge these.

A fair amount of code is duplicated between my additions here and my additions to the ilmentufa IRC bot. I may try to factor them out into a library, but finding the boundary will be tricky since the parser internals are different.