apertium / lttoolbox

Finite state compiler, processor and helper tools used by apertium
http://wiki.apertium.org/wiki/Lttoolbox
GNU General Public License v2.0
18 stars 22 forks source link

Allow use of lt-proc with -d and -b simultaneously #124

Closed marcriera closed 2 years ago

marcriera commented 2 years ago

Since the implementation of preferences in some pairs, lt-proc is now used with the -b flag for generation. It should be possible to use this flag together with -d for debugging to mark generation errors properly with #, or at least output something. Currently, the help is shown when these two flags are combined.

Take this example (first line is a valid lexical unit, second line is not and should be a generation error):

^setantè<adj><ord><m><sg>$
^setantè<adj><m><sg>$

Result when sent through lt-proc -b 'eng-cat.autogen.bin'

^setantè<adj><ord><m><sg>/setantè/setanté<v:accents_val>$
^setantè<adj><m><sg>/@setantè<adj><m><sg>$

Result when sent through lt-proc -d 'eng-cat.autogen.bin'

setantè/setanté<v:accents_val>
#setantè\<adj\>\<m\>\<sg\>

Expected result when sent through lt-proc -d -b 'eng-cat.autogen.bin'


^setantè<adj><ord><m><sg>/setantè/setanté<v:accents_val>$
^setantè<adj><m><sg>/#setantè<adj><m><sg>$
rinkydevi commented 2 years ago

hey @MarcRiera ! I would love to work on this issue! How can i proceed?

TinoDidriksen commented 2 years ago

@rinkydevi, fork the repo, implement your solution, open a PR with it. This also requires figuring out what -b and -d even do, so requires a lot of code comprehension.