CYK algorithm: Difference between revisions

Content deleted Content added
adding source, correcting name of author
As prose: wording improvements
Line 57:
 
===As prose===
In informal terms, this algorithm considers every possible substring of the input string and sets <math>P[l,s,v]</math> to be true if the substring of length <math>l</math> starting from <math>s</math> can be generated from nonterminalthe variablenonterminal <math>R_v</math>. Once it has considered substrings of length 1, it goes on to substrings of length 2, and so on. For substrings of length 2 and greater, it considers every possible partition of the substring into two parts, and checks to see if there is some production <math>PA \to QB \; RC</math> such that <math>QB</math> matches the first part and <math>RC</math> matches the second part. If so, it records <math>PA</math> as matching the whole substring. Once this process is completed, the sentenceinput string is recognizedgenerated by the grammar if the substring containing the entire input string is matched by the start symbol.
 
==Example==