74 419 Artificial Intelligence 200506 From Syntax to

  • Slides: 17
Download presentation
74. 419 Artificial Intelligence 2005/06 From Syntax to Semantics

74. 419 Artificial Intelligence 2005/06 From Syntax to Semantics

From Syntax to Semantics § Grammatical Extensions § Sentence Structures § Noun Phrase -

From Syntax to Semantics § Grammatical Extensions § Sentence Structures § Noun Phrase - Modifications § Verb Phrase - Subcategorization § Feature Structures § -expressions

Grammar – Sentence Level Constructs n declarative S NP VP “This flight leaves at

Grammar – Sentence Level Constructs n declarative S NP VP “This flight leaves at 9 am. ” n imperative S VP “Book this flight for me. ” n yes-no-question S Aux NP VP “Does this flight leave at 9 am? ” n 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

Grammar – Noun Phrase Modification 1 head = the central noun of the NP (+ modifiers) n modifiers before the head noun (prenominal) n determiner the, a, this, some, . . . n predeterminer all the flights n cardinal numbers, ordinal numbers one flight, the first flight, . . . n quantifiers much, little n adjectives a first-class flight, a long flight n adjective phrase the least expensive flight NP (Det) (Card) (Ord) (Quant) (AP) Nominal

Grammar – Noun Phrase Modification 2 n modifiers after the head noun (post-nominal) n

Grammar – Noun Phrase Modification 2 n modifiers after the head noun (post-nominal) n prepositional phrase PP all flights from Chicago Nominal PP (PP) n non-finite clause, gerundive postmodifers all flights arriving after 7 pm Nominal Gerund. VP Gerund. V NP | Gerund. V PP |. . . n relative clause a flight that serves breakfast Nominal Rel. Clause (who | that) VP

Grammar – Verb Subcategorization VP = Verb + other constituents. Different verbs accept or

Grammar – Verb Subcategorization VP = Verb + other constituents. Different verbs accept or need different constituents → Verb Subcategorization; captured in verb frames. n sentential complement VP Verb inf-sentence I want to fly from Boston to Chicago. n NP complement VP Verb NP I want this flight. n no complement VP Verb I sleep. n more forms VP Verb PP PP I fly from Boston to Chicago.

Grammar – Feature Structures 1 Feature Structures n describe additional syntactic-semantic information, like category,

Grammar – Feature Structures 1 Feature Structures n describe additional syntactic-semantic information, like category, person, number, e. g. goes <verb, 3 rd, singular> n specify feature structure constraints (agreements) as part of the grammar rules n during parsing, check agreements of feature structures (unification) e. g. or S NP VP <NP number>=<VP number> S NP VP <NP agreement>=<VP agreement>

Grammar – Feature Structures 2 Sub-categories specify attached phrases, e. g. NP modifiers or

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 n n surface structure (syntactic structure) and deep structure (semantic structure)

Semantics Distinguish between n n surface structure (syntactic structure) and deep structure (semantic structure) of sentences. Different forms of Semantic Representation n logic based n ontology based / semantic language / interlingua n Case Frame structures n DL and similar KR languages n linguistics based Ontologies

Semantics - Lambda Calculus 1 Logic representations often involve Lambda-Calculus: n represent central phrases

Semantics - Lambda Calculus 1 Logic representations often involve Lambda-Calculus: n represent central phrases (verb) as -expressions n -expression is like a function, which can be applied to terms n 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

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,

Semantics - Lambda Calculus 3 Lambda Expressions can be constructed from central (VP) expression, inserting semantic representations for complement (NP, PP) phrases: event subject-NP object-NP 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.

Inter. Lingua (IL) approach n n n An Ontology, a language-independent classification of objects,

Inter. Lingua (IL) approach n n n 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

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 John and tool

Relevant parts of the (appropriate senses of the) lexicon entries for John and tool John-n 1 syn-struc root john cat noun-proper sem-struc human name gender male tool-n 1 syn-struc root cat sem-struc tool n tool john

Semantics Semantic Representation through: § Case Frame structures § DL and similar KR languages

Semantics Semantic Representation through: § Case Frame structures § DL and similar KR languages § linguistics based Ontologies General: Map surface structure to semantic structure n Derive phrases as sub-structures n Find concepts for central phrases (VP, NP) n Assign phrases to appropriate roles around central concepts.

Additional References Jurafsky, D. & J. H. Martin, Speech and Language Processing, Prentice-Hall, 2000.

Additional References Jurafsky, D. & J. H. Martin, Speech and Language Processing, Prentice-Hall, 2000. (Chapters 9 and 10)