GSoC/GCI Archive
Google Code-in 2014 Apertium

Bison error token in transfer4

completed by: Stan K.

mentors: Mikel Forcada, Francis Tyers

Apertium is working on a new transfer system, the prototype is in Bison and can be found here:

https://svn.code.sf.net/p/apertium/svn/branches/transfer4/

The objective of this task is to fix some segfaults:

Check out the code and run "make" in the eng-kaz/ sub-directory.

Then, try running it:

$ cat input/input.01.txt  | ./eng-kaz.parser
^you<prn><subj><p2><mf><sp>/сен<prn><pers><subj><p2><mf><sp>$ ^Kazakhstan<np><top><sg>/Қазақстан<np><top><nom>$ ^to<pr>/$ ^go<vblex><past>/бар<v><iv><past>$ ^that<cnjsub>/$ ^I<prn><subj><p1><mf><sg>/Мен<prn><pers><subj><p1><mf><sg>$ ^know<vblex><pres>/біл<v><tv><pres>$ ^.<sent>/.<sent>$

Some test sentences get parse errors:

$ cat input/input.04.txt  | ./eng-kaz.parser
^қайсы<det><itg>/which<det><itg><sp>$^ал<v><tv><prc_cond><p3><sg>/get<vblex><prc_cond><p3><sg>$^бол<vaux><aor><p3><sg>/be<vbser><aor><p3><sg>$EEK, parse error!  Message: syntax error

The idea of this task is to find out how to use the Bison error token[1] to produce a tree given any input.

For further questions, please join us on our IRC channel: irc.freenode.net #apertium

1. http://marvin.cs.uidaho.edu/Teaching/CS445/bisonErrorToken.html