Skip to main content

Browsing the Parse Space

  • Conference paper
  • First Online:
Languages, Applications and Technologies (SLATE 2015)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 563))

Included in the following conference series:

  • 367 Accesses

Abstract

Ambiguous context-free grammars can generate many (even infinite) parse trees for each input sentence. We will refer to all these parse trees as the parse space of the sentence. Thus, in many settings (computational linguistics, education in compiler construction, etc.) the need for browsing this parse space (i.e., for examining different trees in a systematic and ordered way) arises. In this paper we describe a browsing approach that works for arbitrary (even infinitely ambiguous) grammars. The approach, which is based on the well-known Earley’s algorithm, sorts the parse space according to structural complexity of the parse trees, lets users inspect a particular tree, and then to jump to the previous and/or the next tree. This approach has been implemented in EvDebugger, an educational system for the learning of the attribute grammar formalism.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    In the Earley’s original work lookahead symbols were also added to items, although later on it was shown that it does not substantially affect to algorithm performance.

References

  1. Aho, A.V., Ullman, J.D.: The Theory of Parsing, Translation, and Compiling, vol I: Parsing. Prentice-Hall, Inc, Englewood Cliffs (1972)

    Google Scholar 

  2. Almeida-Martınez, F.J., Urquiza-Fuentes, J., Velázquez-Iturbide, J.: Visualization of syntax trees for language processing courses. J. Univ. Comput. Sci. 15(7), 1546–1561 (2009)

    Google Scholar 

  3. Almeida-Martínez, F.J., Urquiza-Fuentes, J., Velázquez-Iturbide, J.Á. VAST: visualization of abstract syntax trees within language processors courses. In: Proceedings of the 4th ACM Symposium on Software Visualization, pp. 209–210. ACM. (2008)

    Google Scholar 

  4. Bar-Hillel, Y., Perles, M., Shamir, E.: On formal properties of simple phrase structure grammars. STUF-Lang. Typology Univ. 14(1–4), 143–172 (1961)

    MathSciNet  MATH  Google Scholar 

  5. Basten, H.J.: The usability of ambiguity detection methods for context-free grammars. Electron. Notes Theor. Comput. Sci. 238(5), 35–46 (2009)

    Article  Google Scholar 

  6. Basten, H.J., Vinju, J.J.: Parse forest diagnostics with Dr. Ambiguity. In: Sloane, A., Aßmann, U. (eds.) SLE 2011. LNCS, vol. 6940, pp. 283–302. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  7. Billot, S., Lang, B.: The structure of shared forests in ambiguous parsing. In: Proceedings of the 27th Annual Meeting on Association for Computational Linguistics, pp. 143–151. Association for Computational Linguistics (1989)

    Google Scholar 

  8. Brabrand, C., Giegerich, R., Møller, A.: Analyzing ambiguity of context-free grammars. Sci. Comput. Program. 75(3), 176–191 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  9. Clark, A., Fox, C., Lappin, S. (eds.): The Handbook of Computational Linguistics and Natural Language Processing. Wiley, Malden (2013)

    Google Scholar 

  10. Earley, J.: An efficient context-free parsing algorithm. Commun. ACM 13(2), 94–102 (1970)

    Article  MATH  Google Scholar 

  11. Grune, D., Jacobs, C.: Parsing Techniques, a Practical Guide. Monographs in Computer Science, 2nd edn. Springer, New York (2007)

    Google Scholar 

  12. Kennedy, K., Ramanathan, J.: A Deterministic Attribute Grammar Evaluator Based on Dynamic Sequencing. ACM Trans. Program. Lang. Syst. 1(1), 142–160 (1979)

    Article  MATH  Google Scholar 

  13. Rodriguez-Cerezo, D., Henriques, P.R., Sierra, J.L.: Attribute grammars made easier: EvDebugger a visual debugger for attribute grammars. In: 2014 International Symposium on Computers in Education (SIIE), pp. 23–28. IEEE (2014)

    Google Scholar 

  14. Scott, E.: SPPF-style parsing from earley recognisers. Electron. Notes Theor. Comput. Sci. 203(2), 53–67 (2008)

    Article  Google Scholar 

  15. Scott, E., Johnstone, A.: Recognition is not parsing—SPPF-style parsing from cubic recognisers. Sci. Comput. Program. 75(1), 55–70 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  16. Sierra, J.L., Fernández-Pampillon, A.M., Fernández-Valmayor, A.: An environment for supporting active learning in courses on language processing. ACM SIGCSE Bull. 40(3), 128–132 (2008)

    Article  Google Scholar 

  17. Tomita, M.: Efficient Parsing for Natural Language. Kluwer Academic, Boston (1986)

    Book  Google Scholar 

  18. Vasudevan, N., Tratt, L.: Detecting ambiguity in programming language grammars. In: Erwig, M., Paige, R.F., Van Wyk, E. (eds.) SLE 2013. LNCS, vol. 8225, pp. 157–176. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

Download references

Acknowledgements

This work has been partially supported by the BBVA Foundation (research grant HUM14_251), by the Spanish R&D&I Plan (research grant TIN2014-52010-R), by Santander-UCM GR3/14 (group number 962022) and by the grant EDU/3445/201.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to José-Luis Sierra .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Rodríguez-Cerezo, D., Sierra, JL. (2015). Browsing the Parse Space. In: Sierra-Rodríguez, JL., Leal, JP., Simões, A. (eds) Languages, Applications and Technologies. SLATE 2015. Communications in Computer and Information Science, vol 563. Springer, Cham. https://doi.org/10.1007/978-3-319-27653-3_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-27653-3_12

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-27652-6

  • Online ISBN: 978-3-319-27653-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics