170 likes | 297 Views
LING 388: Language and Computers. Sandiway Fong Lecture 20 11/1. Administrivia. Due tonight Homework 6. Last Time. Introduced predicate-argument structure computation On website Grammar: g19.pl Let’s review g19 …. g 19.pl. g19.pl. g19.pl. g19.pl. Example:
E N D
LING 388: Language and Computers Sandiway Fong Lecture 20 11/1
Administrivia • Due tonight • Homework 6
Last Time • Introduced predicate-argument structure computation • On website • Grammar: g19.pl • Let’s review g19 …
g19.pl • Example: • ?-s(P, [i,hit,the,ball], []). • P = hit(i,ball) • hit = predicate = head of VP • i = agent = head of subject NP • ball = theme = head of object NP • Prolog term hit(i,ball) produced using the (univ) =.. built-in Prolog predicate from the list • [hit,i,ball]
Predicate-Argument Structure • Example: ?- s(X,[i,ran],[]). no • doesn’t work. Why? • Let’s see… • fails because predarg/3 only works for the transitive verb case
Predicate-Argument Structure • Modify definition of predarg/3 to handle unergative verb case • First attempt: But, program now overgenerates since the two cases overlap
Predicate-Argument Structure • Modify definition of predarg/3 to handle unergative verb case • First attempt: • Second attempt • (make the unergative case block • the transitive pattern)
Predicate-Argument Structure • Example: produces a strange result. Why? • Let’s see…
Predicate-Argument Structure • Trace of predarg/3 reveals that the transitive verb case inadvertently matches the passive construction i.e. objectNP matches vp(v(eat_en),np(trace)
Predicate-Argument Structure • Solution: check to make sure objectNP is an NP not a VP functor/3 is a built-in Prolog predicate functor(Term,Functor,Arity) e.g.functor(Term,np,Arity) checks whether Term = np(_,…) we leave Arity unspecified since we have a range of NPs such as: np(det(the),n(man)) np(i) is correctly blocked
Predicate-Argument Structure • To handle the passive example, we need to add a specific rule for predarg/3: Subject is not specified SubjectNP VP
Predicate-Argument Structure • There is overlap between the unergative and passive cases pattern matches against vp(aux(was), vp(v(eat_en), np(trace))) but blocks vp(v(run_ed))
Predicate-Argument Structure • Example (passive with subject in by-phrase): we also want this to produce essentially the same predicate-argument structure as: PA SubjectNP VP
Predicate-Argument Structure • Summary: