Skip to content

Instantly share code, notes, and snippets.

@stesh
Created April 17, 2011 02:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stesh/923688 to your computer and use it in GitHub Desktop.
Save stesh/923688 to your computer and use it in GitHub Desktop.
digraph CYK_parse {
rankdir=LR;
node [shape = point,height=0.3]; 0,1,2,3,4,5,6;
// k = 1
// --------------------
0 -> 1 [label = "DET",color=black];
0 -> 1 [label = "the",color=red];
1 -> 2 [label = "N",color=black];
1 -> 2 [label = "man",color=red];
2 -> 3 [label = "DTV",color=black];
2 -> 3 [label = "gave",color=red];
2 -> 3 [label = "VP/NP to NP",color=gray];
3 -> 4 [label = "NP",color=black];
3 -> 4 [label = "it",color=red];
3 -> 4 [label = "S/VP",color=gray];
4 -> 5 [label = "to",color=red];
5 -> 6 [label = "NP",color=black];
5 -> 6 [label = "him",color=red];
5 -> 6 [label = "S/VP",color=gray];
// k = 2
// --------------------
0 -> 2 [label = "NP",color=black];
2 -> 4 [label="VP/NP to",color=gray];
0 -> 2 [label = "S/VP",color=gray];
// k = 3
// --------------------
2 -> 5 [label="VP/NP",color=gray];
// k = 4
// --------------------
2 -> 6 [label = "VP",color=black];
// k = 6
// --------------------
0 -> 6 [label = "S",color=green];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment