Boxer Input (CCG derivations) DRAFT

CCG derivations are coded as Prolog terms. The derivation is captured in a ccg/2 term, where the first argument is an identifier (a Prolog atom), and the second argument the derivation itself. The derivation is a recursive structure and consists of:

  • binary combinatory rules (fa/3, ba/3, fc/3, bc/3, fxc/3, bxc/3, fs/3, bs/3, fxs/3, bxs/3), where the first argument is the resulting category, and the second and third arguments are the left and right subtrees;
  • generalised combinatory rules (gfc/3, gbc/3, gfxc/3, gbxc/3), where the first argument is the resulting category, and the second and third arguments are the left and right subtrees;
  • type changing (tc/3), where the first argument is the new type, the second argument the old type, and the third argument the subtree;
  • type raising (tr/2);
  • ternary coordination rule (coord/4, a la Steedman), where the first argument is the category coordinated, the second argument the left conjunct, the third argument the conjunctor, the fourth argument the right conjunct;
  • binary coordination rule (conj/4, a la Hockenmaier), where the first argument is the resulting category, the second argument is the category coordinated, the third argument the conjunctor, the fourth argument the right conjunct;
  • punctuation rules (lp/3 and rp/3);
  • punctuation type changing rules (rtc/3 and ltc/3), aka binary type changing rules;
  • leaf (lf/3).

In addition to the derivation, all lexical categories are printed separately in the form of w/8 terms, where the arguments denote respectively the parse id, the token position, the token, the lemma, the part of speech, the chunk, the recognised named entity, and the category.

All atomic categories are represented by Prolog atoms (i.e., s, np, n, pp) and features are connected via a colon. Variable features are represented by Prolog variables, instantiated features by Prolog atoms (i.e. dcl, pss, num). Slashes are represented by Prolog atoms '/' '\' which are defined as Prolog xfx operators with priority 601. Examples: (s:dcl\np)/np, s:X/s:X, np:nb/n.