apertium / apertium-recursive

Recursive structural transfer module for Apertium
https://wiki.apertium.org/wiki/Apertium-recursive
GNU General Public License v3.0
6 stars 4 forks source link
apertium-core apertium-tools

Apertium-recursive

A recursive structural transfer module for Apertium

Compiling

./autogen.sh
make

Running

# compile the rules file
src/rtx-comp rule-file bytecode-file

# run the rules
src/rtx-proc bytecode-file < input

# decompile the rules and examine the bytecode
src/rtx-decomp bytecode-file text-file

# compile XML rule files
src/trx-comp bytecode-file xml-files...

# generate random sentences from a rules file
apertium-recursive/src/randsen.py start_node pair_directory source_language_directory

Options for rtx-comp:

Options for trx-comp:

Options for rtx-proc:

Testing

make test

Using in a Pair

In Makefile.am add:

$(PREFIX1).rtx.bin: $(BASENAME).$(PREFIX1).rtx
    rtx-comp $< $@

$(PREFIX2).rtx.bin: $(BASENAME).$(PREFIX2).rtx
    rtx-comp $< $@

and add

$(PREFIX1).rtx.bin \
$(PREFIX2).rtx.bin

to TARGETS_COMMON.

In modes.xml, replace apertium-transfer, apertium-interchunk, and apertium-postchunk with:

<program name="rtx-proc">
  <file name="abc-xyz.rtx.bin"/>
</program>

Documentation