[developers] Fwd: stack overflow on generation

Woodley Packard sweaglesw at sweaglesw.org
Tue Dec 9 22:06:45 CET 2014

Hi Emily and Antariksh,

For ACE, the primary problem was that the trigger rules in trigger.mtr did not have unique names, so "kii" was not getting added to the chart.  ACE was printing some warning messages when compiling the grammar about them being redefined.  When I give them unique names (crucially the "kii" rules), I am able to generate from this sentence.  I get 6 results:

Ravi vicaar-at kii tsor zhop-t-o kaa
Ravi vicaar-t-o kii tsor zhop-t-o
Ravi vicaar-t-o kii tsor zhop-t-o kaa
Ravi vicaar-t-o asa kii tsor zhop-t-o
Ravi vicaar-at kii tsor zhop-t-o
Ravi vicaar-t-o asa kii tsor zhop-t-o kaa

However, ACE still isn't very happy.  It says the "head-comp" rule is loopy, i.e. can apply to its own input somehow (it doesn't apply during parsing because it takes 2 inputs and you run out of words eventually, but in generation the vacuous "kii" can keep being added to a sentence apparently).  I don't think that necessarily implies it's specifically that rule that's got a bug in it, but something in the chain of applications that leads to that cycle is buggy.  If you run the generator with packing turned off (-p), then ACE fails to notice the loop and spins for a while before failing.  If you also add a couple of -v's (so -epvv), then you'll see the strings it's generating:

kii kii kii kii kii kii zhop-t-o
vicaar-t-o asa kii kii kii kii kii zhop-t-o
kii kii kii kii vicaar-t-o kii kii kii kii kii zhop-t-o

etc etc.  I assume some of these are ungrammatical :-).  You should also be able to see rule names and trace back what the bad chain was with a little patience.  Or maybe you can already guess at this point :-)

I would guess that this cyclic application is also what's throwing the LKB off (and maybe the LKB is more relaxed about multiple trigger rules having the same name), though I don't know for sure.  Hope that helps,

On Dec 9, 2014, at 12:47 PM, "Emily M. Bender" <ebender at uw.edu> wrote:

> Dear all,
> Antariksh and I have hit a generation debugging mystery, that I'm hoping for some help with.  Our grammar (of Marathi) can generate for some strings (with both ace and lkb) but for this particular item:
> ravi vicaar-t-o kii tsor zhop-t-o kaa
> (Ravi asks if the thief sleeps)
> it gives a "Stack overflow (signal 1000)" error on the lkb and just no results with ace.  Turning packing off doesn't affect things.  I played around a bit and found that if I set *maximum-number-of-edges* to 717, I run out of edges before the stack overflow, but with 718 or more it's back to that. (I tried diffing the output of (pprint *gen-chart*) in those two conditions, but that wasn't informative ... too many spurious differences.) batch-check-morphology() ran happily for a while and then returned nil, which I assume means no problems.  Setting *gen-packing-p* to nil doesn't change the behavior.  
> This is clearly a problem with the grammar, but I'm at a loss as to how to localize it.  Are there any other tools or strategies I should be aware of?
> Thanks,
> Emily
> In case it's helpful, the grammar can be found here:
> http://faculty.washington.edu/ebender/mar.tgz
> ace output:
> ubuntu at UbuntuLKB:~/Downloads/mar$ ace -g mar.dat -Tf1 | ace -g mar.dat -e
> ravi vicaar-t-o kii tsor zhop-t-o kaa
> NOTE: 1 readings, added 653 / 401 edges to chart (76 fully instantiated, 84 actives used, 49 passives used)    RAM: 3766k
> NOTE: 122 passive, 620 active edges in final generation chart; built 305 passives total. [0 results]
> -- 
> Emily M. Bender
> Professor, Department of Linguistics
> Check out CLMS on facebook! http://www.facebook.com/uwclma

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.delph-in.net/archives/developers/attachments/20141209/2a9c4620/attachment.html>

More information about the developers mailing list