Download presentation
Presentation is loading. Please wait.
1
74.419 Artificial Intelligence 2004
From Syntax to Semantics Grammatical Extensions Sentence Structures Noun Phrase - Modifications Verb Phrase - Subcategorization Feature Structures -expressions
2
Sample Grammar Task: Parse "Does this flight include a meal?"
Grammar (S, NT, T, P) – Part-of-Speech NT, syntactic Constituents NT S → NP VP statement S → Aux NP VP question S → VP command NP → Det Nominal NP → Proper-Noun Nominal → Noun | Noun Nominal | Nominal PP VP → Verb | Verb NP | Verb PP | Verb NP PP PP → Prep NP Det → that | this | a Noun → book | flight | meal | money Proper-Noun → Houston | American Airlines | TWA Verb → book | include | prefer Aux → does Prep → from | to | on Task: Parse "Does this flight include a meal?"
3
Sample Parse Tree Task: Parse "Does this flight include a meal?"
Aux NP VP Det Nominal Verb NP Noun Det Nominal does this flight include a meal
4
Grammar – 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?”
5
Grammar – Noun Phrase Modification 1
Noun Phrase Modifiers head = the central noun of the NP (+ modifiers) modifiers before the head noun (prenominal) determiner the, a, this, some, ... predeterminer all the flights cardinal numbers, ordinal numbers one flight, the first flight, ... quantifiers much, little adjectives a first-class flight, a long flight adjective phrase the least expensive flight NP → (Det) (Card) (Ord) (Quant) (AP) Nominal
6
Grammar – Noun Phrase Modification 2
Noun Phrase Modifiers (continued) 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
7
Grammar – Verb Subcategorization
Verb Phrase and Subategorization VP = Verb + other constituents. Different verbs accept or need different constituents → Verb Subcategorization; captured in verb frames. sentential complement VP Verb inf-sentence I want to fly from Boston to Chicago. NP complement VP Verb NP I want this flight. no complement VP Verb I sleep. more forms VP Verb PP PP I fly from Boston to Chicago.
8
Grammar – Feature Structures 1
describe additional syntactic-semantic information, like category, person, number, e.g. goes (verb, 3rd, singular) specify feature structure constraints (agreements) as part of grammar during parsing, check agreements of feature structures (unification) example S → NP VP <NP number> = <VP number> or S → NP VP <NP agreement> = <VP agreement>
9
Grammar – Feature Structures 2
agreements in general determined by head of phrase, i.e. central noun or verb example (1) “... the man who chased the cat out of the house ...” central noun? (2) “... the man chased the barking dog who bit him ...” central verb? operations on agreements (e.g. sing |_| plural = fail) unification for checking of specified agreements
10
Semantics Distinguish between surface structure (syntactic structure) and deep structure (semantic structure) of sentences. Semantics can be defined based on FOPL. Transform sentence (with quantified variables) into lambda-expression. Central is again verb (with roles). lambda-expression is like a function which can then be applied to constants. example: x, y: loves (x, y) FOPL sentence -expr: xy loves (x, y) function xy loves (x, y) (John) y loves (John, y) Note: The semantics of LISP is based on lambda-calculus.
11
Semantics Distinguish between surface structure (closer to syntactic structure) and deep structure (semantic structure) of sentences Semantic can be defined based on FOPL. Transform sentence (with quantified variables) into lambda-expression. Central is again verb (with roles). lamda-expression is like a function which can then be applied to constants. “AI Caramba is close to ICSI.” specific: close-to (AI Caramba, ICSI) general: x,y: close-to (x, y) x=AI Caramba y=ICSI -expr: xy: close-to (x, y) (AI Caramba) y: close-to (AI Caramba, y) close-to (AI Caramba, ICSI)
12
Additional References
Jurafsky, D. & J. H. Martin, Speech and Language Processing, Prentice-Hall, (Chapters 9 and 10) Earley Algorithm Jurafsky & Martin, Figure 10.16, p.384 Earley Algorithm - Examples Jurafsky & Martin, Figures and 10.18
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.