Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 4.

Similar presentations


Presentation on theme: "1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 4."— Presentation transcript:

1 1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 4

2 2 What’s the plan for today? Practice on top-down parsing (on board) Practice on bottom-up chart parsing Chomsky’s hierarchy On-line processing of syntactic ambiguity in adults and children (psycholinguistic studies)

3 3 Review of parsing strategies Top-down –A top down parser starts with S and attempts to rewrite it into a sequence of terminal symbols that matches the words in the input sentence Bottom-up –You take a sequence of symbols and match it to the right hand side of the rule, i.e. start with Det N and match it to get the NP Bottom-up chart parsing –To avoid unnecessary repetition of the matching process you use a data structure called chart that allows you to record partial results We’ll see examples in J. Allen’s Natural Language Understanding, Chapter 3

4 4 Exercise Write the phrase structure rules that are needed to parse the sentences: –The boy arrived in the morning. –My sister gave me a wonderful gift. –He wrote the letter quickly. –The teacher put the book on the shelf. Simulate a top-down parse for each of the sentences above. Simulate a bottom-up chart parse for each of the sentences above.

5 5 What makes a good grammar? Generality –The range of sentences covered by the rules Selectivity –The range of sentences that can be identified as ungrammatical Understandability –How simple the grammar is

6 6 Hint for making rules general Pay attention to constituents Diagnostic of constituency –Conjunction Compare –I ate a hamburger and a hot dog –I will eat the hamburger and throw away the hot dog –I ate a hamburger and John ate a hot dog –*I ate a hamburger and on the stove –*I ate a cold hot dog and well burned –*I ate the hot dog

7 7 How the conjunction test can help Compare –I looked up John’s number –I looked up John’s chimney –*I looked up John’s number and in his cupboards –I looked up John’s chimney and in his cupboards

8 8 What is generative capacity? The range of languages that a formalism can describe Formal languages allow a precise (mathematic) characterization Natural languages CANNOT be characterized precisely enough to define generative capacity

9 9 Chomsky’s Hierarchy Containment hierarchy of classes of formal grammars that generate formal languages Type 0: unrestricted, include all formal grammars –Any string of terminals and non-terminals to any string of terminals and non-terminals Type 1: context sensitive –A  any string of terminals and non-terminals –e.g., aAb  aCb Type 2: context free (the theoretical basis for the syntax of most programming languages) –A  a, A  Ba, A  aBb –You can count up to elements (any n of a’s followed by any n of b’s, BUT NOT any n of a’s followed by any n of b’s followed by any n of c’s) Type 3: regular grammars –A  a, A  aB –You can’t count

10 10 Processing ambiguity How do humans (adults and children) process syntactic ambiguity?

11 11 Trueswell et al 1999 “The kindergarten-path effect: Studying on line sentence processing in young children”, in Cognition (1999)

12 12 The garden-path theory At points of syntactic ambiguity the syntactically simplest alternative is chosen: e.g. minimal attachment (e.g., Frazier and Rayner 1982, Ferreira and Clifton 1986) However, it has been shown that non-syntactic sources of information can mediate garden-path effects (e.g., Altmann and Steedman 1988, Tanenhaus et al 1995)

13 13 Referential principle Example: if two thieves are evoked in the context and then we hear Ann hit the thief with… we prefer the NP-attachment reading (Crain & Steedman 1985)

14 14 Experiment 1 Methodology: eye-tracking Participants: 16 5-year-old children Material: –Put the frog on the napkin in the box (ambiguous between DESTINATION and MODIFIER) –Put the frog that’s on the napkin in the box (unambiguous)

15 15 Head mounted eye tracker

16 16 1 and 2 referent context

17 17 Unambiguous

18 18 Analysis Percentage of trials with eye-fixation to INCORRECT DESTINATION (I.e. the empty napkin)

19 19

20 20 Results VP-attachment preference for children: 5-year olds prefer to interpret the ambiguous ‘on the napkin’ as destination regardless of referential context Children are insensitive to the “Referential Principle” They don’t ‘recover’ from initial interpretation In the 2-referent ambiguous condition they picked the Target animal at chance

21 21 Experiment 2 Participants: 12 adults Same material Same methodology

22 22

23 23 Results Adults experienced garden path in the 1- referent ambiguous condition only

24 24

25 25 Conclusions Adults and children differ in how they handle temporary syntactic ambiguity –Adults resolve ambiguity according to the Referential Principle: modifier in 2-referent context, destination in 1-referent context –Children are insensitive to the Referential Principle: They resolve the ambiguity to the VP-attachment interpretation, i.e., destination

26 26 Explanation of VP-attachment preference in children Minimal attachment? Lexical frequency?


Download ppt "1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 4."

Similar presentations


Ads by Google