74.419 Artificial Intelligence 2005/06
170 likes | 205 Views
Explore the transition from syntax to semantics in artificial intelligence, covering grammatical extensions, sentence structures, noun phrase modifications, verb phrase subcategorization, feature structures, lambda calculus, and more.
74.419 Artificial Intelligence 2005/06
E N D
Presentation Transcript
74.419 Artificial Intelligence 2005/06 From Syntax to Semantics
From Syntax to Semantics • Grammatical Extensions • Sentence Structures • Noun Phrase - Modifications • Verb Phrase - Subcategorization • Feature Structures • -expressions
Grammar – Sentence Level Constructs Sentence Level Constructs • declarative S NP VP “This flight leaves at 9 am.” • imperative S VP “Book this flight for me.” • yes-no-question S Aux NP VP “Does this flight leave at 9 am?” • wh-question S Wh-NP Aux NP VP “When does this flight leave Winnipeg?”
Grammar – Noun Phrase Modification 1 head = the central noun of the NP (+ modifiers) • modifiers before the head noun (prenominal) • determinerthe, a, this, some, ... • predeterminerall the flights • cardinal numbers, ordinal numbersone flight, the first flight, ... • quantifiersmuch, little • adjectives a first-class flight, a long flight • adjective phrase the least expensive flight NP (Det) (Card) (Ord) (Quant) (AP) Nominal
Grammar – Noun Phrase Modification 2 • modifiers after the head noun (post-nominal) • prepositional phrase PP all flights from Chicago Nominal Nominal PP (PP) (PP) • non-finite clause, gerundive postmodifers all flights arriving after 7 pm Nominal GerundVP GerundVP GerundV NP | GerundV PP | ... • relative clause a flight that serves breakfast Nominal Nominal RelClause RelClause (who | that) VP
Grammar – Verb Subcategorization VP = Verb + other constituents. Different verbs accept or need different constituents → Verb Subcategorization; captured in verb frames. • sentential complementVP Verb inf-sentence I want to fly from Boston to Chicago. • NP complementVP Verb NP I want this flight. • no complement VP Verb I sleep. • more forms VP Verb PP PP I fly from Boston to Chicago.
Grammar – Feature Structures 1 Feature Structures • describe additional syntactic-semantic information, like category, person, number, e.g. goes <verb, 3rd, singular> • specify feature structure constraints (agreements) as part of the grammar rules • during parsing, check agreements of feature structures (unification) e.g. S NP VP <NP number>=<VP number> or S NP VP <NP agreement>=<VP agreement>
Grammar – Feature Structures 2 Sub-categories specify attached phrases, e.g. NP modifiers or Verb complements like NP “... the man who chased the cat out of the house ...” central noun + sub-categories + agreements “... the man chased the barking dog who bit him ...” central verb+ sub-categories + agreements Agreements are passed on / inherited within phrases, e.g. agreement of VP derived from Head-Verb of VP, through special Unification functions <VP agreement> determined by <Verb agreement> <NP agreement> determined by <Nom agreement>
Semantics Distinguish between • surface structure (syntactic structure) and • deep structure (semantic structure) of sentences. Different forms of Semantic Representation • logic based • ontology based / semantic language / interlingua • Case Frame structures • DL and similar KR languages • linguistics based Ontologies
Semantics - Lambda Calculus 1 Logic representations often involve Lambda-Calculus: • represent central phrases (verb) as -expressions • -expression is like a function, which can be applied to terms • insert semantic representation of complement or modifier phrases etc. in place of variables x, y: loves (x, y) FOPL sentence x y loves (x, y) -expression, function x y loves (x, y) (John) y loves (John, y)
Semantics - Lambda Calculus 2 Transform sentence into lambda-expression: “AI Caramba is close to ICSI.” specific: close-to (AI Caramba, ICSI) general: x, y: close-to (x, y) x=AI Caramba y=ICSI Lambda Conversion: x y: close-to (x, y) (AI Caramba) Lambda Reduction: y: close-to (AI Caramba, y) close-to (AI Caramba, ICSI)
Semantics - Lambda Calculus 3 Lambda Expressions can be constructed from central (VP) expression, inserting semantic representations for complement (NP, PP) phrases: Verb serves {x y e IS-A (e, Serving) Server (e, y) Served (e, x)} represents general semantics for the verb 'serve Fill in appropriate expressions for x, y, for example 'meat' for y derived from Noun in NP as complement to Verb. event subject-NP object-NP
InterLingua (IL) approach • An Ontology, a language-independent classification of objects, event, relations • A Semantic Lexicon, which connects lexical items to nodes (concepts) in the ontology • An analyzer that constructs IL representations and selects (an?) appropriate one
Deriving basic semantic dependency (a toy example) Input: John makes tools Syntactic Analysis: cat verb tense present subject root john cat noun-proper object root tool cat noun number plural
Relevant parts of the (appropriate senses of the) lexicon entries for Johnand tool John-n1 syn-struc root john cat noun-proper sem-struchuman name john gender male tool-n1 syn-struc root tool cat n sem-struc tool
Semantics Semantic Representation through: • Case Frame structures • DL and similar KR languages • linguistics based Ontologies General: Map surface structure to semantic structure • Derive phrases as sub-structures • Find concepts for central phrases (VP, NP) • Assign phrases to appropriate roles around central concepts.
Additional References Jurafsky, D. & J. H. Martin, Speech and Language Processing, Prentice-Hall, 2000. (Chapters 9 and 10)