This week we continue to study syntactic parsing. We refine context-free grammars by annotating the rules with probabilities (the likelihood that the mother node expands into that rule's daughter nodes) to create probabilistic context-free grammars. We discuss how these probabilities can be obtained from treebanks, and how they can influence predictions about how to resolve syntactic ambiguity during parsing. PCFGs have a number of weaknesses, however. So we introduce refinements to PCFGs. We'll also study an alternative approach to representing and parsing sentential syntax known as dependency parsing, which maps a sentence to a set of labelled dependencies.
We then talk about meaning. Knowing a sentence's syntactic structure is important because it is very informative as to what the sentence means: it provides crucial information about who did what to whom. Accordingly, resolving syntactic ambiguities helps to resolve semantic ambiguities. This week, we will start to analyse how NLP tackles the problem of computing meaning representations of sentences. We will focus on compositional semantics, which is a particular way of constructing a formal semantic representation of a sentence from its syntax tree.
Compositional semantics exploits the principle of compositionality: the meaning of a phrase is a function of the meaning of its parts and the way those parts combine syntactically to form that phrase. It is concerned with the logical aspects of meaning---for instance, that "Kim buttered the toast at midnight" entails "Kim buttered something". That is distinct from inferences that depend on commonsense knowledge: e.g., that Kim buttered the toast implies she buttered something that started out as bread (because that's dependent on knowing the contingent fact that toast is made from bread). Accordingly, compositional semantics represents the meaning of an NL sentence as a formula in symbolic logic (so that it supports theorem proving, model checking and model building), and it provides a way of constructing a formal semantic representation of a sentence from its syntax tree (by exploiting the principle of compositionality).
The content in the following pages is structured as follows:
16: Beyond vanilla CFGs and probabilistic parsing
17: Dependency Parsing
18: Compositional Semantics
Each of the above includes the slides, required readings, and a post-lecture quiz. The quiz is a chance for you to gauge your understanding of the material presented here, and so we strongly encourage you to review this content and then complete the quiz. If there is anything you don't understand, then you have several options:
- Post a question on piazza;
- Ask a question at the in person lectures; and/or
- Ask your tutor.