Compositional and Lexical Semantics • Compositional Semantics: The
Total Page:16
File Type:pdf, Size:1020Kb
Compositional and lexical semantics Compositional semantics: the construction • of meaning (generally expressed as logic) based on syntax. This lecture: – Semantics with FS grammars Lexical semantics: the meaning of • individual words. This lecture: – lexical semantic relations and WordNet – one technique for word sense disambiguation 1 Simple compositional semantics in feature structures Semantics is built up along with syntax • Subcategorization `slot' filling instantiates • syntax Formally equivalent to logical • representations (below: predicate calculus with no quantifiers) Alternative FS encodings possible • 2 Objective: obtain the following semantics for they like fish: pron(x) (like v(x; y) fish n(y)) ^ ^ Feature structure encoding: 2 PRED and 3 6 7 6 7 6 7 6 2 PRED 3 7 6 pron 7 6 ARG1 7 6 6 7 7 6 6 ARG1 1 7 7 6 6 7 7 6 6 7 7 6 6 7 7 6 4 5 7 6 7 6 7 6 2 3 7 6 PRED and 7 6 7 6 6 7 7 6 6 7 7 6 6 7 7 6 6 2 3 7 7 6 6 PRED like v 7 7 6 6 7 7 6 6 6 7 7 7 6 6 ARG1 6 ARG1 1 7 7 7 6 6 6 7 7 7 6 6 6 7 7 7 6 6 6 7 7 7 6 ARG2 6 6 ARG2 2 7 7 7 6 6 6 7 7 7 6 6 6 7 7 7 6 6 6 7 7 7 6 6 4 5 7 7 6 6 7 7 6 6 7 7 6 6 2 3 7 7 6 6 PRED fish n 7 7 6 6 ARG2 7 7 6 6 6 7 7 7 6 6 6 ARG 2 7 7 7 6 6 6 1 7 7 7 6 6 6 7 7 7 6 6 6 7 7 7 6 6 4 5 7 7 6 6 7 7 6 4 5 7 6 7 4 5 3 Noun entry 2 3 2 CAT noun 3 6 HEAD 7 6 7 6 6 AGR 7 7 6 6 7 7 6 6 7 7 6 4 5 7 6 7 6 COMP 7 6 filled 7 6 7 fish 6 7 6 SPR filled 7 6 7 6 7 6 7 6 INDEX 1 7 6 2 3 7 6 7 6 SEM 7 6 6 PRED fish n 7 7 6 6 7 7 6 6 7 7 6 6 ARG 1 7 7 6 6 1 7 7 6 6 7 7 6 6 7 7 6 4 5 7 4 5 Corresponds to fish(x) where the INDEX • points to the characteristic variable of the noun (that is x). The INDEX is unambiguous here, but e.g., picture(x; y) sheep(y) ^ picture of sheep 4 Verb entry 2 3 2 CAT 3 6 HEAD verb 7 6 7 6 6 7 7 6 6 AGR pl 7 7 6 6 7 7 6 6 7 7 6 4 5 7 6 7 6 7 6 7 6 2 3 7 6 HEAD 2 CAT noun 3 7 6 7 6 6 7 7 6 6 4 5 7 7 6 COMP 6 7 7 6 6 COMP 7 7 6 6 filled 7 7 6 6 7 7 6 6 7 7 6 6 SEM 7 7 6 6 2 INDEX 2 3 7 7 6 6 7 7 6 6 7 7 6 6 4 5 7 7 like 6 6 7 7 6 4 5 7 6 7 6 7 6 2 3 7 6 HEAD CAT 7 6 2 noun 3 7 6 6 7 7 6 SPR 6 7 7 6 6 4 5 7 7 6 6 7 7 6 6 SEM 7 7 6 6 2 INDEX 1 3 7 7 6 6 7 7 6 6 7 7 6 6 4 5 7 7 6 6 7 7 6 4 5 7 6 7 6 7 6 2 PRED 3 7 6 like v 7 6 7 6 SEM 6 7 7 6 6 ARG1 1 7 7 6 6 7 7 6 6 7 7 6 6 ARG 2 7 7 6 6 2 7 7 6 6 7 7 6 6 7 7 6 4 5 7 4 5 Linking syntax and semantics: ARG1 linked • to the SPR's index; ARG2 linked to the COMP index. 5 COMP filling rule HEAD 1 2 COMP filled 3 6 7 6 SPR 3 7 6 7 6 7 6 7 6 PRED 7 6 2 and 3 7 ! 6 SEM 7 6 ARG1 4 7 6 6 7 7 6 6 7 7 6 6 ARG 5 7 7 6 6 2 7 7 4 4 5 5 HEAD 1 2 COMP 2 3 , 2 2 COMP filled 3 6 7 6 SPR 3 7 SEM 5 6 7 6 7 6 4 7 4 5 6 SEM 7 4 5 As last time: object of the verb (DTR2) • ‘fills’ the COMP slot New: semantics on the mother is the `and' • of the semantics of the dtrs 6 Apply to like HEAD 1 2 COMP filled 3 6 7 6 SPR 3 7 6 7 6 7 6 7 6 PRED 7 6 2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 6 ARG 6 7 7 6 6 2 7 7 4 4 5 5 like v(x; y) fish n(y) ^ 8 Logic in semantic representation Meaning representation for a sentence is • called the logical form Standard approach to composition in • theoretical linguistics is lambda calculus, building FOPC or higher order representation Representation above is impoverished but • can build FOPC in FSs Theorem proving • Generation: starting point is logical form, • not string. 9 Meaning postulates e.g., • x[bachelor (x) man (x) unmarried (x)] 8 0 ! 0 ^ 0 usable with compositional semantics and • theorem provers e.g. from `Kim is a bachelor', we can • construct the LF bachelor0(Kim) and then deduce unmarried0(Kim) OK for narrow domains, but `classical' • lexical semantic relations are more generally useful 10 Lexical semantic relations Hyponymy: IS-A: (a sense of) dog is a hyponym of (a sense of) • animal animal is a hypernym of dog • hyponymy relationships form a taxonomy • works best for concrete nouns • Meronomy: PART-OF e.g., arm is a meronym of body, steering wheel is a meronym of car (piece vs part) Synonymy e.g., aubergine/eggplant Antonymy e.g., big/little 11 WordNet large scale, open source resource for English • hand-constructed • wordnets being built for other languages • organized into synsets: synonym sets • (near-synonyms) Overview of adj red: 1. (43) red, reddish, ruddy, blood-red, carmine, cerise, cherry, cherry-red, crimson, ruby, ruby-red, scarlet -- (having any of numerous bright or strong colors reminiscent of the color of blood or cherries or tomatoes or rubies) 2.