3 ms·
Yeah, left-corner parsers can be slow for CFGs. There was another Prolog-for-NLP book of the same generation, not by Pereira or Shreiber, that showed how to wri
by YeGoblynQueenne 2y ago
Yeah, left-corner parsers can be slow for CFGs. There was another Prolog-for-NLP book of the same generation, not by Pereira or Shreiber, that showed how to write an Earley parser in Prolog and those can be much faster. I don't remember the title though, I read it maybe ten years ago now.
- mcswell 2y agoThe LISP parser my co-worker built had the ability to encode in a grammar rule which "corner" to trigger that rule on. Often it was the head of the phrase, but it could be things like the word "and" (no need to trigger a conjunction rule unless there's a conjunction).