Presentation on theme: "FSG, RegEx, and CFG Chapter 2 Of Sag’s Syntactic Theory."— Presentation transcript:
FSG, RegEx, and CFG Chapter 2 Of Sag’s Syntactic Theory
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
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)
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
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)
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
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.
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
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.