GSoC/GCI Archive
Google Code-in 2013 Apertium

apertium stream format output for bison grammars

completed by: Dalimil Hájek

mentors: Mikel L. Forcada, Francis Tyers, Kirill Krylov

Edit the 'create-parser.py' script[1] to output the parse tree to cerr and on cout it should have two options:

1) output only the target language side (-t) -- this will be the default.

2) output both source language and target language (-b)

 

Input:

^James<np><ant>/James<np><ant>$ ^eta<cnjcoo>/y<cnjcoo>$ ^Miren<np><ant>/Miren<np><ant>$ ^lorategi<n>/jardin<n><m><ND>$ ^a<det><art><sg>/el<det><def><GD><sg>$ ^an<post>/en<pr>$ ^egon<vbsint><pri><NRHK>/estar<vblex><pri><NRHK>$ ^.<sent>/.<sent>$

Output (-t):

^James<np><ant>$ ^y<cnjcoo>$ ^Miren<np><ant>$ ^jardin<n><m><ND>$ ^el<det><def><GD><sg>$ ^en<pr>$ ^estar<vblex><pri><NRHK>$ ^.<sent>$

Output (-b):

^James<np><ant>/James<np><ant>$ ^eta<cnjcoo>/y<cnjcoo>$ ^Miren<np><ant>/Miren<np><ant>$ ^lorategi<n>/jardin<n><m><ND>$ ^a<det><art><sg>/el<det><def><GD><sg>$ ^an<post>/en<pr>$ ^egon<vbsint><pri><NRHK>/estar<vblex><pri><NRHK>$ ^.<sent>/.<sent>$