DOC PREVIEW
Berkeley COMPSCI 182 - Intro to Grammar

This preview shows page 1-2-15-16-17-32-33 out of 33 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 33 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

What is a grammar?What is an utterance?Grammar is relational knowledgeEmbodied SemanticsSyntax in one slideFormal grammars!Parsing a sentenceFormal theories of grammarContext free grammarsEnglish lexicon fragmentEnglish grammar fragmentAn example parseCFG pros and consCFG pros and consGenerated sentencesContext free assumptionUpdating the lexiconUpdating the syntactic rulesUnification grammarComplex feature structuresFeature structure unificationUnification successUnification failureWhat are we missing?Construction grammarExample ConstructionsECG overviewEmbodied schemas in ECGActionsAn emph {Into} constructionAn emph {ActiveSelfMotion} constructionWhat's neural about all this?Intro to Grammar(from an NTL Perspective)John BryantInternational Computer Science InstituteUC BerkeleyIntro to Grammar – p.1/33What is a grammar?•Grammar is the system of a language... It’s important to think of grammar assomething that can help you, like a friend.•Grammar tells the users of a language what choices are possible for the word order ofany sentence to allow that sentence to be clear and sensible - that is, to beunambiguous.•..."prescriptive grammar," a set of "rules" governing the choice of who and whom, theuse of ain’t, and other such matters. Promoted by Jonathan Swift and other literaryfigures of the 18th century, this approach to language prescribes the "correct" way touse language.•..."descriptive grammar," which is the study of the ways humans usesystems–particularly syntax and morphology–to communicatethrough language.•Therefore grammar acts as his tool to create meaning.From googleIntro to Grammar – p.2/33What is an utterance?•Form•Sound•Text•Sign and Gesture•And their order•Meaning•Who doing what to whom (usually more explicit)•Pragmatic (usually more implicit)•Context•Shared world state•Discourse•Ontological knowledgehow do all these pieces fit together?Intro to Grammar – p.3/33Grammar is relational knowledgeIntro to Grammar – p.4/33Embodied Semantics•Image schemas•Force dynamic schemas•Frames•MetaphorsAll these things are bound up and sent to simulation.Intro to Grammar – p.5/33Syntax in one slideForm relations within a sentence, not within a word.•Word order•Constituency (grouping and labeling)•Where constituents can appear•Grammatical relations (subj, obj)•Verb subcategorization•Agreement (number, person, case, gender)We play the game. Bill frisbee throws purple theYou am the best! They hits he.Bob gave Anne a book. Anne gave Bob a book.Tom walked into the cafe. Tom tumbled into the cafe the ball.I slept the ball into the basket. She sneezed the foam off the latte.This is the man I handed the book This is the book I handed the manIntro to Grammar – p.6/33Formal grammars!We can:•Compactly encode a possibly infinite set of sentences.•Generate a string (sentence) of the language•Parse (recognize) a string•Compare the sentences that two grammars cangenerate.•Implement stuff•Make clear, testable predictions about language1. S → b S2. S → bIntro to Grammar – p.7/33Parsing a sentence1. Take an input sentence and a grammar2. Process the sentence: Top down vs bottom up search3. Output a trace (parse tree)1. S → b S2. S → bIntro to Grammar – p.8/33Formal theories of grammar•Finite state grammar•Context free grammar•Transformational Grammar, Minimalism, X bar...•Unification grammar (GPSG, LFG, HPSG)•Construction grammar (CxG)•Embodied Construction Grammar (ECG)Different assumptions about language anddifferent processing complexity.Intro to Grammar – p.9/33Context free grammarsA CFG (PSG) is:•A set of terminals ⊂ Symbols•A set nonterminals ⊂ Symbols•A set of productions of the formNT → Symbol∗•A designated start symbolA tiny example CFG:•Terminals: {“(“ , “)”}•Nonterminals: {S}•Start symbol = S•Rules: {S → “(” S “)”; S → “(“ “)”; }Intro to Grammar – p.10/33English lexicon fragmentNoun → soul | pipe | fiddlers | bowlProperNoun → King ColePronoun → he | they | IVerb → was | called | plays | play | sleptAdjective → old | merry | threeArticle → a | theConjunction → andIntro to Grammar – p.11/33English grammar fragmentS → NP VP| S Conjunction SNP → Adjective ProperNoun| Possessive Adjective Noun| Article Adjective* Noun| PronounVP → Verb NP| Verb PPPP → Preposition NPIntro to Grammar – p.12/33An example parseIntro to Grammar – p.13/33CFG pros and consIntro to Grammar – p.14/33CFG pros and consPROS:•Simple•Fast•Pretty good with word order and constituencyCONS:•Hard to prevent overgeneration•No semantics•Too simple?Intro to Grammar – p.15/33Generated sentencesGoodies:•Old Kind Cole was a merry old soul•A merry old soul was he•He called for his pipe•He called for his bowl•He called for his three fiddlersBaddies:•The fiddlers plays for old King Cole•He slept the fiddlers•Old King Cole called for heIntro to Grammar – p.16/33Context free assumptionVerb → was | called | plays | play | slept how do we fix this?Intro to Grammar – p.17/33Updating the lexiconSgNoun → soul | pipe | bowlPlNoun → fiddlersSgProperNoun → King Cole3rdSgPronoun → he3rdPlPronoun → they3rdPlPronoun → ISgArticle → a | thePlArticle → the1stSgIntrans → sleep3rdSgIntrans → sleeps3rdPlIntrans → sleep1stSgTrans → play3rdSgTrans → plays3rdPlTrans → playIntro to Grammar – p.18/33Updating the syntactic rulesOriginal:NP → Adjective ProperNoun| Possessive Adjective Noun| Article Adjective* Noun| PronounUpdated:3rdSgNP → Adjective SgProperNoun| Possessive Adjective SgNoun| SgArticle Adjective* SgNoun| 3rdSgPronounelegant?Intro to Grammar – p.19/33Unification grammarPronoun → Inum = SGperson = 1I (type)num : sgperson : 1CFG rules are augmented with constraints andtheir instances are augmented with feature structures.Intro to Grammar – p.20/33Complex feature structuresNP → Article Nounself.agreement = Noun.agreementNoun.agreement = Article.agreementNPagreement :1Agreementnum : sgperson : 1Article :hagreement :1iNoun :hagreement :1iunification/coindexationIntro to Grammar – p.21/33Feature structure unificationA simple recursive algorithm that checks to see if twofeature structures are compatible.•Base case: if two atomic values are the same, then theyunify•Recursive case: if


View Full Document

Berkeley COMPSCI 182 - Intro to Grammar

Documents in this Course
Load more
Download Intro to Grammar
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Intro to Grammar and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Intro to Grammar 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?