2011-12-06
Final Paper
- Finishing final 'draft' of final paper
- Uploaded as PDF here
(aside: I found out how to write the X̄ symbol in Unicode, [X & #772]- without spaces, and can be compounded to form X̄̄, X̄̄̄ ...)
Chapter 9 Question
Simplest case: grammar only has the words above:
% start S
# Grammar productions
S -> NP[GND=?g, NUM=?n]
NP[GND=?g, NUM=?n] -> A[GND=?g, NUM=?n] NP[GND=?g, NUM=?n]
NP[GND=?g, NUM=?n] -> N[GND=?g, NUM=?n] ADJ[GND=?g, NUM=?n]
# Lexical productions
# Articles
# Masculine
A[GND=m, NUM=s] -> "un"
A[GND=m, NUM=p] -> "unos"
# Feminine
A[GND=f, NUM=s] -> "una"
A[GND=f, NUM=p] -> "unas"
# Nouns
# Masculine
N[GND=m, NUM=s] -> "cuadro"
N[GND=m, NUM=p] -> "cuadros"
# Feminine
N[GND=f, NUM=s] -> "cortina"
N[GND=f, NUM=p] -> "cortinas"
# Adjectives
# Masculine
ADJ[GND=m, NUM=s] -> "hermoso"
ADJ[GND=m, NUM=p] -> "hermosos"
# Feminine
ADJ[GND=f, NUM=s] -> "hermosa"
ADJ[GND=f, NUM=p] -> "hermosas"
# -------------------------
Chapter 10 question
5. Consider the following statements:
>>> lp = nltk.LogicParser()
>>> e1 = ... fill in your definition here; see below ...
>>> e2 = lp.parse('pat')
>>> e3 = nltk.sem.ApplicationExpression(e1, e2)
>>> print e3.simplify()
exists y.love(pat, y)
Clearly something is missing here, namely a declaration of the value of e1. In order for ApplicationExpression(e1, e2) to be β-convertible to exists y.love(pat, y), e1 must be a λ-abstract which can take pat as an argument. Your task is to construct such an abstract, bind it to e1, and satisfy yourself that the statements above are all satisfied (up to alphabetic variance). In addition, provide an informal English translation of e3.simplify().
e1 = lp.parse(r'(\x.exists y.love(x, y))')