热门搜索:

  • /?44
  • 下载费用:2 金币 ?

Updating_Salience_Relations_in_a_Context__Pronoun_Reference_Resolution_Point_of_Departure.pdf

关?键?词:
UPDATING_SALIENCE_RELATIONS_IN_A_CONTEXT__PRONOUN_REFERENCE_RESOLUTION_POINT_OF_DEPARTURE
资源描述:

Computational Semantics, Type Theory, and Functional Programming III | Context Semantics Jan van Eijck CWI and ILLC, Amsterdam, Uil-OTS, Utrecht LOLA7 Tutorial, Pecs August 2002Summary ? Incremental Dynamics ? Context and Context Extension ? DRT, Incremental Dynamics and Type Theory ? Incremental Montague Grammar ? Updating Salience Relations in a Context ? Pronoun Reference ResolutionPoint of Departure: Incremental Dynamics Destructive assignment is the main weakness of Dynamic Predicate Logic (DPL, [GS91], but see also [Bar87]) as a basis for a composi- tional semantics of natural language: in DPL, the semantic e?ect of a quanti?er action 9x is that the previous value ofx gets lost forever. In this lecture we replace DPL by an incremental logic for NL semantics | call it ID for Incremental Dynamics [Eij01] | and build a type theoretic version of a compositional incremental semantics for NL. This context semantics for NL is without the destructive assignment ?aw. ID can be viewed as the one-variable version of sequence semantics for dynamic predicate logic proposed in [Ver93].Contexts and Context Extension Assume a ?rst order modelM = (D,I). We will use contextsc2D ? , and replace variables by indices into contexts. The set of terms of the language isN. We use jcj for the length of contextc. Given a model M = (D,I) and a context c =c[0]···c[n? 1], where n =jcj (the length of the context), we interpret terms of the language by means of [[i]] c =c[i]. A snag is that [[i]] c is unde?ned for i ≥ jcj; we will therefore have to ensure that indices are only evaluated in appropriate contexts. “ will be used for ‘unde?ned’. Ifc2D n andd2D we usec^d for the contextc 0 2D n+1 that is the result of appendingd at the end ofc.Semantics of ID The ID interpretation of formulas can now be given as a map in D ? ?!P(D ? ) (a partial function, because of the possibility of unde?nedness).Quanti?cation and Atomic Test [[9]](c) := fc^djd2Dg [[Pi 1 ···i n ]](c) := 8Prop type Idx = IntIndex Lookup and Context Extension lookupIdx is the implementation ofc[i]. lookupIdx :: Context -> Idx -> Entity lookupIdx [] i = error “undefined ctxt element“ lookupIdx (x:xs) 0 = x lookupIdx (x:xs) i = lookupIdx xs (i-1) extend is the implementation ofc^x. extend replaces the destructive update from the previous lecture. extend :: Context -> Entity -> Context extend = \ c e -> c ++ [e]To give an incremental version of the fragments from the previous lec- tures, we de?ne the appropriate dynamic operations in typed logic. Assume ? and have the type of context transitions, i.e., type [e]! [e]!t, and thatc,c 0 ,c 00 have type [e]. Note that ^ is an operation of type [e]!e! [e].Incremental quanti?cation 9 9 := λcc 0 .9x(c^x =c 0 ) exists :: Trans exists = \ c -> [ extend c x | x ?Trans neg = \ phi c -> if phi c == [] then [c] else []Incremental conjunction ? ; := λcc 0 .9c 00 (?cc 00 ^ c 00 c 0 ) conj :: Trans -> Trans -> Trans conj = \ phi psi c -> concat [ psi c’ | c’ ?Trans -> Trans impl = \ phi psi -> neg (phi ‘conj‘ (neg psi))Universal Quanti?cation 8 8? := : :(9 9 ;: :?) forall :: Trans -> Trans forall = \ phi -> neg (exists ‘conj‘ (neg phi))Predicate Lifting We have to assume that the lexical meanings of CNs, VPs are given as one place predicates (type e ! t) and those of TVs as two place predicates (type e !e !t). We therefore de?ne blow-up operations for lifting one-placed and two-placed predicates to the dynamic level. Assume A to be an expression of type e ! t, and B an expression of type e ! e ! t; we use c,c 0 as variables of type [e], and j,j 0 as variables of type ι, and we employ post?x notation for the lifting operations: A ? := λjcc 0 .(c =c 0 ^Ac[j]) B ? := λjj 0 cc 0 .(c =c 0 ^Bc[j]c[j 0 ])Discourse blow-up of one-placed predicates: blowupPred :: (Entity -> Bool) -> Idx -> Trans blowupPred = \ pred i c -> if pred (lookupIdx c i) then [c] else [] Discourse blow-up for two-placed predicates. blowupPred2 :: ((Entity,Entity) -> Bool) -> Idx -> Idx -> Trans blowupPred2 = \ pred i1 i2 c -> if pred (lookupIdx c i2, lookupIdx c i1) then [c] else []Anchors for Proper Names The anchors for proper names are extracted from an initial context. anchor :: Entity -> Context -> Idx anchor = \ e c -> anchr e c 0 where anchr e [] i = error (show e ++ “ not anchored in ctxt“) anchr e (x:xs) i | e == x = i | otherwise = anchr e xs (i+1)Datatypes for Syntax No index information on NPs, except for pronouns. Otherwise, virtually the same as the datatype declaration of the previous lecture. data S = S NP VP | If S S | Txt S S deriving (Eq,Show) data NP = Ann | Mary | Bill | Johnny | PRO Idx | He | She | It | NP1 DET CN | NP2 DET RCN deriving (Eq,Show) data DET = Every | Some | No | The deriving (Eq,Show)data CN = Man | Woman | Boy | Person | Thing | House | Cat | Mouse deriving (Eq,Show) data RCN = CN1 CN VP | CN2 CN NP TV deriving (Eq,Show)data VP = Laughed | Smiled | VP1 TV NP | VP2 TV REFL deriving (Eq,Show) data REFL = Self deriving (Eq,Show) data TV = Loved | Respected | Hated | Owned deriving (Eq,Show)Arity Reduction Interpretation of VPs consisting of a TV with a re?exive pronoun uses the relation reducer self. self :: (a -> a -> b) -> a -> b self = \ p x -> p x x Note the polymorphism of this de?nition. We will use the arity reducer on relations in type Idx -> Idx -> Trans rather than Entity -> Entity -> Bool.Dynamic Interpretation The interpretation of sentences, in type S -> Trans: intS :: S -> Trans intS (S np vp) = (intNP np) (intVP vp) intS (If s1 s2) = (intS s1) ‘impl‘ (intS s2) intS (Txt s1 s2) = (intS s1) ‘conj‘ (intS s2)Interpretations of proper names and pronouns. intNP :: NP -> (Idx -> Trans) -> Trans intNP Mary = \ p c -> p (anchor mary c) c intNP Ann = \ p c -> p (anchor ann c) c intNP Bill = \ p c -> p (anchor bill c) c intNP Johnny = \ p c -> p (anchor johnny c) c intNP (PRO i) = \ p -> p i Interpretation of complex NPs as expected: intNP (NP1 det cn) = (intDET det) (intCN cn) intNP (NP2 det rcn) = (intDET det) (intRCN rcn)Interpretation of (VP1 TV NP) as expected. Interpretation of (VP2 TV REFL) uses the relation reducer self. Interpretation of lexical VPs uses discourse blow-up from the lexical meanings. intVP :: VP -> Idx -> Trans intVP (VP1 tv np) = \ subj -> intNP np (\ obj -> intTV tv obj subj) intVP (VP2 tv _) = self (intTV tv) intVP Laughed = blowupPred laugh intVP Smiled = blowupPred smileInterpretation of TVs uses discourse blow-up of two-placed predicates. intTV :: TV -> Idx -> Idx -> Trans intTV Loved = blowupPred2 love intTV Respected = blowupPred2 respect intTV Hated = blowupPred2 hate intTV Owned = blowupPred2 ownInterpretation of CNs uses discourse blow-up of one-placed predicates. intCN :: CN -> Idx -> Trans intCN Man = blowupPred man intCN Boy = blowupPred boy intCN Woman = blowupPred woman intCN Person = blowupPred person intCN Thing = blowupPred thing intCN House = blowupPred house intCN Cat = blowupPred cat intCN Mouse = blowupPred mouseCode for checking that a discourse predicate is unique. singleton :: [a] -> Bool singleton [x] = True singleton _ = False unique :: Trans -> Trans unique phi c | singleton xs = [c] | otherwise = [] where xs = [ x | x ?(Idx -> Trans) -> (Idx -> Trans) -> Trans Interpretationofdeterminersintermsofdynamicquanti?cationexists, dynamicnegationneg,dynamicconjunctionconj,anddynamicunique- ness check unique. The di?erence with the treatment in the previous lecture is that the indices are now derived from the input context.intDET Some = \ phi psi c -> let i = length c in (exists ‘conj‘ (phi i) ‘conj‘ (psi i)) c intDET Every = \ phi psi c -> let i = length c in neg (exists ‘conj‘ (phi i) ‘conj‘ (neg (psi i))) c intDET No = \ phi psi c -> let i = length c in neg (exists ‘conj‘ (phi i) ‘conj‘ (psi i)) c intDET The = \ phi psi c -> let i = length c in ((unique (phi i)) ‘conj‘ exists ‘conj‘ (phi i) ‘conj‘ (psi i)) cInterpretation of relativised common nouns as expected: intRCN :: RCN -> Idx -> Trans intRCN (CN1 cn vp) = \ i -> conj (intCN cn i) (intVP vp i) intRCN (CN2 cn np tv) = \ i -> conj (intCN cn i) (intNP np (intTV tv i))Trying It Out Theinitialcontextfromwhichevaluationcanstartisgivenbycontext: context :: Context context = [A,M,B,J] Evaluation takes place by interpreting a sentence or piece of text in a context: eval :: S -> Prop eval = \ s -> intS s contextLOLA3> eval (S Johnny Smiled) [] LOLA3> eval (S Bill Laughed) [[A,M,B,J]] LOLA3> eval (S (NP1 The Boy) Laughed) [[A,M,B,J,J]] LOLA3> eval (S (NP1 Some Man) (VP1 Loved (NP1 Some Woman))) [[A,M,B,J,B,A],[A,M,B,J,B,M]] LOLA3> eval (S (NP1 Some Woman) (VP1 Loved (NP1 Some Man))) [[A,M,B,J,A,B],[A,M,B,J,A,J],[A,M,B,J,C,B], [A,M,B,J,C,J],[A,M,B,J,M,B],[A,M,B,J,M,J]]ex1 = (S (NP1 Some Woman) (VP1 Loved (NP1 Some Man))) ‘Txt‘ (S (PRO 6) (VP1 Loved (PRO 5))) ex2 = (S (NP1 Some Woman) (VP1 Loved (NP1 Some Man))) ‘Txt‘ (S (PRO 5) (VP1 Loved (PRO 4))) LOLA3> eval ex1 Program error: undefined ctxt element LOLA3> eval ex2 [[A,M,B,J,A,B],[A,M,B,J,M,B]]ex3 = S Johnny (VP1 Respected (NP2 Some (CN1 Man (VP1 Loved (NP1 Some Woman))))) LOLA3> eval ex3 [[A,M,B,J,B,A],[A,M,B,J,B,M]] ex4 = Txt (S (NP1 Some Man) (VP1 Loved (NP1 Some Woman))) (S (PRO 4) (VP1 Respected (PRO 5))) LOLA3> eval ex4 [[A,M,B,J,B,A],[A,M,B,J,B,M]]ex5 = S (NP1 Every Man) (VP2 Respected Self) ex6 = S (NP1 Some Man) (VP2 Respected Self) LOLA3> eval ex5 [[A,M,B,J]] LOLA3> eval ex6 [[A,M,B,J,B],[A,M,B,J,D],[A,M,B,J,J]]Updating Salience Relations in a Context Pronoun resolution should resolve pronouns to the most salient referent in context, modulo additional constraints such as gender agreement. To handle salience, we need contexts with slightly more structure, so that context elements can be permuted without danger of losing track of them. Contexts as lists of elements under a permutation are conveniently rep- resented as lists of index/element pairs. Details of this are worked out in my invited lecture ...References [Bar87] J.Barwise. Nounphrases,generalizedquanti?ersandanaphora. In P. G¨ ardenfors, editor, Generalized Quanti?ers: linguistic and logical approaches, pages 1{30. Reidel, Dordrecht, 1987. [Eij01] J.vanEijck. Incrementaldynamics. Journal of Logic, Language and Information, 10:319{351, 2001. [GS91] J. Groenendijk and M. Stokhof. Dynamic predicate logic. Lin- guistics and Philosophy, 14:39{100, 1991. [Rei83] T. Reinhart. Anaphora and Semantic Interpretation. Croom Helm, London, 1983. [Ver93] C.F.M. Vermeulen. Sequence semantics for dynamic predicate logic. Journal of Logic, Language, and Information, 2:217{254, 1993.

? 汽车智库所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
0条评论

还可以输入200字符

暂无评论,赶快抢占沙发吧。

关于本文
本文标题:Updating_Salience_Relations_in_a_Context__Pronoun_Reference_Resolution_Point_of_Departure.pdf
链接地址:http://www.autoekb.com/p-1548.html
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服客服 - 联系我们

copyright@ 2008-2018 mywenku网站版权所有
经营许可证编号:京ICP备12026657号-3?

收起
展开