Skip to main content Accessibility help
×
Hostname: page-component-78c5997874-94fs2 Total loading time: 0 Render date: 2024-11-05T12:24:21.701Z Has data issue: false hasContentIssue false

13 - Grammars as software libraries

Published online by Cambridge University Press:  06 August 2010

Aarne Ranta
Affiliation:
Chalmers University of Technology and University of Gothenburg
Yves Bertot
Affiliation:
INRIA-Sophia Antipolis, France
Gérard Huet
Affiliation:
Institut National de Recherche en Informatique et en Automatique (INRIA), Rocquencourt
Jean-Jacques Lévy
Affiliation:
Institut National de Recherche en Informatique et en Automatique (INRIA), Rocquencourt
Gordon Plotkin
Affiliation:
University of Edinburgh
Get access

Summary

Abstract

Grammars of natural languages are needed in programs such as natural language interfaces and dialogue systems, but also more generally, in software localization. Writing grammar implementations is a highly specialized task. For various reasons, no libraries have been available to ease this task. This paper shows how grammar libraries can be written in GF (Grammatical Framework), focusing on the software engineering aspects rather than the linguistic aspects. As an implementation of the approach, the GF Resource Grammar Library currently comprises ten languages. As an application, a translation system from formalized mathematics to text in three languages is outlined.

Introduction

How can we generate natural language text from a formal specification of meaning, such as a formal proof? Coscoy, Kahn and Théry studied the problem and built a program that worked for all proofs constructed in the Coq proof assistant. Their program translates structural text components, such as we conclude that, but leaves propositions expressed in formal language:

We conclude that Even(n) → Odd(Succ(n)).

A similar decision is made in Isar, whereas Mizar permits English-like expressions for some predicates. One reason for stopping at this level is certainly that typical users of proof systems are comfortable with reading logical formulas, so that only the proof-level formalization needs translation.

Type
Chapter
Information
From Semantics to Computer Science
Essays in Honour of Gilles Kahn
, pp. 281 - 308
Publisher: Cambridge University Press
Print publication year: 2009

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

[1]A., Appel. Modern Compiler Implementation in Java. Cambridge University Press, 1998.Google Scholar
[2]B., Beckert, R., Hähnle and P., Schmitt. Verification of Object-Oriented Software: The KeY Approach, volume 4334 Lecture Notes in Computer Science. Springer-Verlag, 2006.Google Scholar
[3]E. M., Bender and D., Flickinger. Rapid prototyping of scalable grammars: Towards modularity in extensions to a language-independent core. In Proceedings of the 2nd International Joint Conference on Natural Language Processing IJCNLP-05 (Posters/Demos), Jeju Island, Korea, 2005.Google Scholar
[4],Bescherelle. La conjugaison pour tous. Hatier, 1997.Google Scholar
[5]B., Bringert. Embedded Grammars. MSc Thesis, Department of Computing Science, Chalmers University of Technology, 2004.
[6]D. A., Burke and K., Johannisson. Translating Formal Software Specifications to Natural Language / A Grammar-Based Approach. In P., Blache, E., Stabler, J., Busquets and R., Moot (eds) Logical Aspects of Computational Linguistics (LACL 2005), volume 3402 LNCS/LNAI, pp. 51–66. Springer-Verlag, 2005.Google Scholar
[7]M., Butt, H., Dyvik, T., Holloway King, H., Masuichi and C., Rohrer. The Parallel Grammar Project. In COLING 2002, Workshop on Grammar Engineering and Evaluation, pp. 1–7, 2002.Google Scholar
[8]O., Caprotti. WebALT! Deliver Mathematics Everywhere. In Proceedings of SITE 2006. Orlando March 20–24, 2006.Google Scholar
[9]Y., Coscoy. Explication textuelle de preuves pour le calcul des constructions inductives. PhD thesis, Université de Nice-Sophia-Antipolis, 2000.
[10]Y., Coscoy, G., Kahn and L., Thery. Extracting text from proofs. In M., Dezani-Ciancaglini and G., Plotkin (eds) Proc. Second International Conference on Typed Lambda Calculi and Applications, volume 902 Lecture Notes in Computer Science, pp. 109–123, Springer-Verlag, 1995.Google Scholar
[11]H. B., Curry. Some logical aspects of grammatical structure. In Roman, Jakobson, editor, Structure of Language and its Mathematical Aspects: Proceedings of the Twelfth Symposium in Applied Mathematics, pp. 56–68. American Mathematical Society, 1963.Google Scholar
[12]Ph., de Groote. Towards abstract categorial grammars. In Association for Computational Linguistics, 39th Annual Meeting and 10th Conference of the European Chapter, Toulouse, France, pp. 148–155, 2001.Google Scholar
[13]A., El Dada. Implementation of the Arabic numerals and their syntax in GF. In Computational Approaches to Semitic Languages: Common Issues and Resources, ACL-2007 Workshop, June 28, 2007, Prague, 2007.Google Scholar
[14]A., El Dada and A., Ranta. Implementing an open source arabic resource grammar in GF. In M. A., Mughazy (ed.) Perspectives on Arabic Linguistics XX, pp. 209–232. John Benjamins, Amsterdam and Philadelphia, 2007.Google Scholar
[15]M., Forsberg and A., Ranta. Functional Morphology. In ICFP 2004, Showbird, Utah, pp. 213–223, 2004.Google Scholar
[16]T., Hallgren and A., Ranta. An extensible proof text editor. In M., Parigot and A., Voronkov (eds) LPAR-2000, volume 1955 LNCS/LNAI, pp. 70–84. Springer, 2000.Google Scholar
[17]G., Huet. A functional toolkit for morphological and phonological processing, application to a Sanskrit tagger. Journal of Functional Programming, 15(4):573–614, 2005.Google Scholar
[18]M., Humayoun. Urdu Morphology, Orthography and Lexicon Extraction. MSc Thesis, Department of Computing Science, Chalmers University of Technology, 2006.
[19]J., Khegai. GF parallel resource grammars and Russian. In Coling/ACL 2006, pp. 475–482, 2006.Google Scholar
[20]P., Martin-Löf. Constructive mathematics and computer programming. In Cohen, Los, Pfeiffer and Podewski (eds) Logic, Methodology and Philosophy of Science VI, pp. 153–175. North-Holland, Amsterdam, 1982.Google Scholar
[21]R., Montague. Formal Philosophy. Yale University Press, New Haven, 1974. Collected papers edited by R. Thomason.Google Scholar
[22]R., Muskens. Lambda grammars and the syntax-semantics interface. In R., van Rooy and M., Stokhof (eds) Proceedings of the Thirteenth Amsterdam Colloquium, pp. 150–155, Amsterdam, 2001.Google Scholar
[23]N., Perera and A., Ranta. Dialogue System Localization with the GF Resource Grammar Library. In SPEECHGRAM 2007: ACL Workshop on Grammar-Based Approaches to Spoken Language Processing, June 29, 2007, Prague, 2007.Google Scholar
[24]C., Pollard. Higher-order categorial grammar. In M., Moortgat (ed.) Proceedings of the Conference on Categorial Grammars (CG2004), Montpellier, France, pp. 340–361, 2004.Google Scholar
[25]A., Ranta. Grammatical framework: a type-theoretical grammar formalism. Journal of Functional Programming, 14(2):145–189, 2004.Google Scholar
[26]A., Ranta. Modular grammar engineering in GF. Research on Language and Computation, 5:133–158, 2007.Google Scholar
[27]A., Ranta. Grammatical Framework Homepage, 2008. digitalgrammars.com/gf.
[28]M., Rayner, D., Carter, P., Bouillon, V., Digalakis and M., Wirén. The Spoken Language Translator. Cambridge University Press, Cambridge, 2000.Google Scholar
[29]B., Stroustrup. The C++ Programming Language, Third Edition. Addison-Wesley, 1998.Google Scholar
[30],The Coq Development Team. The Coq Proof Assistant Reference Manual. pauillac.inria.fr/coq/, 1999.
[31]A., Trybulec. The Mizar Homepage. http://mizar.org/, 2006.
[32]M., Wenzel. Isar – a generic interpretative approach to readable formal proof documents. In Y., Bertot, G., Dowek, A., Hirschowitz, C., Paulin and L., Théry (eds) Theorem Proving in Higher Order Logics, TPHOLs'99, volume 1690 Lecture Notes in Computer Science, 1999.Google Scholar
[33]F., Wiedijk. Formal proof sketches. In Types for Proofs and Programs, volume 3085 Lecture Notes in Computer Science, pp. 378–393. Springer, 2004.Google Scholar

Save book to Kindle

To save this book to your Kindle, first ensure [email protected] is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • Grammars as software libraries
    • By Aarne Ranta, Chalmers University of Technology and University of Gothenburg
  • Edited by Yves Bertot, Gérard Huet, Institut National de Recherche en Informatique et en Automatique (INRIA), Rocquencourt, Jean-Jacques Lévy, Institut National de Recherche en Informatique et en Automatique (INRIA), Rocquencourt, Gordon Plotkin, University of Edinburgh
  • Book: From Semantics to Computer Science
  • Online publication: 06 August 2010
  • Chapter DOI: https://doi.org/10.1017/CBO9780511770524.014
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • Grammars as software libraries
    • By Aarne Ranta, Chalmers University of Technology and University of Gothenburg
  • Edited by Yves Bertot, Gérard Huet, Institut National de Recherche en Informatique et en Automatique (INRIA), Rocquencourt, Jean-Jacques Lévy, Institut National de Recherche en Informatique et en Automatique (INRIA), Rocquencourt, Gordon Plotkin, University of Edinburgh
  • Book: From Semantics to Computer Science
  • Online publication: 06 August 2010
  • Chapter DOI: https://doi.org/10.1017/CBO9780511770524.014
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • Grammars as software libraries
    • By Aarne Ranta, Chalmers University of Technology and University of Gothenburg
  • Edited by Yves Bertot, Gérard Huet, Institut National de Recherche en Informatique et en Automatique (INRIA), Rocquencourt, Jean-Jacques Lévy, Institut National de Recherche en Informatique et en Automatique (INRIA), Rocquencourt, Gordon Plotkin, University of Edinburgh
  • Book: From Semantics to Computer Science
  • Online publication: 06 August 2010
  • Chapter DOI: https://doi.org/10.1017/CBO9780511770524.014
Available formats
×