Presentation is loading. Please wait.

Presentation is loading. Please wait.

FSG, RegEx, and CFG Chapter 2 Of Sag’s Syntactic Theory.

Similar presentations


Presentation on theme: "FSG, RegEx, and CFG Chapter 2 Of Sag’s Syntactic Theory."— Presentation transcript:

1 FSG, RegEx, and CFG Chapter 2 Of Sag’s Syntactic Theory

2 Regular Expressions Attempts to capture the generalizations and observable patterns in a language e.g. words such as apple, book, color, and dog can appear in roughly same contexts (pg 23 ex 13) Makes use of grammatical categories and notations such as Kleene Star (*) to express or describe a string of well-formed sentences. Other notations include: (), |, +… etc

3 Regular Expressions “Jena likes sandwiches.” –Lexicon: noun {Jena, sandwiches}; verb {likes} –Notation: NOUN VERB NOUN “Jena likes bagel sandwiches.” –noun {Jena, sandwiches}; verb {likes}; adj {bagel} –NOUN VERB ADJ* NOUN “Jena buys bagel sandwiches.” –noun {Jena, sandwiches}; verb {likes,buys}; adj {bagel} –NOUN VERB ADJ* NOUN “Jena eats breakfast bagel sandwiches.” –noun {Jena, sandwiches}; verb {likes,buys,eats}; adj {bagel, breakfast} –NOUN VERB ADJ* NOUN

4 Problems? “Jena feels full.” –NOUN VERB (ADJ* NOUN) | ADJ “She thinks she ate too much.” –NOUN VERB (ADJ* NOUN) | (ADJ) | … “Her friends agree.” “Jena swears to herself never to eat too much again.” “Her wise friends don’t believe her.” -Fails to account for possible options in the “slots” -Fails to recognize certain strings form units -Fails to represent ambiguities such as “I saw the astronomer with a telescope.” (pg 28)

5 Context Free Grammar Components –LEXICON: list of words, with the associated categories –Set of RULES that look like A ->  Like algebraic equations … –NT1 -> T1 NT2 –NT2 -> T2 Recursive: –NT -> (T1) T2 NT

6 Context Free Grammar Rules: S -> NP VP VP -> V (NP) (NP) VP -> VP PP PP -> P NP NP -> (D) NOM NOM -> N NOM -> NOM PP X -> X+ CONJ X (p31) (coordination rule)

7 Constituents How the constituents are divided and where they are attached can account for ambiguity in ambiguous sentences. Strings joined by coordinate conjunction are probably constituents Strings that can appear in multiple environments are probably constituents

8 Constituency Tests Fronting –They drink tea in the morning. In the morning, they drink tea. Cleft –He saw a man in green suit. It was a man in green suit that he saw. Substitution –I can’t function without a good cup of coffee. I can’t function without it.

9 Problems? Redundant –Overgenerates The teacher handed the student a book *The teacher handed the student. *The teacher handed a book. *The teacher handed. –Too recursive? S -> NP VP; VP -> VP PP X -> X+ CONJ X Arbitrary - no headedness

10 In FSG/RegEx and CFG He is an overly generous, kind, sweet man. They are stupid and ugly and nobody likes them. The big brown dog with fleas watched the bird beside the hunter. Take either the stairs to your left or elevator to your right.


Download ppt "FSG, RegEx, and CFG Chapter 2 Of Sag’s Syntactic Theory."

Similar presentations


Ads by Google