PLT: Lecture 7 - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

PLT: Lecture 7

Description:

A Post Production System for Phrases. If we have: D={some, a the} A={big, black} ... (Zero or one article at the start) (Zero or more adjectives) Solution 1: Recursion ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 13
Provided by: deptSc7
Category:
Tags: plt | adjective | lecture | use

less

Transcript and Presenter's Notes

Title: PLT: Lecture 7


1
PLT Lecture 7
  • Chomsky

2
Strings with Well-Formed Parenthesis
  • Use Posts production rules to specify the
    generation of strings with well formed
    parenthesis
  • WFP.L(,)
  • WFP.VS, T,
  • WFP.Axioms( )
  • WFP.RulesS-gt(S), S-gtSS, S( )T-gtST

3
Chomskys Adaptation
  • Post
  • E.literals1
  • E.VariablesS
  • E.Axioms11
  • E.ProductionsS-gtS11
  • Chomsky
  • E.Terminals1
  • E.Non TerminalsS
  • E.ProductionsS-gt11, S-gtS11
  • Rewrite
  • WFP(,), S,T, ( ), S-gt(S), S-gtSS,
    S( )T-gtST
  • Pa,b,c, S, a,b,c,aa,bb,cc, S-gtaSa,
    S-gtbSb, S-gtcSc

4
Chomskys thoughts
  • Words classified into grammatical categories
    nouns verbs etc
  • Can generate structurally well formed sentences
    from
  • Template of grammatical categories
  • Article noun verb article noun .
  • Substitution
  • The cat chased the mouse .
  • The man hit the dog .
  • A student passed the exam .

5
A Post Production System for Phrases
  • If we have
  • Dsome, a the
  • Abig, black
  • Ncat, rat, hat, mat
  • Then
  • Phrase.Tsome, a, the, big, black, cat, rat,
    hat, mat
  • Phrase.NTD, A, N
  • Phrase.Production
  • D-gtsome, D-gta, D-gtthe
  • A-gtbig, A-gtblack
  • N-gtcat, N-gtrat, N-gthat, N-gtmat
  • P-gtDAN

6
Sentences
  • Examples
  • the cat sat on the mat
  • the cat on the mat sat (shakespearean)
  • on the mat sat the cat (Dr Zeuss)
  • on the mat the cat sat (unusual, but could be
    response to Dr Zeuss question)
  • sat the cat on the mat? ( fairly shakespearean)
  • sat on the mat the cat? (even more strange than
    Dr. Zeuss)

7
Write the production rules
  • That allow
  • The big cat
  • The big black cat
  • The big black friendly cat
  • (One or more adjectives)
  • That allow
  • Big cat
  • The cat
  • The big black friendly cat
  • (Zero or one article at the start)
  • (Zero or more adjectives)

8
Solution 1 Recursion
  • So how do we cope with (1M adjectives) strings
    like
  • The black cat
  • The big black cat
  • The big black friendly cat
  • Heres how
  • D-gtsome, D-gta, D-gtthe
  • A-gtbig, A-gtblack, A-gtfriendly
  • N-gtcat, N-gtrat, N-gthat, N-gtmat
  • P-gtDQN
  • Q-gtAQ
  • Q-gtA

9
Solution 2 Tweaking Solution 1
  • So how do we cope with (1M adjectives) strings
    like
  • The cat
  • The big black cat
  • The big black helpful cat
  • Big cat
  • Heres how
  • D-gtsome, D-gta, D-gtthe
  • A-gtbig, A-gtblack, A-gthelpful
  • N-gtcat, N-gtrat, N-gthat, N-gtmat
  • P-gtDQ
  • Q-gtAQ
  • Q-gtA
  • Q-gtN

10
Solution 2
  • So how do we cope with (1M adjectives) strings
    like
  • The cat
  • The big black cat
  • The big black helpful cat
  • Big cat
  • Heres how
  • D-gtsome, D-gta, D-gtthe
  • A-gtbig, A-gtblack, A-gthelpful
  • N-gtcat, N-gtrat, N-gthat, N-gtmat
  • P-gtDQ
  • P-gtQ
  • Q-gtAQ
  • Q-gtA
  • Q-gtN

11
Overall Structure
  • Instances
  • The cat chased the big rat
  • The big dog hit the helpful frog
  • frog caught a big black helpful cat
  • Productions
  • D-gtsome, D-gta, D-gtthe
  • A-gtbig, A-gtblack, A-gthelpful
  • N-gtcat, N-gtrat, N-gtdog, N-gtfrog
  • V-gt hit, V-gtchased, V-gtcaught
  • P-gtDQ
  • P-gtQ
  • Q-gtAQ
  • Q-gtA
  • Q-gtN
  • S-gt PVP

12
Phase Structure, Generative Grammars
  • 4-tuple VT, VN, P, S
  • VT
  • VN
  • VN U VT
  • P binary relations called productions or re-write
    rules
  • Domain V x VN X V
  • Codomain V
  • Eventually some rules of type
  • Domain -gt VT
  • S element of VN
Write a Comment
User Comments (0)
About PowerShow.com