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

lt-comp an lt-printed fst fails #68

Closed AMR-KELEG closed 3 years ago

AMR-KELEG commented 5 years ago

For the breton compiled dictionary bre.automorf.bin

$ lt-print bre.automorf.bin > bre.att
$ lt-comp lr bre.att bre.bin
Segmentation fault      (core dumped)

This is caused by the way Attcompiler deduces the type of the edge "https://github.com/apertium/lttoolbox/blob/master/lttoolbox/att_compiler.cc#L381"

I tried setting the type of all edges to word such that they are part of the main section. The lt-comp worked but the lt-proc is now entering an infinite loop on initializing the root state (Finding Epsilon closure).

unhammer commented 5 years ago

Wow, bad bug. Could you upload a zip with the failing bre.automorf.bin? This is from apertium-bre revision https://github.com/apertium/apertium-bre/commit/1fd2fc710075e51889ddba3b974cfbd9abc91a51 ?

AMR-KELEG commented 5 years ago

Wow, bad bug. Could you upload a zip with the failing bre.automorf.bin?

Sure, here it is. bre.automorf.zip

This is from apertium-bre revision apertium/apertium-bre@1fd2fc7 ?

Yes, it is.

AMR-KELEG commented 5 years ago

Similar issue in the other direction:

$ cat cat.att
0       1       c       c
1       2       a       a
2       3       t       t
3       4       @0@     +
4       5       @0@     n       0.004
5
4       5       @0@     v       0.0045
--
0       1       c       c
1       2       a       a
2       3       t       t
3       4       @0@     +
4       5       @0@     n
5       6       @0@     +
6       7       s       <pl>
7

$ lt-comp lr cat.att cat.bin
Warning: Multiple fsts in 'cat.att' will be disjuncted.
main@standard 15 15
final@inconditional 3 2

$ lt-print cat.bin 
Error: empty set of final states