Graph-based semantic representations are popular in natural language processing (NLP), whereit is often convenient to model linguistic concepts as nodes and relations as edges between them.Several attempts have been made to find a generative device that is sufficiently powerful todescribe languages of semantic graphs, while at the same allowing efficient parsing. We contributeto this line of work by introducing graph extension grammar, a variant of the contextualhyperedge replacement grammars proposed by Hoffmann et al. Contextual hyperedge replacementcan generate graphs with non-structural reentrancies, a type of node-sharing that isvery common in formalisms such as abstract meaning representation, but that context-free typesof graph grammars cannot model. To provide our formalism with a way to place reentranciesin a linguistically meaningful way, we endow rules with logical formulas in counting monadicsecond-order logic. We then present a parsing algorithm and show as our main result that thisalgorithm runs in polynomial time on graph languages generated by a subclass of our grammars,the so-called local graph extension grammars.

Author notes

Action Editor: Carlos Gómez-Rodríguez

This is an open-access article distributed under the terms of the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits you to copy and redistribute in any medium or format, for non-commercial use only, provided that the original work is not remixed, transformed, or built upon, and that appropriate credit to the original source is given. For a full description of the license, please visit