Parse Your Heart Out - PowerPoint PPT Presentation

About This Presentation
Title:

Parse Your Heart Out

Description:

Striving to put the 'gold' back in Rheingold, the top executives ... Avast ye scurvy dogs, throw the syntax overboard. Lecture 7-1. CS251: Intro to AI/Lisp II ... – PowerPoint PPT presentation

Number of Views:119
Avg rating:3.0/5.0
Slides: 33
Provided by: kurtdfenst
Category:
Tags: avast | heart | out | parse

less

Transcript and Presenter's Notes

Title: Parse Your Heart Out


1
Parse Your Heart Out
  • May 11th, 1999

2
Announcements
  • Assignment 4 today
  • Matlab manuals
  • Project rough drafts

3
A Translation Experiment
4
Rheingold Tries to Revive Brand by Marketing a
'Manly' Beer
Striving to put the "gold" back in Rheingold, the
top executives in charge of reviving the
venerable New York beer brand are revamping their
marketing efforts with an overhaul that includes
a new agency. Rheingold Brewing Co. has hired
DeVito/Verdi in New York, an agency known for
sharply humorous creative work for advertisers
like New York magazine and Office Depot.
DeVito/Verdi succeeds Ferrell Calvillo
Communications in New York, which handled the
account during the brand's initial reintroduction
last year. Along with the agency change comes a
Web site, www.rheingoldbeer.com, created by
Compelling Content, an Internet agency in New
York, and an increased focus on male beer
drinkers ages 21 to 34. As a result, the ads in
year two assume a jocular, hypermasculine tone to
promote Rheingold as the brew "for the few real
men still left."
NY Times, 5/11/99
5
Bemühend, das " Gold ", das in Rheingold
einzusetzen rückseitig ist, revamping die oberen
Leitprogramme verantwortlich für das Wieder
beleben der venerable New Yorkbiermarke ihre
Marketing-Bemühungen mit einer Überholung, die
eine neue Agentur umfaßt. Rheingold, das Co.
braut, hat DeVito/Verdi in New York, eine Agentur
angestellt, die für scharf humorvolle kreative
Arbeit für Inserenten wie New Yorkzeitschrift und
Bürodepot bekannt ist. DeVito/Verdi folgt
Kommunikationen Ferrell Calvillo mit New York,
das das Konto während der Ausgangswiedereinführung
der Marke letztes Jahr anfaßte. Zusammen mit
Agentur kommt die Änderung eine Web site,
www.rheingoldbeer.com, erstellt, indem sie
Inhalt, eine Internet-zwingt, Agentur in New York
und ein erhöhter Fokus auf männlichem
Biertrinkeralter 21 bis 34. Infolgedessen nehmen
das ADS in Jahr zwei jocular, hypermasculineton
an, um Rheingold als brauen " für die wenigen
wirklichen Männer noch zu fördern nach links. "
6
Endeavoring, revamping the upper guidance
programs responsible for the again the venerable
new Yorkbiermarke their marketing efforts with an
overhaul, which covers a new agency, animate the
" gold ", which is backlateral in Rhine gold to
begin. Rhine gold, which brews CO, employed
DeVito/Verdi in New York, an agency, which admits
for sharply humorous creative work for
advertisers like new Yorkzeitschrift and office
depot is. DeVito/Verdi follows communications
Ferrell Calvillo with New York, which touched the
account during the output re-establishment of the
label last year. Together with agency the
modification a web site, www.rheingoldbeer.com,
comes created, by Internet-forcing contents of,
one, agency into New York and a increased focus
on male beer drunkard age 21 to 34. Consequently
the ADS assumes in year two jocular,
hypermasculineton, around Rhine gold as brews "
for the few real men to promote after still left
", the makeover for the label -- formally dry
7
Striving to put the "gold" back in Rheingold, the
top executives in charge of reviving the
venerable New York beer brand are revamping their
marketing efforts with an overhaul that includes
a new agency. Rheingold Brewing Co. has hired
DeVito/Verdi in New York, an agency known for
sharply humorous creative work for advertisers
like New York magazine and Office Depot.
DeVito/Verdi succeeds Ferrell Calvillo
Communications in New York, which handled the
account during the brand's initial reintroduction
last year.
Endeavoring, revamping the upper guidance
programs responsible for the again the venerable
new Yorkbiermarke their marketing efforts with an
overhaul, which covers a new agency, animate the
" gold ", which is backlateral in Rhine gold to
begin. Rhine gold, which brews CO, employed
DeVito/Verdi in New York, an agency, which admits
for sharply humorous creative work for
advertisers like new Yorkzeitschrift and office
depot is. DeVito/Verdi follows communications
Ferrell Calvillo with New York, which touched the
account during the output re-establishment of the
label last year.
NY Times, 5/11/99
8
Along with the agency change comes a Web site,
www.rheingoldbeer.com, created by Compelling
Content, an Internet agency in New York, and an
increased focus on male beer drinkers ages 21 to
34. As a result, the ads in year two assume a
jocular, hypermasculine tone to promote Rheingold
as the brew "for the few real men still left."
Together with agency the modification a web site,
www.rheingoldbeer.com, comes created, by
Internet-forcing contents of, one, agency into
New York and a increased focus on male beer
drunkard age 21 to 34. Consequently the ADS
assumes in year two jocular, hypermasculineton,
around Rhine gold as brews " for the few real men
to promote after still left ", the makeover for
the label -- formally dry
NY Times, 5/11/99
9
Endeavoring, revamping the upper guidance
programs responsible for the again the venerable
new Yorkbiermarke their marketing efforts with an
overhaul, which covers a new agency, animate the
" gold ", which is backlateral in Rhine gold to
begin. Rhine gold, which brews CO, employed
DeVito/Verdi in New York, an agency, which admits
for sharply humorous creative work for
advertisers like new Yorkzeitschrift and office
depot is. DeVito/Verdi follows communications
Ferrell Calvillo with New York, which touched the
account during the output re-establishment of the
label last year. Together with agency the
modification a web site, www.rheingoldbeer.com,
comes created, by Internet-forcing contents of,
one, agency into New York and a increased focus
on male beer drunkard age 21 to 34. Consequently
the ADS assumes in year two jocular,
hypermasculineton, around Rhine gold as brews "
for the few real men to promote after still left
", the makeover for the label -- formally dry
10
A Little Vocab
  • Formal language is a set of strings
  • A string is a set of terminal symbols
  • Phrase structure Strings have structure
  • S, NP, VP
  • In CFG (BNF), rewrite rules consist of a single
    nonterminal symbol on the left-hand side

11
For Example
  • S NP VP S Conjunction S
  • NP Pronoun Noun Art Noun
  • NP PP NP RelClause
  • VP Verb NP VP VP Adjective
  • VP PP VP Adverb
  • PP Preposition NP
  • RelClause that VP

12
The Lexicon
  • Noun stench breeze glitter pit gold
  • nothing wumpus pits
  • Verb is see smell
  • Adjective
  • Adverb

13
More Terms
  • Lexicon The terms in the vocabulary
  • Categories/parts of speech
  • Noun, verb, adjective, adverb
  • Article, preposition, conjunction, pronoun

14
Whats Wrong with the Grammar Weve Got?
  • Overgeneration

15
Grammars, Grammars, Everywhere
  • Chomsky again Transformational grammar maps from
    surface structure to deep structure
  • ATN grammars Rules are represented in a directed
    graph
  • Put it in the lexicon
  • Lexical functional grammar
  • Categorial grammar

16
Semantic Grammars
  • Avast ye scurvy dogs, throw the syntax overboard

17
Parsing for Fun Profit
18
Parsing from the Top-Down
  • Start with S, and expand from there
  • State of the parse
  • Symbol list is a list of symbols that have
    resulted from the set of operations applied so
    far
  • Use a lexicon
  • cried V
  • dogs N, V
  • the ART

19
Revised State
  • State of parse is now a pair
  • Symbol list
  • Position in sentence
  • 1 The 2 cats 3 howled 4

20
A Top-Down Parser
  • Possibilities list List of possible states
  • Current state is the car
  • Backup states are the cdr
  • (((N) 2) ((NAME) 1) ((ADJ N) 1))

21
Top-Down Algorithm
  • Start with initial state ((S) 1) and no backup
    states

1) Select current state, say C, with
car(Possibilities), if C is nil, fail 2) If C is
an empty symbol list and word position is at end,
succeed, else Generate next possible states a)
If first symbol on Cs symbol list is a lexical
symbol and next word in sentence can be that
class then create a new state by removing first
symbol and update word position, add it to the
possibilities list b) Not a lexical symbol, then
generate a new state for each applicable rule in
the grammar and add them all to the possibilities
list
22
Parsing is Search
  • Initial state
  • Operators
  • Goal
  • States
  • Path cost?

23
Depth-first Breadth-first
  • Depth-first
  • Left recursive rules
  • Breadth-first

24
Bottom-up Parsing
  • Group strings and match them to rules
  • State would be a symbol list
  • Start with all the words in the sentence
  • Successor states
  • Rewrite a word with lexical categories
  • Replace RHS sequence by its LHS symbol

25
Bottom-up Trouble
Have the students in Section 1 of CS 251 take a
pop midterm.
Have the students in Section 1 of CS 251 taken a
pop midterm?
26
Keep a Chart
  • Chart is just a data structure
  • Track matches in terms of keys
  • Look for rules that either start with a key, or
  • Earlier rules that need the key in the current
    position
  • Whats on the chart?
  • All constituents derived from the sentence so far
    in the parse
  • Partial matches Active arcs

27
Chart Parsing
  • Combine an active ac with a completed constituent
  • Agenda is a list of newly completed constituents

28
Chart-Parse
(defun chart-parse (words optional (grammar
grammar)) "See if the string of words can be
parsed by the grammar." (let ((chart
(make-chart ends-at (make-array ( 1
(length words)) initial-element nil))))
(add-edge (edge 0 0 'S nil (list
(grammar-start-symbol grammar))) chart
'initializer) (for v 0 to (- (length words)
1) do (scanner v (elt words v) chart))
chart))
29
Scanner
(defun scanner (j word chart) "Add edges
everywhere WORD is expected." (for each cat in
(categories-for word grammar) do (dprint
"scanner" cat (elt (chart-ends-at chart) j))
(when (member cat (elt (chart-ends-at chart)
j) test 'unify key 'edge-expects)
(add-edge (edge j ( j 1) cat (list word)
nil) chart 'scanner))))
30
Predictor
(defun predictor (edge chart) "Add edges saying
what we expect to see here." (for each rule in
(rewrites-for (op (edge-expects edge))
grammar) do (add-edge (edge
(edge-end edge) (edge-end edge)
(rule-lhs rule) nil
(rule-rhs rule)) chart
'predictor)))
31
Completer
(defun completer (edge chart) "Use this edge to
extend any edges in the chart." (for each
old-edge in (elt (chart-ends-at chart)
(edge-start edge)) do (let ((b
(unify (edge-lhs edge) (edge-expects old-edge)
(edge-bindings old-edge)))) (when b
(add-edge (edge (edge-start old-edge) (edge-end
edge) (edge-lhs old-edge) (cons edge
(edge-found old-edge)) (rest (edge-remains
old-edge)) b) chart 'completer)))))
32
Add-Edge
(defun add-edge (edge chart optional reason)
"Put edge into chart, and complete or predict as
appropriate." (unless (member edge (elt
(chart-ends-at chart) (edge-end edge)) test
'edge-equal) (when (handle-augmentation
grammar edge) (push edge (elt (chart-ends-at
chart) (edge-end edge))) (dprint reason edge)
debugging output (as in Figure 23.4, p
700) (if (complete? edge) (completer edge
chart) (predictor edge chart)))))
Write a Comment
User Comments (0)
About PowerShow.com