Combinators: a High-Level Syntax API

Last update: 2007-05-31 11:49:38 CEST



Produced by gfdoc - a rudimentary GF document generator. (c) Aarne Ranta (aarne@cs.chalmers.se) 2002 under GNU GPL.

This module defines some grammatical functions that give shortcuts to typical constructions. Constructors and the language-specific Paradigms modules are usually needed to construct arguments of these functions.

    incomplete resource Combinators = open Grammar in {
    
      oper

Predication

        pred : overload {
          pred : V  -> NP -> Cl ;             -- x converges
          pred : V2 -> NP -> NP -> Cl ;       -- x intersects y
          pred : V3 -> NP -> NP -> NP -> Cl ; -- x intersects y at z
          pred : V  -> NP -> NP -> Cl ;       -- x and y intersect
          pred : A  -> NP -> Cl ;             -- x is even
          pred : A2 -> NP -> NP -> Cl ;       -- x is divisible by y
          pred : A  -> NP -> NP -> Cl ;       -- x and y are equal
          pred : N  -> NP -> Cl ;             -- x is a maximum
          pred : CN -> NP -> Cl ;             -- x is a local maximum
          pred : NP -> NP -> Cl ;             -- x is the neutral element
          pred : N  -> NP -> NP -> Cl ;       -- x and y are inverses 
          pred : Adv -> NP -> Cl ;            -- x is in scope
          pred : Prep -> NP -> NP -> Cl       -- x is outside y
          } ;

Function application

        app : overload {
          app : N  -> NP ;
          app : N2 -> NP -> NP ; 
          app : N3 -> NP -> NP -> NP ;
          app : N2 -> NP -> NP -> NP ;
          app : N2 -> N -> CN
          } ;

Coordination

        coord : overload {
          coord : Conj  -> Adv -> Adv -> Adv ;
          coord : Conj  -> AP -> AP -> AP ;
          coord : Conj  -> NP -> NP -> NP ;
          coord : Conj  -> S  -> S  -> S ;
          coord : DConj -> Adv -> Adv -> Adv ;
          coord : DConj -> AP -> AP -> AP ;
          coord : DConj -> NP -> NP -> NP ;
          coord : DConj -> S  -> S  -> S ;
          coord : Conj  -> ListAdv -> Adv ;
          coord : Conj  -> ListAP -> AP ;
          coord : Conj  -> ListNP -> NP ;
          coord : Conj  -> ListS  -> S ;
          coord : DConj -> ListAdv -> Adv ;
          coord : DConj -> ListAP -> AP ;
          coord : DConj -> ListNP -> NP ;
          coord : DConj -> ListS  -> S  
    
          } ;

Modification

        mod : overload {
          mod : A -> N -> CN ;
          mod : AP -> CN -> CN ;
          mod : AdA -> A -> AP ;
          mod : Det -> N -> NP ;
          mod : Det -> CN -> NP ;
          mod : Quant -> N -> NP ;
          mod : Quant -> CN -> NP ;
          mod : Predet -> N -> NP ;
          mod : Numeral -> N -> NP
    
          } ;

Negation

        neg : overload {
          neg : Imp -> Utt ;
          neg : Cl -> S ;
          neg : QCl -> QS ;
          neg : RCl -> RS 
        };

Text append

This is not in ground API, because it would destroy parsing.

        appendText : Text -> Text -> Text ;