rupesh4514 / grammatical-framework

Automatically exported from code.google.com/p/grammatical-framework
0 stars 0 forks source link

The linearize command is broken, fails with Prelude.(!!): index too large. #80

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The linearize command is broken in both the GF shell and the PGF web service. 
Instead of producing the expected linearizations, it fails with Prelude.(!!): 
index too large.

What steps will reproduce the problem?
---------------------------------------------------------------------
cd examples/foods
make
gf Foods.pgf
Foods> l -treebank Fish
Foods: Fish
FoodsAfr: daardie vis
FoodsAmh: ያ ዓሳ
Prelude.(!!): index too large
--------------------------------------------------------------------
cd examples/phrasebook
make
gf Phrasebook.pgf
Phrasebook> gr | l -treebank
Phrasebook: PGreetingMale GGoodLuck
Prelude.(!!): index too large

Original issue reported on code.google.com by hallg...@chalmers.se on 20 Nov 2013 at 3:21

GoogleCodeExporter commented 9 years ago
Here is a stack trace from a simple translation program using the Phrasebook.

*** Exception (reporting due to +RTS -xc): (THUNK_2_0), stack trace: 
  GHC.List.CAF
  --> evaluated by: PGF.Macros.computeSeq.getArg.(...),
  called from PGF.Macros.computeSeq.getArg,
  called from PGF.Macros.computeSeq.compute,
  called from PGF.Macros.computeSeq,
  called from PGF.Macros.mkLinTable,
  called from PGF.Linearize.firstLin,
  called from PGF.Linearize.linearize,
  called from Main.translate,
  called from Main.main
Translator: Prelude.(!!): index too large

Original comment by hallg...@chalmers.se on 29 Nov 2013 at 12:26

GoogleCodeExporter commented 9 years ago
More details on how to trigger this problem with the Foods grammar:

$ gf -make -src -optimize-pgf FoodsBul.pgf
$ gf Foods.pgf
> l Fish
Prelude.(!!): index too large

--------------------------------------
Buf if you omit -optimize-pgf it doesn't happen

$ gf -make -src FoodsBul.pgf
$ gf Foods.pgf
> l Fish
риба

Original comment by hallg...@chalmers.se on 29 Nov 2013 at 1:45

GoogleCodeExporter commented 9 years ago
the pgf optimization was ignoring the linref definitions

Original comment by kr.ange...@gmail.com on 29 Nov 2013 at 2:27