61A-037-Conclusion_6..

What is Computer Science?
61A Lecture 37
Friday, December 2
Systems
Computer Vision
Artificial Intelligence
Planning
Graphics
Robotics
Security
Natural Language Processing
Networking
...
Programming Languages
...
2
Machine Translation
The Syntactic Structure of Natural Language
Parallel corpus gives translation examples
Target language corpus gives examples of well-formed sentences
I will get to it later
See you later
S
S
NP
He will do it
VP
MD
Parallel corpus gives translation examples
NP
PRP
VP
VP
MD
VB PRP ADV
PRP
VP
VB ADV
I will do it gladly
You will see later
I will do it gladly
You will see later
Yo lo haré de muy buen grado
Después lo veras
Yo lo haré de muy buen grado
Después lo veras
Machine translation system:
Source language
Yo lo haré después
NOVEL SENTENCE
Machine translation system:
Model of
translation
S
S
Target language
ADV
I will do it later
Model of
translation
Yo lo haré después
ADV
I will do it later
3
A Translation System in 20 Minutes
4
A Context-Free Grammar Describes Generation
"Grammar"
Context-free grammars as a model of language generation
S
S -> NP VP
Large-scale linguistic annotations
NP -> PRP!NP
Tree transformations
English
NP
Yoda-speak
VP
PRP
VB
I
know
Grammar
refinement
VP -> VB
VP -> VB PRP!VP
PRP !VP
"Lexicon"
Help you, I can!
Yes! Mm!
you
PRP!NP
PRP -> I
PRP -> you
VB -> know
When 900 years old you reach,
look as good, you will not. Hm.
VB -> help
PRP!VP -> me
5
6
A Context-Free Grammar Describes Generation
Left-Corner Parsing Builds Trees For Sentences
parse_next(S, 1)
"Grammar"
S
S -> NP VP
complete(S, (NP (PRP i)), 1)
NP -> PRP
NP
complete(VP, (VB know), 2)
VP -> VB PRP
PRP
VP
MD
complete(VP, (VP (VB know)), 2)
VP -> MD VP
complete(S, (S ...), 1)
"Lexicon"
I
can
VB
VB -> help
A grammar can be learned from data (demo)
MD -> can
7
Left-Corner Parsing Builds Trees For Sentences
parse_next(S, 1)
"Grammar"
complete(S, (PRP i), 1)
S -> NP VP
complete(S, (NP (PRP i)), 1)
NP -> PRP
parse_next(VP, 2)
VP -> VB
complete(VP, (VB know), 2)
complete(VP, (VP (VB know) (PRP you)), 2)
complete(S, (S ...), 1)
VP -> VB PRP
Left corners
S
"Lexicon"
NP
VP
PRP -> I
PRP
VB
PRP
i
know
you
Left corners
NP
VP
PRP
VB
i
know
PRP -> I
VB -> know
you
VP -> VB PRP
"Lexicon"
PRP -> you
help
VP -> VB
S
PRP -> I
PRP
S -> NP VP
NP -> PRP
parse_next(VP, 2)
VP -> VB
VP
"Grammar"
complete(S, (PRP i), 1)
PRP -> you
VB -> know
VB -> help
9
PRP -> you
VB -> know
you
VB -> help
8