Andreas van Cranenburgh 2010.
Abstract: a semantically lexicalist (i.e., semantic ambiguities derive from the lexicon) type driven (i.e., direction of function application is dynamically inferred from types) semantic (i.e., output is semantic, in this case a logical form) grammar. The syntax is parsed by a generative grammar (in this case a CFG, other formalisms like DOP are possible), leaves of the resulting parse tree are annotated with all possible meanings from the lexicon; the resulting parse forest is pruned by removing type clashes. So broadly speaking, syntax is generative, semantics is selective. Two types of ambiguity are modelled: syntactic (different parse trees) and semantic (different mapping of words to meanings). Basically this takes the output of a CFG and replaces the leaves with lambda expressions, after which the expressions of siblings are applied to each other recursively, storing the result in their parent, until finally the root node contains the semantic interpretation of the sentence. Example sentences demonstrate handling of scope ambiguity (although this depends on a lexical ambiguity in the verb, hence 'lexicalist'), and a PP attachment ambiguity (deriving from both a syntactic and lexical ambiguity).
Source code:
Try some example sentences:
\n') for a in examples: req.write('