Newsgroups: comp.ai.nat-lang
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!uhog.mit.edu!bloom-beacon.mit.edu!gatech!swrinde!pipex!uunet!EU.net!sun4nl!cs.vu.nl!dick
From: dick@cs.vu.nl (Dick Grune)
Subject: Re: Complexity of Parsing?
Message-ID: <Cz9Fvo.88I@cs.vu.nl>
Sender: news@cs.vu.nl
Nntp-Posting-Host: dick.cs.vu.nl
Organization: Fac. Wiskunde & Informatica, VU, Amsterdam
Date: Mon, 14 Nov 1994 13:52:34 GMT
Lines: 56


vannoord@let.rug.nl (Gertjan van Noord) wrote:
> what are we talking about here? If we are talking about context-free
> grammars then recognition is cubic, but so is parsing. Of course, if
> you insist on the parser to enumerate each parse tree then this becomes
> exponential simply because there might be an exponential number of 
> parse trees.
This is where parse forests come in, a data structure which packs
exponentially many parse trees in n^2 space (when they derive from
the same sentence and the same grammar, they have an awful lot of
redundancy).  Bernard Lang from INRIA (the original 1971 inventor of the
Tomita algorithm) has been doing a lot of work on them fairly recently:

%A Bernard Lang
%T Towards a uniform formal framework for parsing
%B Current Issues in Parsing Technology
%E Masaru Tomita
%I Kluwer Academic Publ.
%C Boston
%P 153-171
%D 1991
(A useful book anyway)

%A B. Lang
%T Parsing incomplete sentences
%B Proceedings of the 12th International Conf. on Comput. Linguistics (Budapest)
%I Association for Computational Linguistics
%D 1988
%P 365-371

Lang explains his parse forest in terms of a Tomita-like parser, but the idea
can be applied equally well in a chart parser (or a CYK parser, as a MSc
student of mine has demonstrated).

The first article to my knowledge on this subject is:

%A A.V. Aho
%A T.G. Peterson
%T A minimum-distance error-correcting parser for context-free languages
%J SIAM J. Computing
%V 1
%N 4
%D 1972
%P 305-312

which already proves that the problem can be solved in n^3 time. (See our book
"Parsing Techniques - A Practical Guide" by Dick Grune and Ceriel Jacobs,
Ellis Horwood/Prentice Hall, 1990).

Dick Grune					| email: dick@cs.vu.nl
Vrije Universiteit				| ftp://ftp.cs.vu.nl/pub/dick
de Boelelaan 1081				| http://www.cs.vu.nl/~dick
1081 HV  Amsterdam, the Netherlands		| tel: +31 20 444 7744
-----------------------------------------------------------------------------
With infinitely many exceptions, what you do makes no difference.

