CYK Algorithm - Example

Example

This is an example grammar:

\begin{array}{lcl}
S &\to& NP \;\; VP\\
VP &\to& VP \;\; PP\\
VP &\to& V \;\; NP\\
VP &\to& eats\\
PP &\to& P \;\; NP\\
NP &\to& Det \;\; N\\
NP &\to& she\\
V &\to& eats\\
P &\to& with\\
N &\to& fish\\
N &\to& fork\\
Det &\to& a
\end{array}

Now the sentence she eats a fish with a fork is analyzed using the CYK algorithm. In the following table, in, is the number of the column (starting at the left at 1), and is the number of the row (starting at the bottom at 1).

CYK table
S
VP
S
VP PP
S NP NP
NP V, VP Det. N P Det N
she eats a fish with a fork

Since is true, the example sentence can be generated by the grammar.

Read more about this topic:  CYK Algorithm

Famous quotes containing the word example:

    Our intellect is not the most subtle, the most powerful, the most appropriate, instrument for revealing the truth. It is life that, little by little, example by example, permits us to see that what is most important to our heart, or to our mind, is learned not by reasoning but through other agencies. Then it is that the intellect, observing their superiority, abdicates its control to them upon reasoned grounds and agrees to become their collaborator and lackey.
    Marcel Proust (1871–1922)