Apertium

Fix lexc2dot so it works with all Apertium lexc files

This code (https://paste2.org/K95Cvh7M) generates a graph of continuation lexica from a .lexc file. The following files in apertium/languages cause the program to break.

./apertium-qve/apertium-qve.qve.lexc 
 ./apertium-tur/apertium-tur.tur.lexc .
 ./apertium-uzb/apertium-uzb.uzb.lexc
 ./apertium-chv/apertium-chv.chv.lexc
 ./apertium-tyv/apertium-tyv.tyv.lexc 
 ./apertium-kaz/apertium-kaz.kaz.lexc

Download the script and check out those language directories. Fix the script so that it works with all of the files.

cat ./apertium-kaz/apertium-kaz.kaz.lexc | python3 lexc2dot.py | dot -Tpng -okaz.lexc.png

Task tags

  • python
  • graphviz

Students who completed this task

Grzegorz Stark

Task type

  • code Code
  • done_all Quality Assurance
close

2017