COMP9414/9814 Artificial Intelligence

Feedback Quiz on Natural Language Processing - Solutions

Topics: Semantic Interpretation

It is best not read the answers until you've tried to answer the questions yourself.

  1. What is the idea of a lambda expression? Why does this make it good for representing VPs?

    Answer: A lambda-expression is a predicate with something missing. The position(s) where the something is missing are marked by the presence of a variable, called a λ-variable, and the identity of the λ-variable is indicated at the start of the λ-expression by a special syntax.
    Examples: If someone likes pizza, but we don't (yet) know who, we can express this as lambda(X, likes(X, pizza)). X is the λ-variable.
    If Mary likes something but we don't (yet) know what, we can express this as lambda(Y, likes(mary, Y)).
    The identity of the λ-variable doesn't matter, so long as the symbol used for the lambda variable is used consistently, and so long as it hasn't been used anywhere else that could cause confusion.

    It's good for VPs, because the semantic representation of a VP is basically the logical form of a proposition, but when we are parsing the VP, we don't have the semantic representation of the subject noun phrase handy. The subject is one of the arguments of the proposition. Thus the subject NP's logical form is a gap in the logical form of the VP. We use a lambda-variable to mark this gap.

  2. How would you represent the VP "submit the assignment" using a lambda-expression?

    Answer: lambda(X, submit1(e1, X, the(a1, assignment1)))

  3. Apply your lambda-expression from the previous question to the NP whose logical form is pro(y1, you), and perform lambda-reduction.

    Answer: lambda(X, submit1(e1, X, the(a1, assignment1))) pro(y1, you)
    which reduces to submit1(e1, pro(y1, you), the(a1, assignment1))

  4. Write lexicon entries for the word "will" as an auxiliary, as a verb (as in For some reason, he decided to will his poodle Fido his collection of vintage socks) and as a noun.

    Answer:
    part of speechlexicon entry
    auxiliaryaux(sem(will1), subcat(vp:base))
    verbv(sem(will2), vform(base), subcat(np_np))
    nounn(sem(will3), agr(3s))

  5. What is the purpose of a var feature?

    Answer: A var feature provides a particular use of a word in a sentence with a unique identifier that can be used to refer to that use of the word, and which can also be used as the identifier for any phrase for which the word is head subconstituent.

  6. What would be a plausible logical form for the PP "from Coogee"?

    Answer: lambda(X, from_loc1(X, 'Coogee'))

  7. If the logical form for "bought a farm" is lambda(X, past(buy1)(e4, X, a(f1, farm1))) what would be a plausible logical form form for "have bought a farm"? What about "must have bought a farm"?

    Answer:
    have bought a farm lambda(Y, have1(past(buy1)(e4, Y, a(f1, farm1))))
    must have bought a farm lambda(Z, must1(have1(past(buy1)(e4, Z, a(f1, farm1)))))

  8. When do you need to use =.. to construct a term in a rule?

    Answer: When the functor of the term is represented as a variable in the rule. If only arguments are represented as variables, that's OK, and you shouldn't use =..

    For example, if you are trying to construct likes(mary, pizza), and you know that the functor is likes, but mary is unknown but is bound to a variable Agent and pizza is unknown but bound to a variable Object, then you can just write the term in your Prolog code as likes(Agent, Object).

    However, if you don't know in advance that the functor is likes, but it's bound to a variable - say Action, then you have to use =.. to build the term: Term =.. [Action, Agent, Object].


Bill Wilson's contact info

UNSW's CRICOS Provider No. is 00098G