overview
play

Overview Grammars and trees; Cognitive Modeling competence vs. - PowerPoint PPT Presentation

Overview Grammars and trees; Cognitive Modeling competence vs. performance; Lecture 9: Language Processing ambiguity; dimensions of parsing; Frank Keller School of Informatics a parallel parser; University of Edinburgh


  1. Overview � Grammars and trees; Cognitive Modeling � competence vs. performance; Lecture 9: Language Processing � ambiguity; � dimensions of parsing; Frank Keller School of Informatics � a parallel parser; University of Edinburgh � left-corner parsing; keller@inf.ed.ac.uk � a serial parser. Reading: Cooper (2002, Ch. 7). Cognitive Modeling: Language Processing – p.1 Cognitive Modeling: Language Processing – p.2 Introduction A Small Grammar of English Linguistics deals with: Phrase markers: � phonology: the sounds of the language; S: sentence, NP: noun phrase, VP: verb phrase � syntax: the structure of sentences (word order, etc.); Syntactic categories (aka parts of speech): � semantics: the meaning of sentences; Det: determiner, CN: common noun, TV: transitive verb Phrase structure rules: � pragmatics: the use of language in context; non-literal meaning. S NP VP Det the → → NP Det CN CN cat Psycholinguistics studies the comprehension and production of → → language on all these level. VP TV NP TV bit → → CN dog Here we will focus on syntactic processing (aka sentence → processing, parsing). Cognitive Modeling: Language Processing – p.3 Cognitive Modeling: Language Processing – p.4

  2. Syntax Tree More Phrase Structure Rules NP Pro pronoun → The grammar rules generate a syntax tree for sentences like NP PN proper name → the cat bit the dog: PP Prep NP prepositional phrase → S VP IV intransitive verb → VP DV NP NP ditransitive verb → VP DV NP PP ditransitive verb with PP comple- NP VP → ment Det CN TV NP VP V inf1 VP(inf) verb with infinitival complement → VP V inf2 NP VP(inf) verb with NP and infinitival comple- → Det CN The cat bit ment VP(inf) INF VP infinitival NP → the dog S(comp) Comp S complement sentence → Cognitive Modeling: Language Processing – p.5 Cognitive Modeling: Language Processing – p.6 Competence vs. Performance Ambiguity The HPSM has to deal with the fact that many sentences are Competence: the linguistic knowledge that a speaker has; ambiguous, i.e., have more than one reading. formalized, e.g., using phrase structure rules. Some famous examples: Performance: the application of the linguistic knowledge in comprehending and producing language. (1) a. The horse raced past the barn fell. b. Since Jay jogs a mile seems a small distance to him. Competence is idealized, while performance is subject to c. Teachers taught by the Berlitz methods passed the cognitive constraints (e.g., memory limitations, fatigue). test. Psycholinguistics deals with performance (competence is the d. The officer told the criminal that he was arresting her domain of linguistic theory). husband. We will focus on the Human Sentence Processing Mechanism The HPSM is led up the garden path, i.e., it does not compute (HPSM), i.e., the cognitive device that assigns a syntactic the correct (grammatical) reading of these sentences (at least structure to a string of words. initially). Cognitive Modeling: Language Processing – p.7 Cognitive Modeling: Language Processing – p.8

  3. Dimensions of Parsing Dimensions of Parsing A number of properties are important when designing a model Parallelism: a serial parser maintains only one structure at a of the HPSM: time; a parallel parser pursues several (or all) possible structures. Incrementality: the parser can be incremental (process a word Controversial issue; evidence for both serialism and limited at a time), or non-incremental (process whole sentences). parallelism. Good evidence that the HPSM is incremental. Interactivity: the parser can be encapsulated (only has access Directionality: the parser can process sentence bottom-up to syntactic information) or interactive (has access to semantic (from the words up) or top-down (from the phrase markers information and context). down). Evidence for limited interactivity. Evidence that the HPSM combines both strategies. Cognitive Modeling: Language Processing – p.9 Cognitive Modeling: Language Processing – p.10 An Incremental Input Module A Bottom-Up Parallel Parser We first need to create an input module that presents one The parser constructs a Chart, a compact representation of all stimulus word at a time: the analyses of a sentence. Rule 1: Select a sentence to parse for the Stimuli buffer: Goal: find an S edge that spans the whole sentence. Example: IF the current cycle is 1 The kittens bite the dog once WordList is in Stimuli THEN delete WordList from Stimuli det cn tv det cn add words(WordList) to Current Stimulus np np Rule 2: When quiescent, feed one more word to the subject: TRIGGER system_quiescent vp IF words([Head|Tail]) is in Current Stimulus THEN delete words([Head|Tail]) from Current Stimulus add words(Tail) to Current Stimulus send word(Head) to Subject:Input/Output s Cognitive Modeling: Language Processing – p.11 Cognitive Modeling: Language Processing – p.12

  4. A Bottom-Up Parallel Parser Chart, Lexicon, Grammar Rules Architecture of a simple parser that constructs the chart The chart edges are represented as predicates of the form: bottom-up: edge(LeftVertex,RightVertex,Content,Level) where LeftVertex and RightVertex are integer vertex labels, Content is the content of the edge (e.g., word(cat) ) and Level is formatting information (not discussed here). Examples for items in the lexicon: category(the,det) category(kittens,cn) Examples for grammar rules: rule(s,[np,vp]) rule(np,[pn]) Cognitive Modeling: Language Processing – p.13 Cognitive Modeling: Language Processing – p.14 Input/Output Process Elaborate Chart Process Rule 1: Add a word to the first position of the chart: Rule 1: Lexical look-up: TRIGGER word(W) IF edge(N0,N1,word(W),L1) is in Chart IF not edge(_,_,_,_) is in Chart category(W,C) is in Lexicon THEN add edge(0,1,word(W),0) to Chart L is L1 + 1 THEN add edge(N0,N1,cat(C),L) to Chart Rule 2: Add a word to the next position of the chart: Rule 2: Apply unary grammar rules: TRIGGER word(W) IF edge(N0,N1,word(W1),Y) is in Chart IF edge(N0,N1,cat(C1),L1) is in Chart not edge(N1,N2,word(W2),Y) is in Chart rule(C,[C1]) is in Grammar Rules L is L1 + 1 N2 is N1 + 1 THEN add edge(N1,N2,word(W),Y) to Chart THEN add edge(N0,N1,cat(C),L) to Chart Cognitive Modeling: Language Processing – p.15 Cognitive Modeling: Language Processing – p.16

  5. Elaborate Chart Process Properties of the Model Simple, but complete chart parser with the following properties: Rule 3: Apply binary grammar rules: � bottom-up: parsing is driven by the addition of words to IF edge(N0,N1,cat(C1),L1) is in Chart the chart; chart is expended upwards from lexical to edge(N1,N2,cat(C2),L2) is in Chart phrasal categories; rule(C,[C1,C2]) is in Grammar Rules L is max(L1,L2) + 1 � limited incrementality: when a new word appears, all THEN add edge(N0,N2,cat(C),L) to Chart possible edges are added to the chart; then the system quiesces and waits for the next word; Similar rules for grammar rules with more than two categories. � parallelism: all chart edges are added at the same time (default Cogent behavior); multiple analyses (ambiguities) are pursued. Note: this model only determines if a string is grammatical (licensed by the grammar); it does not build syntactic structures. Cognitive Modeling: Language Processing – p.17 Cognitive Modeling: Language Processing – p.18 Left Corner Parsing Example of a Left Corner Chart The kittens bite the dog The bottom-up model is incremental only in a limited sense (each word is processed as it appears). det cn tv det cn Cognitively plausible incrementality: each word is integrated np/cn vp/np np/cn into the structure as it appears (no unconnected words). This can be achieved using left corner parsing. The chart of a np left-corner parser contains active edges that represent incomplete constituents. s/vp Example: NP/CN is a constituent that lacks a CN in order to s/np become an NP . Introduction of active edges: for a passive edge Y and a grammar rule X → Y Z , introduce the active edge X / Z into the s/cn chart, where Y and X / Z span the same part of the string. s Cognitive Modeling: Language Processing – p.19 Cognitive Modeling: Language Processing – p.20

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend