Semantics using the Lambda Calculus |
F(Ann) | = λ v. v @ ann |
F(Rover) | = λ v. v @ rover |
F(petted) | = λ o. λ s. o @ λ x. petted(s,x) |
Let's see if we can figure out the types of each of the meanings of these kinds of expressions. Traditionally in linguistics we write the type of all elements of the model as e, and functions from a to b as <a,b> rather than a -> b. We will use a -> b to be more consistent with ML, even though the other notation is often more compact
The type of a noun phrase is always (e -> bool) -> bool. Here is why: Because the result of applying the subject to the verb phrase is the meaning of the sentence, it seems clear that the range of this function is bool. Inside the definition of the meaning of a noun phrase, the parameter v is applied to an element of the domain (which by definition has type e) and returns something of type bool as that is the meaning after application. Therefore the type of parameter v is e -> bool.
The meaning of a transitive verb is a function taking an argument which is a noun phrase. Thus the type of the domain of this function is ((e -> bool) -> bool). The result of this is the argument to the subject, which is a noun phrase, which requires an argument of type e -> bool. Thus the type of a transitive verb is ((e -> bool) -> bool) -> (e -> bool).
Summarizing:
Thus by writing the meaning of noun phrases as parameterized by the function that will be applied to them we can understand both simple sentences and those that involve quantifiers. We will go into more detail on meanings later, but first we want to talk a bit more about the lambda calculus.
In summary we can compute the meaning of sentences as follows:
Semantics using the Lambda Calculus |