$ svn co -r 54005 https://svn.code.sf.net/p/apertium/svn/incubator/apertium-sco
$ cd apertium-sco
$ lt-comp rl apertium-sco.sco.dix sco.autogen.bin
main@standard 5225 10282
$ echo '^will<vaux><inf>$' |lt-proc -g sco.autogen.bin
Error: Invalid dictionary (hint: the left side of an entry is empty)
This happens because there's a pardef
<pardef n="na__S">
<e>
<p>
<l></l>
<r></r>
</p>
</e>
<e r="LR">
<p>
<l>na</l>
<r><j/>na<s n="adv"/></r>
</p>
</e>
<e r="LR">
<p>
<l>nae</l>
<r><j/>na<s n="adv"/></r>
</p>
</e>
<e r="LR">
<p>
<l>naw</l>
<r><j/>na<s n="adv"/></r>
</p>
</e>
</pardef>
and since all the adv's are marked LR, the generation-specific pardef becomes
<pardef n="na__S">
<e>
<p>
<l></l>
<r></r>
</p>
</e>
</pardef>
– for some reason this is treated as an initially-empty left-side when it should jut be a non-transition.
Perhaps the fix should be in lt-comp
Here's a minimal dix showing the problem:
f.dix:
and
The printout shows why the binary is invalid:
ie. state "0" appears both as initial and final state. If we remove the
<par n="eps"/>, we get the expected