Week 5: Syntax and parsing
Reminders and announcements
- Assignment 1 is due this week!
- Remaining help hours are 10-11 on Mon 14th and 12-1 on Tue 15th, in AT 5.07.
- No extensions are permitted on this assignment and late submissions will receive a mark of 0, so plan on finishing early just in case! Also remember: it is much better to submit an incomplete assignment than to submit late or not at all.
- Submission instructions are posted at the bottom of this page.
- Tutorial solutions for last week's groups.
- Exercises for Tutorial 2 are now available. The questions are based on material from last week, so you can get started now! As usual, you should plan to work through the questions before your tutorial group meets next week.
- There are no lab or tutorial group meetings this week.
Overview of this week
Last week we talked about parts of speech, which are also known as syntactic categories because they are related to the are determined by This week, we shift from parts of speech (syntactic categories for individual words) to how words fit together into sentences. As in other parts of language, there seem to be rule-like constraints on how this can happen: the syntax of the language.
For language such as English, syntax can be approximately modeled using a formalism called a context-free grammar CFG, and we will first discuss evidence for that; what defines a CFG; and examples of syntactic ambiguity. Then we'll talk about how to parse (recover the structure of a sentence given a grammar), where we'll learn about an algorithm that, like the Viterbi algorithm, uses dynamic programming to do this. Finally, we'll discuss statistical approaches to parsing, their strengths and weaknesses.
Lectures and readings
Lecture # | Who? | Slides | Reading |
---|---|---|---|
1 | SG | Syntax and context-free grammar | JM3 18.0-18.2 (*), 18.5 (*) |
2 | SG | Constituency parsing algorithms | JM3 18.4 (*), 18.6.0 (*), 18.6.1, 18.6.2 (*), 18.6.3 |
3 | SG | Treebanks and statistical parsing | JM3 18.3 (*), 18.8 (*) JM3 Appendix C: C.0-C.3 (*), C.4-C.6.0 |
Assignment 1 submission instructions
- You can submit as many times as you want (up until the deadline), and the final submission will be marked.
- Since extensions are not permitted, and late submissions get a zero, we strongly recommend you do not wait until just before the deadline to submit!
- To submit your assignment through Gradescope, please complete the three steps below.
(N.B. If you re-submit, you must complete all three steps again: Gradescope does not keep your page assignments or partner for the next submission)
This video shows the whole process in more detail.
- Step 1. Upload your pdf: After logging into Gradescope, you should see the "Dashboard" for the ANLP course. Click on "Assignment 1: Language modelling", then "Submit PDF". After selecting your file through "Select PDF", click on "Upload PDF". Completing this step will record your time of submission, so you can do the remaining steps after submitting without affecting the submission time.
- Step 2. Associate questions to pages: For each question, you need to select the page(s) of your pdf where you answered that question. The marker for each question will only see the page(s) that you select for that question, so make sure you select the right page(s). To do this, click on a question from "Question Outline" on the left of your screen, then click on the corresponding pages from your file on the right. After you are satisfied with the result, click 'Submit'. If you realize you did it wrong, click on 'Reselect pages' to fix it.
- Step 3. Add your partner to the submission: You need to tell Gradescope who your partner was, so that person will be associated with your submission and will get the marks and feedback for it. Click on "Group Members" to add your partner. There is one group of 3 students, which is why the maximum group size is listed as 3. But be careful, and do NOT add anyone to your submission who isn't your partner, as this would allow them to see your work! If you do so by accident, let us know immediately so we can remove them. Your partner will receive an email notifying them when you have added them to the submission.