Natural Language Processing · free preview

Chart Parsing with CKY and Neural Span Scores

Chomsky normal form, the CKY dynamic program over spans, packed representations of all parses, span-based neural disambiguation, and PARSEVAL evaluation.

1. Chart Parsing with CKY and Neural Span Scores

Chart Parsing with CKY and Neural Span Scores

2. Scoring spans with a network

Scoring spans with a network

3. CKY and span scores in Python

CKY and span scores in Python

4. Binarizing a long rule

How does conversion to Chomsky normal form handle the rule VP→V NP PPVP \to V\ NP\ PP, and why is the conversion safe?

5. What a cell holds

In the CKY table, what does cell [i,j][i, j] contain, and where does the algorithm look when filling it?

6. Counting split points

A constituent spans 5 words, from fencepost ii to fencepost jj. How many split points kk with i<k<ji < k < j must CKY try when filling that cell? Answer with the number.

7. The cubic cost

CKY parses a sentence of nn words with three nested loops, over columns, cells, and split points. For n=12n = 12, how many (cell, split) combinations does the algorithm consider, ignoring the grammar? Answer with the number.

8. Labeled precision and recall

A parser's tree contains 9 constituents, the gold tree contains 10, and 8 constituents match exactly in label and span. Compute the labeled F1F_1, rounding to three decimals.

Practice this interactively

Free account · instant grading · spaced review that schedules itself.

Start this course for free