Towards a Natural Language Compiler

  • Angel ZúñigaEmail author
  • Gerardo Sierra
  • Gemma Bel-Enguix
  • Sofía N. Galicia-Haro
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11289)


Being able to create a natural language compiler has been one of the most sought-after goals to reach since the very beginning of artificial intelligence. Since then; however, it has been an elusive and difficult task to achieve to the extent of being considered almost impossible to perform. In this article, we present a promising path by using a grammar formalism which attempts to model natural language; in principle, by using minimalist grammars as one of the last proposed instances of formalism of this type. The main idea consists in creating a parser based on this type of grammars which could recognize and analyze the text (or input program) written in natural language and use this parser as a front-end of a compiler. Then, for the rest of the compilation process, utilize the usual phases of a classic compiler of a programming language. Moreover, we present a prototype of a natural language compiler whose specific language is that of arithmetic expressions, in order to show with evidence that it is indeed possible to implement it, that is to say, to put the proposed compiler design into practice, showing in this manner that it is actually possible to create a natural language compiler following this promising path.


Natural language compilers Natural language parsing Mildly context sensitive grammars Minimalist grammars Natural language processing 



We sincerely thank Edward Stabler for allowing us to freely modify his MG top-down beam parser implementation, for getting acquainted with some of the most recent MG parsing advances and for encouraging us to develop a Spanish MG. This work was supported by the Mexican Council of Science and Technology (CONACYT), fund 2016-01-2225, and DGAPA, fund IN403016.


  1. 1.
    Aho, A.V., Lam, M.S., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, and Tools, 2nd edn. Addison-Wesley, Boston (2006)zbMATHGoogle Scholar
  2. 2.
    Aho, A.V., Ullman, J.D.: The Theory of Parsing, Translation, and Compiling. Prentice-Hall Inc, Upper Saddle River (1972)Google Scholar
  3. 3.
    Boullier, P.: Proposal for a natural language processing syntactic backbone. Research report RR-3342, INRIA (1998).
  4. 4.
    Boullier, P.: Range Concatenation Grammars, pp. 269–289. Springer, Dordrecht (2005). Scholar
  5. 5.
    Chomsky, N.: The Minimalist Program. Current Studies in Linguistics, MIT (1995)Google Scholar
  6. 6.
    Cisco Systems, Inc: Chez scheme.
  7. 7.
    Ghuloum, A.: Ikarus scheme.
  8. 8.
    Harkema, H.: A recognizer for minimalist grammars, vol. 2000, pp. 111–122, Trento, Italy (2000)Google Scholar
  9. 9.
    Iacob, R., Rebedea, T., Trausan-Matu, S.: NLCP: Towards a compiler for natural language. In: 2017 21st International Conference on Control Systems and Computer Science (CSCS), pp. 252–259, May 2017.
  10. 10.
    Jäger, G., Rogers, J.: Formal language theory: refining the Chomsky hierarchy. Philos. Trans. R. Soc. Lond. B: Biol. Sci. 367(1598), 1956–1970 (2012). Scholar
  11. 11.
    Joshi, A.K.: Tree adjoining grammars: how much context-sensitivity is required to provide reasonable structural descriptions?, pp. 206–250. Studies in Natural Language Processing, Cambridge University Press, Cambridge (1985).
  12. 12.
    Joshi, A.K., Shanker, K.V., Weir, D.: The convergence of mildly context-sensitive grammar formalisms. Tech. report MS-CIS-09-01, University of Pennsylvania, January 1990.
  13. 13.
    Kallmeyer, L.: Parsing Beyond Context-Free Grammars. Cognitive Technologies. Springer, Heidelberg (2010). Scholar
  14. 14.
    Pullum, G.K., Gazdar, G.: Natural languages and context-free languages. Linguist. Philos. 4(4), 471–504 (1982). Scholar
  15. 15.
    Seki, H., Matsumura, T., Fujii, M., Kasami, T.: On multiple context-free grammars. Theor. Comput. Sci. 88(2), 191–229 (1991). Scholar
  16. 16.
    Sørensen, M.H., Urzyczyin, P.: Lectures on the Curry-Howard Isomorphism. Studies in Logic and the Foundations of Mathematics, vol. 149. Elsevier, Amsterdam (2006). Scholar
  17. 17.
    Stabler, E.: Derivational minimalism. In: Retoré, C. (ed.) LACL 1996. LNCS, vol. 1328, pp. 68–95. Springer, Heidelberg (1997). Scholar
  18. 18.
    Stabler, E.: Top-down recognizers for MCFGs and MGs. In: Proceedings of the 2nd Workshop on Cognitive Modeling and Computational Linguistics. pp. 39–48. Association for Computational Linguistics, Portland, June 2011.
  19. 19.
    Stabler, E.: MG TD beam parser (2012).
  20. 20.
    Stabler, E.: Two models of minimalist, incremental syntactic analysis. Top. Cogn. Sci. 5(3), 611–633 (2013). Scholar
  21. 21.
    Thomas, J., Antony, P.J., Balapradeep, K.N., Mithun, K.D., Maiya, N.: Natural language compiler for English and Dravidian languages. In: Shetty, N.R., Prasad, N.H., Nalini, N. (eds.) Emerging Research in Computing, Information, Communication and Applications, pp. 313–323. Springer, New Delhi (2015). Scholar
  22. 22.
    Zúñiga, A., Sierra, G., Bel-Enguix, G., Galicia-Haro, S.N.: Towards a natural language compiler: the compiler prototype implementation.

Copyright information

© Springer Nature Switzerland AG 2018

Authors and Affiliations

  1. 1.Instituto de IngenieríaUniversidad Nacional Autónoma de MéxicoMexico CityMexico
  2. 2.Facultad de Ciencias, Universidad Nacional Autónoma de MéxicoMexico CityMexico

Personalised recommendations