FUNCTIONAL PEARL Functional chart parsing of context-free grammars

2004 ◽  
Vol 14 (6) ◽  
pp. 669-680
Author(s):  
PETER LJUNGLÖF

This paper implements a simple and elegant version of bottom-up Kilbury chart parsing (Kilbury, 1985; Wirén, 1992). This is one of the many chart parsing variants, which are all based on the data structure of charts. The chart parsing process uses inference rules to add new edges to the chart, and parsing is complete when no further edges can be added. One novel aspect of this implementation is that it doesn't have to rely on a global state for the implementation of the chart. This makes the code clean, elegant and declarative, while still having the same space and time complexity as the standard imperative implementations.

2016 ◽  
Vol 42 (2) ◽  
pp. 207-243
Author(s):  
Daniel Gildea ◽  
Giorgio Satta

The complexity of parsing with synchronous context-free grammars is polynomial in the sentence length for a fixed grammar, but the degree of the polynomial depends on the grammar. Specifically, the degree depends on the length of rules, the permutations represented by the rules, and the parsing strategy adopted to decompose the recognition of a rule into smaller steps. We address the problem of finding the best parsing strategy for a rule, in terms of space and time complexity. We show that it is NP-hard to find the binary strategy with the lowest space complexity. We also show that any algorithm for finding the strategy with the lowest time complexity would imply improved approximation algorithms for finding the treewidth of general graphs.


Author(s):  
Mehrnoosh Bazrafkan

The numerous different mathematical methods used to solve pattern recognition snags may be assembled into two universal approaches: the decision-theoretic approach and the syntactic(structural) approach. In this paper, at first syntactic pattern recognition method and formal grammars are described and then has been investigated one of the techniques in syntactic pattern recognition called top – down tabular parser known as Earley’s algorithm Earley's tabular parser is one of the methods of context -free grammar parsing for syntactic pattern recognition. Earley's algorithm uses array data structure for implementing, which is the main problem and for this reason takes a lots of time, searching in array and grammar parsing, and wasting lots of memory. In order to solve these problems and most important, the cubic time complexity, in this article, a new algorithm has been introduced, which reduces wasting the memory to zero, with using linked list data structure. Also, with the changes in the implementation and performance of the algorithm, cubic time complexity has transformed into O (n*R) order. Key words: syntactic pattern recognition, tabular parser, context –free grammar, time complexity, linked list data structure.


Author(s):  
M. NIVAT ◽  
A. SAOUDI

We investigate the complexity of the recognition of images generated by a class of context-free image grammars. We show that the sequential time complexity of the recognition of an n × n image as generated by a context-free grammar is O(nM(n)), where M(n) is the time to multiply two boolean n × n matrices. The space complexity of this recognition is O(n3). Using a parallel random access machine (i.e. PRAM), the recognition can be done in O( log 2(n)) time with n7 processors or in O(n log 2(n)) time with n6 processors. We also introduce high dimensional context-free grammars and prove that their recognition problem is polylogarithmic.


Sign in / Sign up

Export Citation Format

Share Document