LOGICAL FORMS IN THE CORE LANGUAGE ENGINE
Hiyan Alshawi & Jan van Eijck SRI International Cambridge Research Centre 23 Millers Yard, Mill Lane, Cambridge CB2 11ZQ, U.K.
Keywords: logical form, natural language, semantics
ABSTRACT from linguistic analysis that applies composi- tional semantic interpretation rules indepen- This paper describes a 'Logical Form' target dently of the influence of context. language for representing the literal mean- Sentence ing of English sentences, and an interme- ~, syntax rules diate level of representation ('Quasi Logical Parse trees Form') which engenders a natural separation semantic rules between the compositional semantics and the QLF ezpressions processes of scoping and reference resolution. ~, context The approach has been implemented in the LF expressions SRI Core Language Engine which handles the English constructions discussed in the paper. The QLF expressions are derived on the ba- sis of syntactic structure, by means of se- mantic rules that correspond to the syntax INTRODUCTION rules that were used for analysing the sen- tence. Having QLFs as a well-defined level of The SRI Core Language Engine (CLE) is representation allows the problems of com- a domain independent system for translat- positional semantics to be tackled separately ing English sentences into formal represen- from the problems of scoping and reference tations of their literal meanings which are resolution. Our experience so far with the capable of supporting reasoning (Alshawi et CLE has shown that this separation can ef- al. 1988). The CLE has two main lev- fectively reduce the complexity of the system els of semantic representation: quasi logical as a whole. Also, the distinction enables us to forms (QLFs), which may in turn be scoped avoid multiplying out interpretation possibil- or unscoped, and fully resolved logical forms ities at an early stage. The representation (LFs). The level of quasi logical form is the languages we propose are powerful enough target language of the syntax-driven seman- to give weU-motiwted translations of a wide tic interpretation rules. Transforming QLF range of English sentences. In the current expressions into LF expressions requires (i) version of the CLE this is used to provide a fixing the scopes of all scope-bearing opera- systematic and coherent coverage of all the tors (quantifiers, tense operators, logical op- major phrase types of English. To demon- erators) and distinguishing distributive read- strate that the semantic representations are ings of noun phrases from collective ones, and also simple enough for practical natural lan- (ii) resolving referential expressions such as guage processing applications, the CLE has definite descriptions, pronouns, indexical ex- been used as an interface to a purchase order pressions, and underspecified relations. processing simulator and a database query The QLF level can be regarded as the nat- system, to be described elsewhere. ural level of sentence representation resulting In summary, the main contributions of the 25 work reported in this paper are (i) the intro- for an elegant compositional semantic duction of the QLF level to achieve a natural framework: separation between compositional semantics and the processes of scoping and reference resolution, and (ii) the integration of a range use of lambda abstraction for the of well-motivated semantic analyses for spe- translation of graded predicates in cific constructions in a single coherent frame- our treatment of comparatives and work. superlatives; We will first motivate our extensions to first order logic and our distinction between use of tense operators and inten- LF and QLF, then describe the LF language, sional operators for dealing with illustrating the logical form translations pro- the English tense and au~liary sys- duced by the CLE for a number of English tem in a compositional way. constructions, and finally present the addi- tional constructs of the QLF language and illustrate their use. • Extensions motivated by the desire to separate out the problems of scoping from those of semantic representation. EXTENDING FIRST ORDER LOGIC • Extensions motivated by the need to deal with context dependent construc- As the pioneer work by Montague (1973) sug- tions, such as anaphora, and the implicit gests, first order logic is not the most nat- relations involved in the interpretation of ural representation for the meanings of En- possessives and compound nominals. glish sentences. The development of Mon- tague grammar indicates, however, that there is quite a bit of latitude as to the scope of the The first two extensions in the list are part extensions that are needed. In developing of the LF language, to be described next, the the LF language for the CLE we have tried to other two have to do with QLF constructs. be conservative in our choice of extensions to first order logic. Earlier proposals with simi- These QLF constructs are removed by the processes of quantifier scoping and reference lar motivation are presented by Moore (1981) and Schubert & Pelletier (1982). resolution (see below). The ways in which first order logic-- The treatment of tense by means of tempo- ral operators that is adopted in the CLE will predicate logic in which the quantifiers 3 and not be discussed in this paper. Some advan- V range over the domain of individuals--is ex- tages of an operator treatment of the English tended in our treatment can be grouped and motivated as follows: tense system are discussed in (Moore, 1981). We are aware of the fact that some as- • Extensions motivated by lack of ex- pects of our LF representation give what are pressive power of ordinary first order arguably overly neutral analyses of English logic: for a general treatment of noun constructions. For example, our uses of event phrase constructions in English general- variables and of sentential tense operators say ized quantifiers are needed ('Most A are little about the internal structure of events or B' is not expressible in a first order lan- about an underlying temporal logic. Never- guage with just the two one-place pred- theless, our hope is that the proposed LF rep- icates A and B). resentations form a sound basis for the subse- quent process of deriving the fuller meaning • Extensions motivated by the desire representations. 26 RESOLVED Leave(e, john) ^ Sudden(e))).
LOGICAL FORMS The use of event variables in turn permits us to give a uniform interpretation of prepo- NOTATIONAL CONVENTIONS sitional phrases, whether they modify verb phrases or nouns. For example, John de- Our notation is a straightforward extension signed a house in Cambridge has two read- of the standard notation for first order logic. ings, one in which in Cambridge is taken to The following logical form expression involv- modify the noun phrase a house, and one ing restricted quantification states that every where the prepositional phrase modifies the dog is nice: verb phrase, with the following translations quant(forall, x, Dog(x), Nice(x)). respectively: To get a straightforward treatment of the quant(exlsts, h, collective/distributive distinction (see below) House(h) A In_location(h, Cambridge), we assume that variables always range over past(quant (exists, e, Ev(e), sets, with 'normal' individuals corresponding Design( e, john, h ) ) ) ). to singletons. Properties like being a dog can quant(exlsts, h, House(h) A be true of singletons, e.g. the referent of Fido, past(quant(exists, e, Ev(e), as well as larger sets, e.g. the referent of the Design(e, john, h) ^ three dogs we saw yesterday. In_location(e, Cambridge)))). The LF language allows formation of com- plex predicates by means of lambda abstrac- In both cases the prepositional phrase is tion: ,~x,\d.Heavy.degree( z, d) is the predi- translated as a two-place relation stating that cate that expresses degree of heaviness. something is located in some place. Where the noun phrase is modified, the relation is between an ordinary object and a place; in the case where the prepositional phrase mod- EVENT AND STATE VARIABLES ifies the verb phrase the relation is between an event and a place. Adjectives in pred- Rather than treating modification of verb icative position give rise to state variables in phrases by means of higher order predicate their translations. For example, in the trans- modifiers, as in (Montague, 1973), we follow lation of John was happy in Paris, the prepo- Davidson's (1967) quantification over events sitional phrase modifies the state. States are to keep closer to first order logic. The event like events, but unlike events they cannot be corresponding to a verb phrase is introduced instantaneous. as an additional argument to the verb pred- icate. The full logical form for Every repre- sentative voted is as follows: GENERALIZED QUANTIFIERS quant(forall, x, Repr(x), past(quant(exists, e, Ev(e), Vote(e,x)))). A generalized quantifier is a relation Q be- tween two sets A and B, where Q is insensi- Informally, this says that for every represen- tive to anything but the cardinalities of the tative, at some past time, there existed an 'restriction set' A and the 'intersection set' event of that representative voting. A N B (Barwise & Cooper, 1981). A gen- The presence of an event variable allows eralized quantifier with restriction set A and us to treat optional verb phrase modifiers as intersection set ANB is fully characterized by predications of events, as in the translation a function AmAn.Q(m, n) of m and n, where of John left suddenly: m = IAI and n = IANB I. In theLFlan- guage of the CLE, these quantifier relations past(quant(exists, e, Ev(e), are expressed by means of predicates on two 27 numbers, where the first variable abstracted The reading of Two companies ordered five over denotes the cardinality of the restriction computers where the first noun phrase is in- set and the second one the cardinality of the terpreted collectively and the second one dis- intersection set. This allows us to build up tributively is expressed by the following log- quantifiers for complex specifier phrases like ical form: at least three but less than five. In simple quant(set(~n.(n = 2)), x, Company(x), cases, the quantifier predicates are abbrevi- quant(~n.(n = 5), y, ated by means of mnemonic names, such as Computer(y), exists, notexists, forall or most. Here are past(quant (exists, e, Ev(e), some quantifier translations: Order(e, x, y))))). • most ",.* Xm,Xn.(m < 2n) [abbreviation: The first quantification expresses that there most]. is a collection of two companies satisfying the body of the quantification, so this read- • at least three but less than seven ,,~ ing involves five computers and five buy- )tm~n.(n > 3 ^ n < 7). ing events. The operator set is introduced • not every .,.* )~m)~n.(m ~ n). during scoping since collective/distributive distinctionsmlike scoping ambiguities--are A logical form for Not every representative not present in the initial QLF. voted is: We have extended the generalized quanti- quant()~mAn.(m # n), x, Rep(z), fier notation to cover phrases with measure past(quant (exists, e, Ev(e), Vote(e,x)))). determiners, such as seven yards of fabric or a pound of flesh. Where ordinary generalized Note that in one of the quantifier examples quantifiers involve counting, amount gener- above the abstraction over the restriction set alized quantifiers involve measuring (accord- is vacuous. The quantifiers that do depend ing to some measure along some appropriate only on the cardinality of their intersection dimension). Our approach, which is related set turn out to be in a linguistically well- to proposals that can be found in (Pelletier, defined class: they are the quantifiers that ed.,1979) leads to the following translation can occur in the NP position in "There are for John bought at least five pounds of ap- NP'. This quantifier class can also be char- ples: acterized logically, as the class of symmet- quant(amount($n.(n >_ 5), pounds), r/c quantifiers: "At least three but less than seven men were running" is true just in case z, Apple(z), past(quant(exists, e, Ev(e), "At least three but less than seven runners were men" is true; see (Barwise & Cooper, Buy( e, john , x))))). 1981) and (Van Eijck, 1988) for further dis- Measure expressions and numerical quanti- cussion. Below the logical forms for symmet- tiers also play a part in the semantics of com- ric quantifiers will be simplified by omitting paratives and superlatives respectively (see the vacuous lambda binder for the restric- below). tion set. The quantifiers for collective and measure terms, described in the next section, seem to be symmetric, although linguistic in- NATURAL KINDS tuitions vary on this. Terms in logical forms may either refer to in- dividual entities or to natural kinds (Carlson, COLLECTIVES AND MEASURE 1977). Kinds are individuals of a specific na- TERMS ture; the term kind(x, P(x)) can loosely be interpreted as the typical individual satisfy- Collective readings are expressed by an ex- ing P. All properties, including composite tension of the quantifier notation using set. ones, have a corresponding natural kind in 28 our formalism. Natural kinds are used in the degree of height which is measured, in inches, translations of examples like John invented by the amount quantification. Examples like paperclips: Mary is 3 inches less tall than John get sim- ilar translations. In Mary is taller than John past(quant(exists, e, Ev(e), the quantifier for the degree to which Mary Invent(e, john, kind(p, Paperclip(p) ) ) ). is taller is simply an existential. In reasoning about kinds, the simplest ap- Superlatives are reduced to comparatives proach possible would be to have a rule of by paraphrasing them in terms of the num- inference stating that if a "kind individual" ber of individuals that have a property to at has a certain property, then all "real world" least as high a degree as some specific individ- individuals of that kind have that property as ual. This technique of comparing pairs allows well: if the "typical bear" is an animal, then us to treat combinations of ordinals and su- all real world bears are animals. Of course, perlatives, as in the third tallest man smiled: the converse rule does not hold: the "typical quant(ref(the,...), a, bear" cannot have all the properties that any Man(a) A quant(An.(n = 3), b, real bear has, because then it would have to Man(b)), be both white all over and brown all over, quant(amount(,kn.(n _> 0), units), h, and so on. more( Az ~d.tall_degree( x, d), b, a, h ), past(quant(exists, e, Ev(e), Smile(e, a)))))). COMPARATIVES AND SUPERLA- The logical form expresses that there are ex- TIVES actly three men whose difference in height from a (the referent of the definite noun In the present version of the CLE, compara- phrase, see below) is greater than or equal tives and superlatives are formed on the basis to 0 in some arbitrary units of measurement. of degree predicates. Intuitively, the mean- ing of the comparative in Mary is nicer than John is that one of the two items being com- QUASI LOGICAL FORMS pared possesses a property to a higher degree than the other one, and the meaning of a su- The QLF language is a superset of the LF perlative is that art item possesses a property language; it contains additional constructs to the highest degree among all the items in for unscoped quantifiers, unresolved refer- a certain set. This intuition is formalised in ences, and underspecified relations. The (Cresswell, 1976), to which our treatment is 'meaning' of a QLF expression can be related. thought of as being given in terms of the The comparison in Mary is two inches meanings of the set of LF expressions it is taller than John is translated as follows: mapped to. Ultimately the meaning of the quant(amount(An.(n = 2), inches), QLF expressions can be seen to depend on h, Degree(h), the contextual information that is employed more()~x Ad. tall_degree(z, d), in the processes of scoping and reference res- mary, john, h ). olution. The operator more has a graded predicate as its first argument and three terms as its UNSCOPED QUANTIPIERS second, third and fourth arguments. The op- erator yields true if the degree to which the In the QLF language, unscoped quantifiers first term satisfies the graded predicate ex- are translated as terms with the format ceeds the degree to which the second term satisfies the predicate by the amount speci- qterm((quantifier),(number), fied in the final term. In this example h is a ( variable),( restriction) ). 29 Coordinated NPs, like a man or a woman, a_term(ref(pro, him, sing, [mary]), are translated as terms with the format x, Male(x)) term..coord( ( operator),( variable), a_term(ref(refl, him, sing, [z, mary]), (ten)). y, Male(y)). The first argument of an a_term is akin The unscoped QLF generated by the seman- to a category containing the values of syn- tic interpretation rules for Most doctors and tactic and semantic features relevant to ref- some engineers read every article involves erence resolution, such as those for the both qterms and a term_coord (quantifier reflexive/non-reflexive and singular/plural scoping generates a number of scoped LFs distinctions, and a list of the possible intra- from this): sentential antecedents, including quantified quant(exists, e, Ev(e), antecedents. Read(e, term_coord(A, x, qterm(most, plur, y, Doctor(y)), Definite Descriptions. Definite descrip- qterm(some, plur, z, Engineer(z))), qterm(every, sing, v, Art(v)))). tions are represented in the QLF as unscoped quantified terms. The qterm is turned into Quantifier scoping determines the scopes of a quant by the scoper, and, in the simplest quantifiers and operators, generating scoped case, definite descriptions are resolved by in- logical forms in a preference order. The or- stantiating the quant variable in the body dering is determined by a set of declarative of the quantification. Since it is not possible rules expressing linguistic preferences such to do this for descriptions containing bound as the preference of particular quantifiers to variable anaphora, such descriptions remain outscope others. The details of two versions as quantifiers. For example, the QLF gener- of the CLE quantifier scoping mechanism are ated for the definite description in Every dog discussed by Moran (1988) and Pereira (A1- buried the bone that it found is: shawl et al. 1988). qterm(ref(def, the, sing, Ix]), sing, y, Bone(y) A past(quant(exlsts, e, Ev(e), Find(e, a_term(ref(pro, it, sing, [y,z]), UNRESOLVED REFERENCES w, Zmv rsonal(w)), y)))). After scoping and reference resolution, the Unresolved references arising from pronoun LF translation of the example is as follows: anaphora and definite descriptions are rep- quant(forall, x, Dog(x), resented in the QLF as 'quasi terms' which q uant(exists_one, y, contain internal structure relevant to refer- Bone(y) A past(quant(exists, e, Ev(e), ence resolution. These terms are eventually Find(e, x, y))), replaced by ordinary LF terms (constants or quant(exists, e', Ev( e'), Bury( e', x, y)))). variables) in the final resolved form. A dis- cussion of the CLE reference resolution pro- cess and treatment of constraints on pronoun reference will be given in (Alshawi, in prep.).
Unbound Anaphoric Terms. When an argument position in a QLF predication must Pronouns. The QLF representation of a co-refer with an anaphoric term, this is indi- pronoun is an anaphoric term (or a_term). cated as a_index(x), where x is the variable For example, the translations of him and for the antecedent. For example, because himself in Mary expected him to introduce want is a subject control verb, we have the himself are as follows: following QLF for he wanted to swim: 30 past(quant(exists, e, Ev(e), qterm(exists, sing, x, Want(e, a_term(ref(pro, he, sing, [ ]), z, a_form(poss, R, House(x) A R(john, x ) ) ). Male(z)), quant(exists, e I, Ev(el), The implicit relation, R, can then be deter- Swim( e', a_index(z))))). mined by the reference resolver and instanti- ated, to Owns or Lives_in say, in the resolved If the a_index variable is subsequently re- LF. solved to a quantified variable or a constant, then the a_index operator becomes redun- The translation of indefinite compound dant and is deleted from the resulting LF. In nominals, such as a telephone socket, involves special cases such as the so-called 'donkey- an a_form, of type cn (for an unrestricted sentences', however, an anaphoric term may compound nominal relation), with a 'kind' term: be resolved to a quantified variable v outside the scope of the quantifier that binds v. The qterm(a, sing, s, LF for Every farmer who owns a dog loves it a_form(cn, R, Socket(s) ^ provides an example: R( s, kind(t, Telephone(t)))). quant(forall, x, Farmer( x )A The 'kind' term in the translation reflects the quant(exists, y, Dog(y), fact that no individual telephone needs to be quant(exists, e, Zv( e ), Own(e, x, y) ) ), involved. quant(exists, e ~, Ev(e'), Love( e ~, x, a..index(y)))). One-Anaphora. The a_form construct is The 'unbound dependency' is indicated by an also used for the QLF representation of a_index operator. Dynamic interpretation 'one-anaphora'. The variable bound by the of this LF, in the manner proposed in (Groe- a_form has the type of a one place predi- nendijk & Stokhof, 1987), allows us to arrive cate rather than a relation. Resolving these at the correct interpretation. anaphora involves identifying relevant (parts of) preceding noun phrase restrictions (Web- ber, 1979). For example the scoped QLF for UNRESOLVED PREDICATIONS Mary sold him an expensive one is: quant(exists, x, The use of unresolved terms in QLFs is not a_form(one, P, P( x ) A Expensive(x)), sufficient for covering natural language con- past(quant(exists, e, Ev(e), structs involving implicit relations. We have Sell(e, mary, z, a_term(...)))). therefore included a QLF construct (a_form for 'anaphoric formula') containing a formula After resolution (if the sentence were pre- with an unresolved predicate. This is eventu- ceded, say, by John wanted to buy a futon) ally replaced by a fully resolved LF formula, the resolved LF would be: but again the process of resolution is beyond q uant (exists, z, the scope of this paper. Futon( x ) ^ Expensive(z), past(quant(exists, e, Ev(e), Sell(e, mary, x, john ) ) ). Implicit Relations. Constructions like possessives, genitives and compound nouns are translated into QLF expressions contain- CONCLUSION ing uninstantiated relations introduced by the a_form relation binder. This binder is We have attempted to evolve the QLF and used in the translation of John's house which LF languages gradually by a process of says that a relation, of type poss, holds be- adding minimal extensions to first order tween John and the house: logic, in order to facilitate future work on 31 natural language systems with reasoning ca- Carlson, G.N. 1977. "Reference to Kinds in pabilities. The separation of the two seman- English", PhD thesis, available from In- tic representation levels has been an impor- diana University Linguistics Club. tant guiding principle in the implementation of a system covering a substantial fragment Davidson, D. 1967. "The Logical Form of of English semantics in a well-motivated way. Action Sentences", in N. Rescher, The Further work is in progress on the treatment Logic of Decision and Action, University of collective readings and of tense and aspect. of Pittsburgh Press, Pittsburgh, Penn- sylvania.
van Eijck, J. 1988. "Quantification". ACKNOWLEDGEMENTS Technical Report CCSRC-7, SRI Inter- national, Cambridge Research Centre. The research reported in this paper is part Cambridge, England. To appear in of a group effort to which the following peo- A. von Stechow & D. Wunderlich, Hand- ple have also contributed: David Carter, Bob book of Semantics, De Gruyter, Berlin. Moore, Doug Moran, Barney Pell, Fernando Pereira, Steve Pulman and Arnold Smith. Groenendijk, J. & M. Stokhof 1987. "Dy- Development of the CLE has been carried out namic Predicate Logic". Preliminary re- as part of a research programme in natural- port, ITLI, Amsterdam. language processing supported by an Alvey Montague, R. 1973. "The Proper Treatment grant and by members of the NATTIE con- of Quantification in Ordinary English". sortium (British Aerospace, British Telecom, In R. Thomason, ed., Formal Philoso- Hewlett Packard, ICL, Olivetti, Philips, Shell phy, Yale University Press, New Haven. Research, and SRI). We would like to thank the Alvey Directorate and the consortium Moore, R.C. 1981. "Problems in Logical members for this funding. The paper has Form". 19th Annual Meeting of the As- benefitted from comments by Steve Pulman sociation for Computational Linguistics, and three anonymous ACL referees. Stanford, California, pp. 117-124. Moran, D.B. 1988. "Quantifier Scoping in REFERENCES the SRI Core Language Engine", 26th Annual Meeting of the Association for Alshawi, H., D.M. Carter, J. van Eijck, R.C. Computational Linguistics, State Uni- Moore, D.B. Moran, F.C.N. Pereira, versity of New York at Buffalo, Buffalo, S.G. Pulman and A.G. Smith. 1988. In- New York, pp. 33-40. terim Report on the SRI Core Language Pelletier, F.J. (ed.) 1979. Mass Terms: Engine. Technical Report CCSRC-5, Some Philosophical Problems, Reidel, SRI International, Cambridge Research Dordrecht. Centre, Cambridge, England. Schubert, L.K. & F.J. Pelletier 1982. "From Alshawi, H., in preparation, "Reference Res- English to Logic: Context-Free Compu- olution In the Core Language Engine". tation of 'Conventional' Logical Trans- lations". Americal Journal of Computa- Barwise, J. & R. Cooper. 1981. "General- tional Linguistics, 8, pp. 26-44. ized Quantifiers and Natural Language", Linguistics and Philosophy, 4, 159-219. Webber, B. 1979. A Formal Approach to Dis- course Anaphora, Garland, New York. Cresswell, M.J. 1976. "The Semantics of De- gree", in: B.H. Partee (ed.), Montague Grammar, Academic Press, New York, pp. 261-292. 32