CYK algorithm: Difference between revisions

Content deleted Content added
Undid revision 583281285 by 188.4.96.164 (talk) rvv
Teetooan (talk | contribs)
Generating a parse tree: Corrected style and technical error
Line 78:
==Extensions==
===Generating a parse tree===
ItThe isabove simplealgorithm tois extenda the[[recognizer]] above algorithm tothat notwill only determine if a sentence is in athe language,. butIt is simple to extend it into a [[parser]] that also construct a [[parse tree]], by storing parse tree nodes as elements of the array, instead of booleans. Since the grammarsparsing beingprocess recognizedgenerates canalso unneeded subtrees that cannot be ambiguousimmediately known as such, it is necessary to store a list of nodesof potential subtree roots (unlessat list ome for each possible non-terminal, even if one wishes to only pick only one of the possible parse treetrees); the end result is then a shared-forest of possible parse trees. This shared forest can conveniently be read as a grammar generating only the sentence parsed, with any of the parse-trees corresponding to the original grammar, up to a very simple renaming of non-terminals.<ref name=harder>{{cite journal|last=Lang|first=Bernard|title=RECOGNITION CAN BE HARDER THAN PARSING|journal=Computational Intelligence|date=November 1994|volume=10|issue=4|pages=486–494|url=http://citeseerx.ist.psu.edu/viewdoc/download?rep=rep1&type=pdf&doi=10.1.1.50.6982}}</ref>
 
An alternative formulation employs a second table B[n,n,r] of so-called ''backpointers''.