User:Mlforcada/Robust LR for Transfer

From Apertium
< User:Mlforcada
Revision as of 16:25, 1 January 2015 by Mlforcada (talk | contribs) (Created page with "We need a way to implement Apertium4 Bison grammars that are robust. Here, '''Bison GRAMMAR''' is a LALR(1) grammar with actions between braces. There should be a way (or a ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

We need a way to implement Apertium4 Bison grammars that are robust.

Here, Bison GRAMMAR is a LALR(1) grammar with actions between braces.

There should be a way (or a procedure) to complete handwritten rules, if possible automatically, to generate a robust parser (and translator). The idea is to take the handwritten Bison grammar and complement it with automatically-generated glue rules in such a way that conflicts are not produced (or are harmless) to produce a new grammar .

One possible way to do so is to model left-to-right restarts as follows:

  • by accepting the longest possible constituent that cannot be merged with the remaining output and generating some kind of translation for it
  • and treating the remaining output as a complete sentence again