bijection / nearley-playground

⛹ Write Grammars for the Nearley Parser!
https://omrelli.ug/nearley-playground/
MIT License
83 stars 13 forks source link

Crashes and teaching #13

Closed HedvigS closed 6 years ago

HedvigS commented 6 years ago

I'm wanting to use the playground to teach context-free grammars to intro linguistics students. However, I'm often having problems with crashes myself and I'm worrying that the students will have too many problems.

a) which is the best browser to recommend them? b) will clearing cookies be enough advice when it crashes?

I'm suspecting the crashing is because of some ambiguity, but sometimes it honestly crashes even with the simplest little grammar.

HedvigS commented 6 years ago

I made an example to show the students how this could work, but for some reason the nearley playground interface doesn't loop through all the options. It's stuck on "linguist" for PROFESSION. The linguist has now been shot, hanged and drowned for all kinds of silly reasons. I'm dreading what will come next.

Any idea why this might be?

MIDSOMER_MURDERS_PLOT -> LOCAL PROFESSION FOUND DEAD PLACE SUSPICION SUSPECT ANGRY BLAMED THREAT THREATENED LOCAL -> "A local " PROFESSION -> "linguist" | "philosopher" | "novelist" FOUND -> " is found " DEAD -> "drowned" | "strangled" | "dead" | "tortured to death" | "hanged" | "battered" | "suffocated" | "shot" | "knifed" | "nuked" PLACE -> " in the coffee shop." |" in the swimming pool." | " after band practice."| " behind the primary school." SUSPICION -> " Suspicion falls on the village " SUSPECT -> "baker" | "pastor" | "mailman" | "florist" | "nerd" | "twins" ANGRY -> ", angry that the " BLAMED -> "new wind farm" | "pig" | "pub" | "decline in newspaper reading" | "metric system" THREAT -> " might threaten " THREATENED -> "the village fabric." | "what little sexual tension the village has left." | "the Old Inn." | "the cow farm."

HedvigS commented 6 years ago

Hi is there anyone who can help me please?

HedvigS commented 6 years ago

Alright... well. Tired of waiting. I wrote up a tutorial anyway. Happy to hear back about crashing and freezing. http://humans-who-read-grammars.blogspot.com.au/2018/04/having-fun-with-phrase-structure.html

bijection commented 6 years ago

I added infinite loop detection, so the crashing should be much improved.