1 / 10

FSG, RegEx, and CFG

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)

joelle
Télécharger la présentation

FSG, RegEx, and CFG

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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 eatsbreakfast 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 VPVP -> V (NP) (NP) VP -> VP PPPP -> P NP NP -> (D) NOMNOM -> NNOM -> NOM PPX -> 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 wasa man in green suitthat he saw. • Substitution • I can’t function without a good cup of coffee.I can’t function without it.

  9. 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 Problems?

  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.

More Related