A CKY parser for picture grammars (original) (raw)

A unifying approach to picture grammars

Information and Computation, 2011

Several old and recent classes of picture grammars, that variously extend context-free string grammars in two dimensions, are based on rules that rewrite arrays of pixels. Such grammars can be unified and extended using a tiling based approach, whereby the right part of a rule is formalized by means of a finite set of permitted tiles. We focus on a simple type of tiling, named regional, and define the corresponding regional tile grammars. They include both Siromoney's (or Matz's) Kolam grammars and their generalization by Průša, as well as Drewes's grid grammars. Regionally defined pictures can be recognized with polynomialtime complexity by an algorithm extending the CKY one for strings. Regional tile grammars and languages are strictly included into our previous tile grammars and languages, and are incomparable with Giammarresi-Restivo tiling systems (or Wang systems).

Symbolic Picture Languages and their Decidability and Complexity Properties

Journal of Visual Languages & Computing, 1999

In this paper, some subclasses of Positional Grammars have been formalized as an extension of the picture grammars which were introduced by Maurer, Rozenberg and Welzl. This allows us to exploit the theoretical background established for picture languages and context-free languages to get insight into the features of the Positional grammar model. In particular, we have focused on several decidability and complexity issues for the (drawn) symbolic picture languages and their striped versions.

On the Complexity of CCG Parsing

Computational Linguistics

We study the parsing complexity of Combinatory Categorial Grammar (CCG) in the formalism of Vijay-Shanker and Weir ( 1994 ). As our main result, we prove that any parsing algorithm for this formalism will take in the worst case exponential time when the size of the grammar, and not only the length of the input sentence, is included in the analysis. This sets the formalism of Vijay-Shanker and Weir ( 1994 ) apart from weakly equivalent formalisms such as Tree Adjoining Grammar, for which parsing can be performed in time polynomial in the combined size of grammar and input sentence. Our results contribute to a refined understanding of the class of mildly context-sensitive grammars, and inform the search for new, mildly context-sensitive versions of CCG.

Efficient parsing algorithms for general context-free parsers

Information Sciences, 1975

A family of parsing algorithms for general context-free grammars is described. Its members have a top-down structure, while performing tests similar to those introduced in both LR and LL algorithms. A theoretical study shows that the algorithms have the same time and space bounds as Earley's algorithms, which are particular members of the family. Empirical comparisons show the effectiveness of the new members of the family, which appear to be definitely better than Earley's algorithms, except for a few pathological grammars. parsers, Report R173 M.B.L.E. Research Lab. Brussels (Belgium), 1971.

A Parsing Technique for Tile Rewriting Picture Grammars

Recently, a novel model, called Tile Rewriting Grammar (TRG), has been introduced to apply the generative grammar approach to picture languages, or 2D languages. In many respects, the TRGs can be considered the equivalent of context-free (CF) grammars for 2D languages. However, the possibility to investigate applications was precluded so far by the lack of a good parsing algorithm. We propose a parsing algorithm for TRGs, which can be described as an extension to 2D of Cocke, Kasami and Younger's classical parsing technique for 1D context-free grammars.

An error correcting parser for context free grammars that takes less than cubic time

The problem of parsing has been studied extensively for various formal grammars. Given an input string and a grammar, the parsing problem is to check if the input string belongs to the language generated by the grammar. A closely related problem of great importance is one where the input are a string I and a grammar G and the task is to produce a string I that belongs to the language generated by G and the 'distance' between I and I is the smallest (from among all the strings in the language). Specifically, if I is in the language generated by G, then the output should be I. Any parser that solves this version of the problem is called an error correcting parser. In 1972 Aho and Peterson presented a cubic time error correcting parser for context free grammars. Since then this asymptotic time bound has not been improved under the (standard) assumption that the grammar size is a constant. In this paper we present an error correcting parser for context free grammars that runs in O(T (n)) time, where n is the length of the input string and T (n) is the time needed to compute the tropical product of two n × n matrices. In this paper we also present an n M-approximation algorithm for the language edit distance problem that has a run time of O(M n ω), where O(n ω) is the time taken to multiply two n × n matrices. To the best of our knowledge, no approximation algorithms have been proposed for error correcting parsing for general context free grammars.

Regional Languages and Tiling: A Unifying Approach to Picture Grammars

Lecture Notes in Computer Science

Several classical models of picture grammars based on array rewriting rules can be unified and extended by a tiling based approach. The right part of a rewriting rule is formalized by a finite set of permitted tiles. We focus on a simple type of tiling, named regional, and define the corresponding regional tile grammars. They include both Siromoney's (or Matz's) Kolam grammars, and their generalization by Průša. Regionally defined pictures can be recognized with polynomial time complexity by an algorithm extending the CKY one for strings. Regional tile grammars and languages are strictly included into the tile grammars and languages, and are incomparable with Giammarresi-Restivo tiling systems (or Wang's tilings).

Towards efficient parsing of diagrammatic languages

Proceedings of the workshop on Advanced visual interfaces - AVI '94, 1994

Many models have been presented to specify visual languages and big efforts are being made to characterize a class of visual languages which is expressive enough and, at the same time, efficient to parse. Along this direction, the positional grammar nwdel has been dejined to extend the LX parsing techniques and parse efficiently not only the string languages but also iconic languages. In this paper, we present an extension of the positional grammar model in order to describe a wide variety of diagrammatic languages. We show that this new formalism allows the construction of an efficient LR-like parser for visual languages of very practical interest.

Undecidability of the emptiness problem for context-free picture languages

Theoretical Computer Science, 2017

A two-dimensional Kolam grammar as defined by Siromoney et al. in 1972 and independently by Matz in 1997 and Schlesinger in 1989 allows context-free productions of the form A → a, A → B C , A → B C , and S → λ which concatenate sub-pictures produced by B and C horizontally respectively vertically if their height respectively width fits. We demonstrate that this grammar is quite powerful by proving undecidability of the emptiness problem. We further analyze consequences of this finding and give additional characteristics related to size of generated pictures.