The Mechanics of the Grammatical Framework

Grammatical Framework (GF) is a well known theoretical framework and a mature programming language for the description of natural languages. The GF community is growing rapidly and the range of applications is expanding. Within the framework, there are computational resources for 26 languages created from different people in different organizations. The coverage of the different resources varies but there are complete morphologies and grammars for at least 20 languages. This advancement would not be possible without the continuous development of the GF compiler and interpreter. The demand for efficient and portable execution model for GF has led to major changes in both the compiler and the interpreter. We developed a new low-level representation called Portable Grammar Format (PGF) which is simple enough for an efficient interpretation. Since it was already known that a major fragment of GF is equivalent to Parallel Multiple Context-Free Grammar (PMCFG), we designed PGF as an extension that adds to PMCFG distinctive features of GF such as multilingualism, higher-order abstract syntax, dependent types, etc. In the process we developed novel algorithms for parsing and linearization with PMCFG and a framework for logical reasoning in first-order type theory where the proof search can be constrained by the parse chart. This monograph is the detailed description of the engine for efficient interpretation of PGF and is intended as a reference for building alternative implementations and as a foundation for the future development of PGF.

[1]  James R. Curran,et al.  Wide-Coverage Efficient Statistical Parsing with CCG and Log-Linear Models , 2007, Computational Linguistics.

[2]  Beatrice Santorini,et al.  Building a Large Annotated Corpus of English: The Penn Treebank , 1993, CL.

[3]  Krasimir Angelov,et al.  Incremental Parsing with Parallel Multiple Context-Free Grammars , 2009, EACL.

[4]  Gopalan Nadathur,et al.  An Overview of Lambda-PROLOG , 1988, ICLP/SLP.

[5]  Per Martin-Löf,et al.  Intuitionistic type theory , 1984, Studies in proof theory.

[6]  Hiroyuki Seki,et al.  On the Generative Power of Multiple Context-Free Grammars and Macro Grammars , 2008, IEICE Trans. Inf. Syst..

[7]  A. Tarski A LATTICE-THEORETICAL FIXPOINT THEOREM AND ITS APPLICATIONS , 1955 .

[8]  Carl Jesse Pollard,et al.  Generalized phrase structure grammars, head grammars, and natural language , 1984 .

[9]  Jay Earley,et al.  An efficient context-free parsing algorithm , 1970, Commun. ACM.

[10]  U. Norell,et al.  Towards a practical programming language based on dependent type theory , 2007 .

[11]  Aarne Ranta Type-Theoretical Grammar , 1995 .

[12]  Aarne Ranta Computational semantics in type theory , 2004 .

[13]  Mark Johnson,et al.  Parsing the Wall Street Journal using a Lexical-Functional Grammar and Discriminative Estimation Techniques , 2002, ACL.

[14]  Peter Ljunglöf,et al.  Expressivity and Complexity of the Grammatical Framework , 2004 .

[15]  Fernando Pereira,et al.  Definite clause grammars for language analysis , 1986 .

[16]  Stuart M. Shieber,et al.  Principles and Implementation of Deductive Parsing , 1994, J. Log. Program..

[17]  Aravind K. Joshi,et al.  Tree Adjunct Grammars , 1975, J. Comput. Syst. Sci..

[18]  Ivan A. Sag,et al.  Book Reviews: Head-driven Phrase Structure Grammar and German in Head-driven Phrase-structure Grammar , 1996, CL.

[19]  Frank Pfenning,et al.  Higher-order abstract syntax , 1988, PLDI '88.

[20]  Gérard P. Huet,et al.  A Unification Algorithm for Typed lambda-Calculus , 1975, Theor. Comput. Sci..

[21]  Michael Collins,et al.  Head-Driven Statistical Models for Natural Language Parsing , 2003, CL.

[22]  Mark Steedman,et al.  Combinators and Grammars , 1988 .

[23]  Jun'ichi Tsujii,et al.  Probabilistic Disambiguation Models for Wide-Coverage HPSG Parsing , 2005, ACL.

[24]  Laura Kallmeyer,et al.  Parsing Beyond Context-Free Grammars , 2010, Cognitive Technologies.

[25]  de Ng Dick Bruijn,et al.  Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem , 1972 .

[26]  Tadao Kasami,et al.  Parallel Multiple Context-Free Grammars, Finite-State Translation Systems, and Polynomial-Time Recognizable Subclasses of Lexical-Functional Grammars , 1993, ACL.

[27]  Graham Hutton,et al.  Higher-order functions for parsing , 1992, Journal of Functional Programming.

[28]  Håkan Burden,et al.  Parsing Linear Context-Free Rewriting Systems , 2005, IWPT.

[29]  Aarne Ranta,et al.  Multilingual Syntax Editing in GF , 2003, CICLing.

[30]  Dale A. Miller,et al.  AN OVERVIEW OF PROLOG , 1988 .

[31]  Richard Montague,et al.  The Proper Treatment of Quantification in Ordinary English , 1973 .

[32]  Wolfgang Bibel A Comparative Study of Several Proof Procedures , 1982, Artif. Intell..

[33]  Aarne Ranta,et al.  Implementing Controlled Languages in GF , 2009, CNL.

[34]  Aarne Ranta,et al.  The GF Resource Grammar Library , 2009 .

[35]  Xiaochu Qi,et al.  An Implementation of the Language Lambda Prolog Organized around Higher-Order Pattern Unification , 2009, ArXiv.

[36]  M. Hanus,et al.  Curry: An Integrated Functional Logic Language , 2003 .

[37]  C. Pollard,et al.  Center for the Study of Language and Information , 2022 .

[38]  Pierre Boullier A Proposal for a Natural Lan-guage Processing Syntactic Backbone , 1997 .

[39]  Jeffrey D. Ullman,et al.  Introduction to Automata Theory, Languages and Computation , 1979 .

[40]  Dana Dann Discourse Generation from Formal Specifications Using the Grammatical FrameworkGF , 2010 .

[41]  Daniel Götzmann Multiple Context-Free Grammars , 2007 .

[42]  Peter B. Andrews Theorem Proving via General Matings , 1981, JACM.

[43]  de Ng Dick Bruijn Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem , 1972 .

[44]  Aarne Ranta,et al.  PGF: A Portable Run-time Format for Type-theoretical Grammars , 2010, J. Log. Lang. Inf..

[45]  Theresa Swift Tabling for non‐monotonic programming , 2004, Annals of Mathematics and Artificial Intelligence.

[46]  Mark Steedman,et al.  Wide-Coverage Semantic Representations from a CCG Parser , 2004, COLING.

[47]  Dale Miller,et al.  A Logic Programming Language with Lambda-Abstraction, Function Variables, and Simple Unification , 1991, J. Log. Comput..

[48]  Ramona Enache,et al.  A Framework for Multilingual Applications on the Android Platform , 2010 .

[49]  Gopalan Nadathur,et al.  A Notation for Lambda Terms: A Generalization of Environments , 1998, Theor. Comput. Sci..

[50]  Aarne Ranta,et al.  Modular Grammar Engineering in GF , 2007 .

[51]  Aarne Ranta,et al.  Grammatical Framework Web Service , 2009, EACL.

[52]  Aarne Ranta,et al.  Grammatical Framework , 2004, Journal of Functional Programming.

[53]  Furio Honsell,et al.  A framework for defining logics , 1993, JACM.

[54]  Geoffrey K. Pullum,et al.  Generalized Phrase Structure Grammar , 1985 .

[55]  Frank Pfenning,et al.  System Description: Twelf - A Meta-Logical Framework for Deductive Systems , 1999, CADE.