uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "dotted...
TRANSCRIPT
![Page 1: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/1.jpg)
Bitext parsingWilker Aziz
3/5/17
![Page 2: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/2.jpg)
Context-Free GrammarsA CFG grammar G is denoted by
• a finite set of nonterminal symbols N
• a finite set of terminal symbols Σ with Σ ∩ N = ∅
• a finite set R of rules of the form X ➝ α where
• X ∈ N and α ∈ (Σ ∪ N)*
• S ∈ N a distinguished start symbol
Let ε denote an empty string
2
![Page 3: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/3.jpg)
Example CFGS ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
3
![Page 4: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/4.jpg)
Generative DeviceLeft-most derivation
• sequence of strings s1 ... sn
• s1 = S
• sn ∈ Σ*
• si≥2 derived from si-1 by picking the left-most nonterminal X
• replacing it by some α such that X ➝ α ∈ R
4
![Page 5: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/5.jpg)
Example of Derivation
5
Substitutions1 = S S ➝ NP VPs2 = NP VP NP ➝ DT NNs3 = DT NN VP DT ➝ thes4 = the NN VP NN ➝ mans5 = the man VP VP ➝ Vis6 = the man Vi Vi ➝ sleepss7 = the man sleepss7 = S ⇒* the man sleeps
![Page 6: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/6.jpg)
Example of Generation
6
![Page 7: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/7.jpg)
S
Example of Generation
6
![Page 8: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/8.jpg)
S
NP VP
Example of Generation
6
![Page 9: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/9.jpg)
S
NP VP
DT NN
Example of Generation
6
![Page 10: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/10.jpg)
S
NP VP
DT NN
the
Example of Generation
6
![Page 11: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/11.jpg)
S
NP VP
DT NN
the man
Example of Generation
6
![Page 12: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/12.jpg)
S
NP VP
DT NN
the man
Vi
Example of Generation
6
![Page 13: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/13.jpg)
S
NP VP
DT NN
the man
Vi
sleeps
Example of Generation
6
![Page 14: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/14.jpg)
Example of Recognition
7
![Page 15: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/15.jpg)
Example of Recognition
The man saw the dog
7
![Page 16: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/16.jpg)
Example of Recognition
The man saw the dog
DT
7
![Page 17: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/17.jpg)
Example of Recognition
The man saw the dog
DT NN
7
![Page 18: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/18.jpg)
Example of Recognition
The man saw the dog
DT NN
Vt
7
![Page 19: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/19.jpg)
Example of Recognition
The man saw the dog
DT NN
Vt
DT
7
![Page 20: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/20.jpg)
Example of Recognition
The man saw the dog
DT NN
Vt
DT NN
7
![Page 21: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/21.jpg)
Example of Recognition
The man saw the dog
DT NN
Vt
DT NN
NP
7
![Page 22: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/22.jpg)
Example of Recognition
The man saw the dog
DT NN
Vt
DT NN
NP
NP
7
![Page 23: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/23.jpg)
Example of Recognition
The man saw the dog
DT NN
Vt
DT NN
NP
NP
VP
7
![Page 24: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/24.jpg)
Example of Recognition
The man saw the dog
DT NN
Vt
DT NN
NP
NP
VP
S
7
![Page 25: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/25.jpg)
Language
A string s = s1 ... sn is generated/accepted by G if
S ⇒* s
⇒* denotes a sequence of rule applications
Language of G L(G) = {s: S ⇒* s} ⊆ Σ*
8
![Page 26: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/26.jpg)
Chomsky Normal Form
Every CFG is weakly equivalent to another such that
• X ➝ Y Z where X, Y, Z ∈ N
• X ➝ w where w ∈ Σ
• and possibly S ➝ ε
9
[Hopcroft and Ullman, 1979]
![Page 27: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/27.jpg)
Parsing as Deduction
10
![Page 28: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/28.jpg)
Parsing as DeductionDeductive process to prove claims about grammaticality
[Shieber et al., 1995]
10
![Page 29: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/29.jpg)
Parsing as DeductionDeductive process to prove claims about grammaticality
[Shieber et al., 1995]
• focus on strategy rather than implementation
10
![Page 30: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/30.jpg)
Parsing as DeductionDeductive process to prove claims about grammaticality
[Shieber et al., 1995]
• focus on strategy rather than implementation
• soundness/completeness easier to prove
10
![Page 31: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/31.jpg)
Parsing as DeductionDeductive process to prove claims about grammaticality
[Shieber et al., 1995]
• focus on strategy rather than implementation
• soundness/completeness easier to prove
• complexity determined by inspection
10
![Page 32: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/32.jpg)
Parsing as DeductionDeductive process to prove claims about grammaticality
[Shieber et al., 1995]
• focus on strategy rather than implementation
• soundness/completeness easier to prove
• complexity determined by inspection
• dynamic program follows directly
10
![Page 33: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/33.jpg)
Parsing as DeductionDeductive process to prove claims about grammaticality
[Shieber et al., 1995]
• focus on strategy rather than implementation
• soundness/completeness easier to prove
• complexity determined by inspection
• dynamic program follows directly
• generality
10
![Page 34: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/34.jpg)
Deductive systemsItem: a statement / intermediate sound result
• formula or schemata expressed with variables
Inference rule: statement derived from existing items
• where Ai and B are items
• Ai are called antecedents
• B is called consequent
A1 . . . Am
B(condition)
11
![Page 35: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/35.jpg)
Deductive programAxioms: trivial items
• do not depend on previous statements
Goal: states that a proof exists
Proof:
• start from axioms
• exhaustively deduce items
• never twice under the same premises
• accept if goal is proven
12
![Page 36: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/36.jpg)
Shift-Reduce ExampleInput: the man sleeps
13
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
![Page 37: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/37.jpg)
Shift-Reduce Example
Rule Condition Statement Queue
Input: the man sleeps
13
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
![Page 38: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/38.jpg)
Shift-Reduce Example
Rule Condition Statement QueueAxiom 1 [•,0] 1
Input: the man sleeps
13
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
![Page 39: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/39.jpg)
Shift-Reduce Example
Rule Condition Statement QueueAxiom 1 [•,0] 1
Input: the man sleeps
13
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
![Page 40: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/40.jpg)
Shift-Reduce Example
Rule Condition Statement QueueAxiom 1 [•,0] 1Shift: [1] 2 [the•,1] 2
Input: the man sleeps
13
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
![Page 41: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/41.jpg)
Shift-Reduce Example
Rule Condition Statement QueueAxiom 1 [•,0] 1Shift: [1] 2 [the•,1] 2
Input: the man sleeps
13
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
![Page 42: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/42.jpg)
Shift-Reduce Example
Rule Condition Statement QueueAxiom 1 [•,0] 1Shift: [1] 2 [the•,1] 2Reduce: [2] DT ➝ the 3 [DT•,1] 3
Input: the man sleeps
13
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
![Page 43: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/43.jpg)
Shift-Reduce Example
Rule Condition Statement QueueAxiom 1 [•,0] 1Shift: [1] 2 [the•,1] 2Reduce: [2] DT ➝ the 3 [DT•,1] 3
Input: the man sleeps
13
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
![Page 44: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/44.jpg)
Shift-Reduce Example
Rule Condition Statement QueueAxiom 1 [•,0] 1Shift: [1] 2 [the•,1] 2Reduce: [2] DT ➝ the 3 [DT•,1] 3Shift: [3] 4 [DT man •, 2] 4
Input: the man sleeps
13
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
![Page 45: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/45.jpg)
Shift-Reduce Example
Rule Condition Statement QueueAxiom 1 [•,0] 1Shift: [1] 2 [the•,1] 2Reduce: [2] DT ➝ the 3 [DT•,1] 3Shift: [3] 4 [DT man •, 2] 4
Input: the man sleeps
13
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
![Page 46: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/46.jpg)
Shift-Reduce Example
Rule Condition Statement QueueAxiom 1 [•,0] 1Shift: [1] 2 [the•,1] 2Reduce: [2] DT ➝ the 3 [DT•,1] 3Shift: [3] 4 [DT man •, 2] 4Reduce: [4] NN ➝ man 5 [DT NN •, 2] 5
Input: the man sleeps
13
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
![Page 47: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/47.jpg)
Shift-Reduce Example
Rule Condition Statement QueueAxiom 1 [•,0] 1Shift: [1] 2 [the•,1] 2Reduce: [2] DT ➝ the 3 [DT•,1] 3Shift: [3] 4 [DT man •, 2] 4Reduce: [4] NN ➝ man 5 [DT NN •, 2] 5
Input: the man sleeps
13
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
![Page 48: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/48.jpg)
Shift-Reduce Example
Rule Condition Statement QueueAxiom 1 [•,0] 1Shift: [1] 2 [the•,1] 2Reduce: [2] DT ➝ the 3 [DT•,1] 3Shift: [3] 4 [DT man •, 2] 4Reduce: [4] NN ➝ man 5 [DT NN •, 2] 5Reduce: [5] NP ➝ DT NN 6 [NP •, 2] 6
Input: the man sleeps
13
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
![Page 49: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/49.jpg)
Shift-Reduce Example
Rule Condition Statement QueueAxiom 1 [•,0] 1Shift: [1] 2 [the•,1] 2Reduce: [2] DT ➝ the 3 [DT•,1] 3Shift: [3] 4 [DT man •, 2] 4Reduce: [4] NN ➝ man 5 [DT NN •, 2] 5Reduce: [5] NP ➝ DT NN 6 [NP •, 2] 6
Input: the man sleeps
13
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
![Page 50: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/50.jpg)
Shift-Reduce Example
Rule Condition Statement QueueAxiom 1 [•,0] 1Shift: [1] 2 [the•,1] 2Reduce: [2] DT ➝ the 3 [DT•,1] 3Shift: [3] 4 [DT man •, 2] 4Reduce: [4] NN ➝ man 5 [DT NN •, 2] 5Reduce: [5] NP ➝ DT NN 6 [NP •, 2] 6Shift: [6] 7 [NP sleeps •, 3] 7
Input: the man sleeps
13
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
![Page 51: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/51.jpg)
Shift-Reduce Example
Rule Condition Statement QueueAxiom 1 [•,0] 1Shift: [1] 2 [the•,1] 2Reduce: [2] DT ➝ the 3 [DT•,1] 3Shift: [3] 4 [DT man •, 2] 4Reduce: [4] NN ➝ man 5 [DT NN •, 2] 5Reduce: [5] NP ➝ DT NN 6 [NP •, 2] 6Shift: [6] 7 [NP sleeps •, 3] 7
Input: the man sleeps
13
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
![Page 52: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/52.jpg)
Shift-Reduce Example
Rule Condition Statement QueueAxiom 1 [•,0] 1Shift: [1] 2 [the•,1] 2Reduce: [2] DT ➝ the 3 [DT•,1] 3Shift: [3] 4 [DT man •, 2] 4Reduce: [4] NN ➝ man 5 [DT NN •, 2] 5Reduce: [5] NP ➝ DT NN 6 [NP •, 2] 6Shift: [6] 7 [NP sleeps •, 3] 7Reduce: [7] Vi ➝ sleeps 8 [NP Vi •, 3] 8
Input: the man sleeps
13
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
![Page 53: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/53.jpg)
Shift-Reduce Example
Rule Condition Statement QueueAxiom 1 [•,0] 1Shift: [1] 2 [the•,1] 2Reduce: [2] DT ➝ the 3 [DT•,1] 3Shift: [3] 4 [DT man •, 2] 4Reduce: [4] NN ➝ man 5 [DT NN •, 2] 5Reduce: [5] NP ➝ DT NN 6 [NP •, 2] 6Shift: [6] 7 [NP sleeps •, 3] 7Reduce: [7] Vi ➝ sleeps 8 [NP Vi •, 3] 8
Input: the man sleeps
13
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
![Page 54: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/54.jpg)
Shift-Reduce Example
Rule Condition Statement QueueAxiom 1 [•,0] 1Shift: [1] 2 [the•,1] 2Reduce: [2] DT ➝ the 3 [DT•,1] 3Shift: [3] 4 [DT man •, 2] 4Reduce: [4] NN ➝ man 5 [DT NN •, 2] 5Reduce: [5] NP ➝ DT NN 6 [NP •, 2] 6Shift: [6] 7 [NP sleeps •, 3] 7Reduce: [7] Vi ➝ sleeps 8 [NP Vi •, 3] 8Reduce: [8] VP ➝ Vi 9 [NP VP •, 3] 9
Input: the man sleeps
13
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
![Page 55: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/55.jpg)
Shift-Reduce Example
Rule Condition Statement QueueAxiom 1 [•,0] 1Shift: [1] 2 [the•,1] 2Reduce: [2] DT ➝ the 3 [DT•,1] 3Shift: [3] 4 [DT man •, 2] 4Reduce: [4] NN ➝ man 5 [DT NN •, 2] 5Reduce: [5] NP ➝ DT NN 6 [NP •, 2] 6Shift: [6] 7 [NP sleeps •, 3] 7Reduce: [7] Vi ➝ sleeps 8 [NP Vi •, 3] 8Reduce: [8] VP ➝ Vi 9 [NP VP •, 3] 9
Input: the man sleeps
13
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
![Page 56: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/56.jpg)
Shift-Reduce Example
Rule Condition Statement QueueAxiom 1 [•,0] 1Shift: [1] 2 [the•,1] 2Reduce: [2] DT ➝ the 3 [DT•,1] 3Shift: [3] 4 [DT man •, 2] 4Reduce: [4] NN ➝ man 5 [DT NN •, 2] 5Reduce: [5] NP ➝ DT NN 6 [NP •, 2] 6Shift: [6] 7 [NP sleeps •, 3] 7Reduce: [7] Vi ➝ sleeps 8 [NP Vi •, 3] 8Reduce: [8] VP ➝ Vi 9 [NP VP •, 3] 9Reduce: [9] S ➝ NP VP 10 [S •, 3] 10
Input: the man sleeps
13
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
![Page 57: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/57.jpg)
Shift-Reduce Example
Rule Condition Statement QueueAxiom 1 [•,0] 1Shift: [1] 2 [the•,1] 2Reduce: [2] DT ➝ the 3 [DT•,1] 3Shift: [3] 4 [DT man •, 2] 4Reduce: [4] NN ➝ man 5 [DT NN •, 2] 5Reduce: [5] NP ➝ DT NN 6 [NP •, 2] 6Shift: [6] 7 [NP sleeps •, 3] 7Reduce: [7] Vi ➝ sleeps 8 [NP Vi •, 3] 8Reduce: [8] VP ➝ Vi 9 [NP VP •, 3] 9Reduce: [9] S ➝ NP VP 10 [S •, 3] 10GOAL: [10] ∅
Input: the man sleeps
13
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
![Page 58: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/58.jpg)
Shift-ReduceInput: G and w1 ... wn Item form: [α•, j]
asserts that α ⇒* w1 ... wj or that α wj+1 ... wn ⇒* w1 ... wj
Axiom: [•,0]
Goal: [S•,n]
Scan (shift)asserts that α wj+1 ⇒* w1 ... wj wj+1
Complete (reduce)asserts that αB ⇒* w1 ... wj
Shift[↵•, j]
[↵wj+1, j + 1]
Reduce[↵�•, j][↵B•, j] B ! � 2 R
14
![Page 59: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/59.jpg)
Top-Down recognitionInput: G and w1 ... wn Item form: [•β, j]
asserts that S ⇒* w1 ... wj β
Axiom: [•S,0]
Goal: [•,n]
Scanasserts that S ⇒* w1 ... wj wj+1 β
Predictasserts that S ⇒* w1 ... wj B β
Predict•B �, j
[•� �, j]B ! � 2 R
Scan[•wj+1�, j]
[•�, j + 1]
15
![Page 60: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/60.jpg)
Top-Down Example
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 61: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/61.jpg)
Top-Down Example
Rule Condition Statement Queue
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 62: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/62.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 63: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/63.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 64: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/64.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1Predict: [1] S ➝ NP VP 2 [• NP VP, 0] 2
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 65: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/65.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1Predict: [1] S ➝ NP VP 2 [• NP VP, 0] 2
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 66: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/66.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1Predict: [1] S ➝ NP VP 2 [• NP VP, 0] 2Predict: [2] NP ➝ DT NN 3 [• DT NN VP, 0] 3
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 67: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/67.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1Predict: [1] S ➝ NP VP 2 [• NP VP, 0] 2Predict: [2] NP ➝ DT NN 3 [• DT NN VP, 0] 3
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 68: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/68.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1Predict: [1] S ➝ NP VP 2 [• NP VP, 0] 2Predict: [2] NP ➝ DT NN 3 [• DT NN VP, 0] 3Predict: [3] DT ➝ the 4 [• the NN VP,0] 4
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 69: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/69.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1Predict: [1] S ➝ NP VP 2 [• NP VP, 0] 2Predict: [2] NP ➝ DT NN 3 [• DT NN VP, 0] 3Predict: [3] DT ➝ the 4 [• the NN VP,0] 4
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 70: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/70.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1Predict: [1] S ➝ NP VP 2 [• NP VP, 0] 2Predict: [2] NP ➝ DT NN 3 [• DT NN VP, 0] 3Predict: [3] DT ➝ the 4 [• the NN VP,0] 4Scan: [4] 5 [• NN VP,1] 5
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 71: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/71.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1Predict: [1] S ➝ NP VP 2 [• NP VP, 0] 2Predict: [2] NP ➝ DT NN 3 [• DT NN VP, 0] 3Predict: [3] DT ➝ the 4 [• the NN VP,0] 4Scan: [4] 5 [• NN VP,1] 5
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 72: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/72.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1Predict: [1] S ➝ NP VP 2 [• NP VP, 0] 2Predict: [2] NP ➝ DT NN 3 [• DT NN VP, 0] 3Predict: [3] DT ➝ the 4 [• the NN VP,0] 4Scan: [4] 5 [• NN VP,1] 5Predict: [5] NN ➝ man 6 [• man VP, 1] 6
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 73: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/73.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1Predict: [1] S ➝ NP VP 2 [• NP VP, 0] 2Predict: [2] NP ➝ DT NN 3 [• DT NN VP, 0] 3Predict: [3] DT ➝ the 4 [• the NN VP,0] 4Scan: [4] 5 [• NN VP,1] 5Predict: [5] NN ➝ man 6 [• man VP, 1] 6
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 74: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/74.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1Predict: [1] S ➝ NP VP 2 [• NP VP, 0] 2Predict: [2] NP ➝ DT NN 3 [• DT NN VP, 0] 3Predict: [3] DT ➝ the 4 [• the NN VP,0] 4Scan: [4] 5 [• NN VP,1] 5Predict: [5] NN ➝ man 6 [• man VP, 1] 6Scan: [6] 7 [• VP, 2] 7
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 75: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/75.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1Predict: [1] S ➝ NP VP 2 [• NP VP, 0] 2Predict: [2] NP ➝ DT NN 3 [• DT NN VP, 0] 3Predict: [3] DT ➝ the 4 [• the NN VP,0] 4Scan: [4] 5 [• NN VP,1] 5Predict: [5] NN ➝ man 6 [• man VP, 1] 6Scan: [6] 7 [• VP, 2] 7
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 76: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/76.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1Predict: [1] S ➝ NP VP 2 [• NP VP, 0] 2Predict: [2] NP ➝ DT NN 3 [• DT NN VP, 0] 3Predict: [3] DT ➝ the 4 [• the NN VP,0] 4Scan: [4] 5 [• NN VP,1] 5Predict: [5] NN ➝ man 6 [• man VP, 1] 6Scan: [6] 7 [• VP, 2] 7
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 77: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/77.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1Predict: [1] S ➝ NP VP 2 [• NP VP, 0] 2Predict: [2] NP ➝ DT NN 3 [• DT NN VP, 0] 3Predict: [3] DT ➝ the 4 [• the NN VP,0] 4Scan: [4] 5 [• NN VP,1] 5Predict: [5] NN ➝ man 6 [• man VP, 1] 6Scan: [6] 7 [• VP, 2] 7Predict: [7] VP ➝ Vi 8 [• Vi, 2] 8, 9
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 78: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/78.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1Predict: [1] S ➝ NP VP 2 [• NP VP, 0] 2Predict: [2] NP ➝ DT NN 3 [• DT NN VP, 0] 3Predict: [3] DT ➝ the 4 [• the NN VP,0] 4Scan: [4] 5 [• NN VP,1] 5Predict: [5] NN ➝ man 6 [• man VP, 1] 6Scan: [6] 7 [• VP, 2] 7Predict: [7] VP ➝ Vi 8 [• Vi, 2] 8, 9
VP ➝ Vt NP 9 [• Vt NP, 2]
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 79: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/79.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1Predict: [1] S ➝ NP VP 2 [• NP VP, 0] 2Predict: [2] NP ➝ DT NN 3 [• DT NN VP, 0] 3Predict: [3] DT ➝ the 4 [• the NN VP,0] 4Scan: [4] 5 [• NN VP,1] 5Predict: [5] NN ➝ man 6 [• man VP, 1] 6Scan: [6] 7 [• VP, 2] 7Predict: [7] VP ➝ Vi 8 [• Vi, 2] 8, 9
VP ➝ Vt NP 9 [• Vt NP, 2]
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 80: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/80.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1Predict: [1] S ➝ NP VP 2 [• NP VP, 0] 2Predict: [2] NP ➝ DT NN 3 [• DT NN VP, 0] 3Predict: [3] DT ➝ the 4 [• the NN VP,0] 4Scan: [4] 5 [• NN VP,1] 5Predict: [5] NN ➝ man 6 [• man VP, 1] 6Scan: [6] 7 [• VP, 2] 7Predict: [7] VP ➝ Vi 8 [• Vi, 2] 8, 9
VP ➝ Vt NP 9 [• Vt NP, 2]Predict: [8] Vi ➝ sleeps 10 [• sleeps, 2] 9, 10
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 81: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/81.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1Predict: [1] S ➝ NP VP 2 [• NP VP, 0] 2Predict: [2] NP ➝ DT NN 3 [• DT NN VP, 0] 3Predict: [3] DT ➝ the 4 [• the NN VP,0] 4Scan: [4] 5 [• NN VP,1] 5Predict: [5] NN ➝ man 6 [• man VP, 1] 6Scan: [6] 7 [• VP, 2] 7Predict: [7] VP ➝ Vi 8 [• Vi, 2] 8, 9
VP ➝ Vt NP 9 [• Vt NP, 2]Predict: [8] Vi ➝ sleeps 10 [• sleeps, 2] 9, 10
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 82: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/82.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1Predict: [1] S ➝ NP VP 2 [• NP VP, 0] 2Predict: [2] NP ➝ DT NN 3 [• DT NN VP, 0] 3Predict: [3] DT ➝ the 4 [• the NN VP,0] 4Scan: [4] 5 [• NN VP,1] 5Predict: [5] NN ➝ man 6 [• man VP, 1] 6Scan: [6] 7 [• VP, 2] 7Predict: [7] VP ➝ Vi 8 [• Vi, 2] 8, 9
VP ➝ Vt NP 9 [• Vt NP, 2]Predict: [8] Vi ➝ sleeps 10 [• sleeps, 2] 9, 10 [9] 10
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 83: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/83.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1Predict: [1] S ➝ NP VP 2 [• NP VP, 0] 2Predict: [2] NP ➝ DT NN 3 [• DT NN VP, 0] 3Predict: [3] DT ➝ the 4 [• the NN VP,0] 4Scan: [4] 5 [• NN VP,1] 5Predict: [5] NN ➝ man 6 [• man VP, 1] 6Scan: [6] 7 [• VP, 2] 7Predict: [7] VP ➝ Vi 8 [• Vi, 2] 8, 9
VP ➝ Vt NP 9 [• Vt NP, 2]Predict: [8] Vi ➝ sleeps 10 [• sleeps, 2] 9, 10 [9] 10
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 84: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/84.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1Predict: [1] S ➝ NP VP 2 [• NP VP, 0] 2Predict: [2] NP ➝ DT NN 3 [• DT NN VP, 0] 3Predict: [3] DT ➝ the 4 [• the NN VP,0] 4Scan: [4] 5 [• NN VP,1] 5Predict: [5] NN ➝ man 6 [• man VP, 1] 6Scan: [6] 7 [• VP, 2] 7Predict: [7] VP ➝ Vi 8 [• Vi, 2] 8, 9
VP ➝ Vt NP 9 [• Vt NP, 2]Predict: [8] Vi ➝ sleeps 10 [• sleeps, 2] 9, 10 [9] 10Scan: [10] 11 [•, 3] 11
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 85: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/85.jpg)
Top-Down Example
Rule Condition Statement QueueAxiom 1 [• S, 0] 1Predict: [1] S ➝ NP VP 2 [• NP VP, 0] 2Predict: [2] NP ➝ DT NN 3 [• DT NN VP, 0] 3Predict: [3] DT ➝ the 4 [• the NN VP,0] 4Scan: [4] 5 [• NN VP,1] 5Predict: [5] NN ➝ man 6 [• man VP, 1] 6Scan: [6] 7 [• VP, 2] 7Predict: [7] VP ➝ Vi 8 [• Vi, 2] 8, 9
VP ➝ Vt NP 9 [• Vt NP, 2]Predict: [8] Vi ➝ sleeps 10 [• sleeps, 2] 9, 10 [9] 10Scan: [10] 11 [•, 3] 11GOAL: [11] ∅
16
S ➝ NP VPVP ➝ ViVP ➝ Vt NPVP ➝ VP PPNP ➝ DT NNNP ➝ NP PPPP ➝ IN NPVi ➝ sleepsVt ➝ sawNN ➝ manNN ➝ dogNN ➝ telescopeDT ➝ theIN ➝ with
Input: the man sleeps
![Page 86: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/86.jpg)
CKY - CNF onlyInput: G and s = w1 ... wn Item form: [i, X, j]
asserts that X ⇒* wi+1 ... wj
Axioms: [i, X, i+1] X ➝ wi ∈ R
Goal: [0, S, n]
Merge: asserts that wi+1 ... wk wk+1 ... wj ⇒* wi+1 ... wj
[i, A, k] [k,B, j]
[i, C, j]C ! AB 2 R
17
![Page 87: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/87.jpg)
CKY ExampleInput: the man saw the dog
18
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 88: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/88.jpg)
CKY Example
Rule Condition Statement Queue Passive
Input: the man saw the dog
18
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 89: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/89.jpg)
CKY Example
Rule Condition Statement Queue PassiveAxiom DT ➝ the 1 [0, DT, 1] 1
Input: the man saw the dog
18
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 90: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/90.jpg)
CKY Example
Rule Condition Statement Queue PassiveAxiom DT ➝ the 1 [0, DT, 1] 1
NN ➝ man 2 [1, NN, 2] 1, 2
Input: the man saw the dog
18
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 91: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/91.jpg)
CKY Example
Rule Condition Statement Queue PassiveAxiom DT ➝ the 1 [0, DT, 1] 1
NN ➝ man 2 [1, NN, 2] 1, 2Vt ➝ saw 3 [2, Vt, 3] 1, 2, 3
Input: the man saw the dog
18
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 92: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/92.jpg)
CKY Example
Rule Condition Statement Queue PassiveAxiom DT ➝ the 1 [0, DT, 1] 1
NN ➝ man 2 [1, NN, 2] 1, 2Vt ➝ saw 3 [2, Vt, 3] 1, 2, 3DT ➝ the 4 [3, DT, 4] 1, 2, 3, 4
Input: the man saw the dog
18
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 93: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/93.jpg)
CKY Example
Rule Condition Statement Queue PassiveAxiom DT ➝ the 1 [0, DT, 1] 1
NN ➝ man 2 [1, NN, 2] 1, 2Vt ➝ saw 3 [2, Vt, 3] 1, 2, 3DT ➝ the 4 [3, DT, 4] 1, 2, 3, 4NN ➝ dog 5 [4, NN, 5] 1, 2, 3, 4, 5
Input: the man saw the dog
18
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 94: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/94.jpg)
CKY Example
Rule Condition Statement Queue PassiveAxiom DT ➝ the 1 [0, DT, 1] 1
NN ➝ man 2 [1, NN, 2] 1, 2Vt ➝ saw 3 [2, Vt, 3] 1, 2, 3DT ➝ the 4 [3, DT, 4] 1, 2, 3, 4NN ➝ dog 5 [4, NN, 5] 1, 2, 3, 4, 5
2, 3, 4, 5 1
Input: the man saw the dog
18
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 95: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/95.jpg)
CKY Example
Rule Condition Statement Queue PassiveAxiom DT ➝ the 1 [0, DT, 1] 1
NN ➝ man 2 [1, NN, 2] 1, 2Vt ➝ saw 3 [2, Vt, 3] 1, 2, 3DT ➝ the 4 [3, DT, 4] 1, 2, 3, 4NN ➝ dog 5 [4, NN, 5] 1, 2, 3, 4, 5
2, 3, 4, 5 1Merge: [1][2] NP ➝ DT NN 6 [0, NP, 2] 3, 4, 5, 6 2
Input: the man saw the dog
18
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 96: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/96.jpg)
CKY Example
Rule Condition Statement Queue PassiveAxiom DT ➝ the 1 [0, DT, 1] 1
NN ➝ man 2 [1, NN, 2] 1, 2Vt ➝ saw 3 [2, Vt, 3] 1, 2, 3DT ➝ the 4 [3, DT, 4] 1, 2, 3, 4NN ➝ dog 5 [4, NN, 5] 1, 2, 3, 4, 5
2, 3, 4, 5 1Merge: [1][2] NP ➝ DT NN 6 [0, NP, 2] 3, 4, 5, 6 2
4, 5, 6 3
Input: the man saw the dog
18
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 97: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/97.jpg)
CKY Example
Rule Condition Statement Queue PassiveAxiom DT ➝ the 1 [0, DT, 1] 1
NN ➝ man 2 [1, NN, 2] 1, 2Vt ➝ saw 3 [2, Vt, 3] 1, 2, 3DT ➝ the 4 [3, DT, 4] 1, 2, 3, 4NN ➝ dog 5 [4, NN, 5] 1, 2, 3, 4, 5
2, 3, 4, 5 1Merge: [1][2] NP ➝ DT NN 6 [0, NP, 2] 3, 4, 5, 6 2
4, 5, 6 35, 6 4
Input: the man saw the dog
18
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 98: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/98.jpg)
CKY Example
Rule Condition Statement Queue PassiveAxiom DT ➝ the 1 [0, DT, 1] 1
NN ➝ man 2 [1, NN, 2] 1, 2Vt ➝ saw 3 [2, Vt, 3] 1, 2, 3DT ➝ the 4 [3, DT, 4] 1, 2, 3, 4NN ➝ dog 5 [4, NN, 5] 1, 2, 3, 4, 5
2, 3, 4, 5 1Merge: [1][2] NP ➝ DT NN 6 [0, NP, 2] 3, 4, 5, 6 2
4, 5, 6 35, 6 4
Merge: [4][5] NP ➝ DT NN 7 [3, NP, 5] 6, 7 5
Input: the man saw the dog
18
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 99: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/99.jpg)
CKY Example
Rule Condition Statement Queue PassiveAxiom DT ➝ the 1 [0, DT, 1] 1
NN ➝ man 2 [1, NN, 2] 1, 2Vt ➝ saw 3 [2, Vt, 3] 1, 2, 3DT ➝ the 4 [3, DT, 4] 1, 2, 3, 4NN ➝ dog 5 [4, NN, 5] 1, 2, 3, 4, 5
2, 3, 4, 5 1Merge: [1][2] NP ➝ DT NN 6 [0, NP, 2] 3, 4, 5, 6 2
4, 5, 6 35, 6 4
Merge: [4][5] NP ➝ DT NN 7 [3, NP, 5] 6, 7 57 6
Input: the man saw the dog
18
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 100: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/100.jpg)
CKY Example
Rule Condition Statement Queue PassiveAxiom DT ➝ the 1 [0, DT, 1] 1
NN ➝ man 2 [1, NN, 2] 1, 2Vt ➝ saw 3 [2, Vt, 3] 1, 2, 3DT ➝ the 4 [3, DT, 4] 1, 2, 3, 4NN ➝ dog 5 [4, NN, 5] 1, 2, 3, 4, 5
2, 3, 4, 5 1Merge: [1][2] NP ➝ DT NN 6 [0, NP, 2] 3, 4, 5, 6 2
4, 5, 6 35, 6 4
Merge: [4][5] NP ➝ DT NN 7 [3, NP, 5] 6, 7 57 6
Merge: [3] [7] VP ➝ Vt NP 8 [2, VP, 5] 8 7
Input: the man saw the dog
18
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 101: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/101.jpg)
CKY Example
Rule Condition Statement Queue PassiveAxiom DT ➝ the 1 [0, DT, 1] 1
NN ➝ man 2 [1, NN, 2] 1, 2Vt ➝ saw 3 [2, Vt, 3] 1, 2, 3DT ➝ the 4 [3, DT, 4] 1, 2, 3, 4NN ➝ dog 5 [4, NN, 5] 1, 2, 3, 4, 5
2, 3, 4, 5 1Merge: [1][2] NP ➝ DT NN 6 [0, NP, 2] 3, 4, 5, 6 2
4, 5, 6 35, 6 4
Merge: [4][5] NP ➝ DT NN 7 [3, NP, 5] 6, 7 57 6
Merge: [3] [7] VP ➝ Vt NP 8 [2, VP, 5] 8 7Merge: [6] [8] S ➝ NP VP 9 [0, S, 5] 9 8
Input: the man saw the dog
18
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 102: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/102.jpg)
CKY Example
Rule Condition Statement Queue PassiveAxiom DT ➝ the 1 [0, DT, 1] 1
NN ➝ man 2 [1, NN, 2] 1, 2Vt ➝ saw 3 [2, Vt, 3] 1, 2, 3DT ➝ the 4 [3, DT, 4] 1, 2, 3, 4NN ➝ dog 5 [4, NN, 5] 1, 2, 3, 4, 5
2, 3, 4, 5 1Merge: [1][2] NP ➝ DT NN 6 [0, NP, 2] 3, 4, 5, 6 2
4, 5, 6 35, 6 4
Merge: [4][5] NP ➝ DT NN 7 [3, NP, 5] 6, 7 57 6
Merge: [3] [7] VP ➝ Vt NP 8 [2, VP, 5] 8 7Merge: [6] [8] S ➝ NP VP 9 [0, S, 5] 9 8GOAL: [9] ∅ 9
Input: the man saw the dog
18
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 103: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/103.jpg)
Rule Segmentation: "Split Points"
0 1 2 3
0S3 ➝ 0NP2 2VP3
0NP2 ➝ 0DT1 1NN2
2VP3 ➝ 2Vi30DT1 ➝ the1NN2 ➝ man2Vi3 ➝ sleeps
19
![Page 104: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/104.jpg)
Rule Segmentation: "Split Points"
the man sleeps0 1 2 3
0S3 ➝ 0NP2 2VP3
0NP2 ➝ 0DT1 1NN2
2VP3 ➝ 2Vi30DT1 ➝ the1NN2 ➝ man2Vi3 ➝ sleeps
19
![Page 105: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/105.jpg)
Rule Segmentation: "Split Points"
0DT1
the man sleeps0 1 2 3
0S3 ➝ 0NP2 2VP3
0NP2 ➝ 0DT1 1NN2
2VP3 ➝ 2Vi30DT1 ➝ the1NN2 ➝ man2Vi3 ➝ sleeps
19
![Page 106: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/106.jpg)
Rule Segmentation: "Split Points"
0DT1 1NN2
the man sleeps0 1 2 3
0S3 ➝ 0NP2 2VP3
0NP2 ➝ 0DT1 1NN2
2VP3 ➝ 2Vi30DT1 ➝ the1NN2 ➝ man2Vi3 ➝ sleeps
19
![Page 107: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/107.jpg)
Rule Segmentation: "Split Points"
0DT1 1NN2
the man
2Vi3
sleeps0 1 2 3
0S3 ➝ 0NP2 2VP3
0NP2 ➝ 0DT1 1NN2
2VP3 ➝ 2Vi30DT1 ➝ the1NN2 ➝ man2Vi3 ➝ sleeps
19
![Page 108: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/108.jpg)
Rule Segmentation: "Split Points"
0NP2
0DT1 1NN2
the man
2Vi3
sleeps0 1 2 3
0S3 ➝ 0NP2 2VP3
0NP2 ➝ 0DT1 1NN2
2VP3 ➝ 2Vi30DT1 ➝ the1NN2 ➝ man2Vi3 ➝ sleeps
19
![Page 109: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/109.jpg)
Rule Segmentation: "Split Points"
0NP2 2VP3
0DT1 1NN2
the man
2Vi3
sleeps0 1 2 3
0S3 ➝ 0NP2 2VP3
0NP2 ➝ 0DT1 1NN2
2VP3 ➝ 2Vi30DT1 ➝ the1NN2 ➝ man2Vi3 ➝ sleeps
19
![Page 110: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/110.jpg)
Rule Segmentation: "Split Points"
0S3
0NP2 2VP3
0DT1 1NN2
the man
2Vi3
sleeps0 1 2 3
0S3 ➝ 0NP2 2VP3
0NP2 ➝ 0DT1 1NN2
2VP3 ➝ 2Vi30DT1 ➝ the1NN2 ➝ man2Vi3 ➝ sleeps
19
![Page 111: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/111.jpg)
"Dotted items"
20
![Page 112: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/112.jpg)
"Dotted items"Parsing a CNF grammar is easy because we know the shape of rules
20
![Page 113: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/113.jpg)
"Dotted items"Parsing a CNF grammar is easy because we know the shape of rules
When that's not the case, we have to scan rules symbol by symbol using a general mechanism:
20
![Page 114: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/114.jpg)
"Dotted items"Parsing a CNF grammar is easy because we know the shape of rules
When that's not the case, we have to scan rules symbol by symbol using a general mechanism:
Item form: [i, X ➝ α •β , j] where X ➝ α β ∈ R is a rule
20
![Page 115: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/115.jpg)
"Dotted items"Parsing a CNF grammar is easy because we know the shape of rules
When that's not the case, we have to scan rules symbol by symbol using a general mechanism:
Item form: [i, X ➝ α •β , j] where X ➝ α β ∈ R is a rule
• In general, we segment rules with respect to the input w1 ... wn
20
![Page 116: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/116.jpg)
"Dotted items"Parsing a CNF grammar is easy because we know the shape of rules
When that's not the case, we have to scan rules symbol by symbol using a general mechanism:
Item form: [i, X ➝ α •β , j] where X ➝ α β ∈ R is a rule
• In general, we segment rules with respect to the input w1 ... wn
• The dot represents progress through the rule's right-hand side (RHS)
20
![Page 117: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/117.jpg)
"Dotted items"Parsing a CNF grammar is easy because we know the shape of rules
When that's not the case, we have to scan rules symbol by symbol using a general mechanism:
Item form: [i, X ➝ α •β , j] where X ➝ α β ∈ R is a rule
• In general, we segment rules with respect to the input w1 ... wn
• The dot represents progress through the rule's right-hand side (RHS)
• The prefix α has already been parsed and we are waiting for β
20
![Page 118: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/118.jpg)
"Dotted items"Parsing a CNF grammar is easy because we know the shape of rules
When that's not the case, we have to scan rules symbol by symbol using a general mechanism:
Item form: [i, X ➝ α •β , j] where X ➝ α β ∈ R is a rule
• In general, we segment rules with respect to the input w1 ... wn
• The dot represents progress through the rule's right-hand side (RHS)
• The prefix α has already been parsed and we are waiting for β
• The filled box represents a segmentation of [0 .. j] into |α| adjacent parts
20
![Page 119: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/119.jpg)
"Dotted items"Parsing a CNF grammar is easy because we know the shape of rules
When that's not the case, we have to scan rules symbol by symbol using a general mechanism:
Item form: [i, X ➝ α •β , j] where X ➝ α β ∈ R is a rule
• In general, we segment rules with respect to the input w1 ... wn
• The dot represents progress through the rule's right-hand side (RHS)
• The prefix α has already been parsed and we are waiting for β
• The filled box represents a segmentation of [0 .. j] into |α| adjacent parts
• The empty box has no actual role, it's just a reminder that the segmentation beyond j is unknown
20
![Page 120: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/120.jpg)
CKY+Input: G and s = w1 ... wn Item form: [i, X ➝ α •β , j]
asserts that X ⇒* wi+1 ... wj β
Axioms: [i, X ➝ wi • α , i+1] X ➝ wi α ∈ R [i, X ➝ ε •, i] X ➝ ε ∈ R
Goal: [0, S ➝ α •, n]
Scan Prefix
Complete
21
[i,X ! ↵⌅ • wj+1 �⇤, j][i,X ! ↵⌅wj+1 • �⇤, j + 1]
[i, Y ! ↵⌅•, j][i,X ! Yi,j • �⇤, j]
X ! Y � 2 R
[i,X ! ↵⌅ • Y �⇤, k] [k, Y ! �⌅•, j][i,X ! ↵⌅ Yk,j • �⇤, j]
![Page 121: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/121.jpg)
CKY+ ExampleInput: the man sleeps
22
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 122: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/122.jpg)
CKY+ Example
Rule Condition Item Active Passive
Input: the man sleeps
22
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 123: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/123.jpg)
CKY+ Example
Rule Condition Item Active PassiveAxiom DT ➝ the 1 [0, DT ➝ the •,1] 1
Input: the man sleeps
22
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 124: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/124.jpg)
CKY+ Example
Rule Condition Item Active PassiveAxiom DT ➝ the 1 [0, DT ➝ the •,1] 1
NN ➝ man 2 [1, NN ➝ man •, 2] 1, 2
Input: the man sleeps
22
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 125: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/125.jpg)
CKY+ Example
Rule Condition Item Active PassiveAxiom DT ➝ the 1 [0, DT ➝ the •,1] 1
NN ➝ man 2 [1, NN ➝ man •, 2] 1, 2Vi ➝ sleeps 3 [2, Vi ➝ sleeps •, 3] 1, 2, 3
Input: the man sleeps
22
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 126: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/126.jpg)
CKY+ Example
Rule Condition Item Active PassiveAxiom DT ➝ the 1 [0, DT ➝ the •,1] 1
NN ➝ man 2 [1, NN ➝ man •, 2] 1, 2Vi ➝ sleeps 3 [2, Vi ➝ sleeps •, 3] 1, 2, 3
Prefix: [1] NP ➝ DT NN 4 [0, NP ➝ DT0,1 • NN, 2] 2, 3, 4 1
Input: the man sleeps
22
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 127: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/127.jpg)
CKY+ Example
Rule Condition Item Active PassiveAxiom DT ➝ the 1 [0, DT ➝ the •,1] 1
NN ➝ man 2 [1, NN ➝ man •, 2] 1, 2Vi ➝ sleeps 3 [2, Vi ➝ sleeps •, 3] 1, 2, 3
Prefix: [1] NP ➝ DT NN 4 [0, NP ➝ DT0,1 • NN, 2] 2, 3, 4 13, 4 2
Input: the man sleeps
22
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 128: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/128.jpg)
CKY+ Example
Rule Condition Item Active PassiveAxiom DT ➝ the 1 [0, DT ➝ the •,1] 1
NN ➝ man 2 [1, NN ➝ man •, 2] 1, 2Vi ➝ sleeps 3 [2, Vi ➝ sleeps •, 3] 1, 2, 3
Prefix: [1] NP ➝ DT NN 4 [0, NP ➝ DT0,1 • NN, 2] 2, 3, 4 13, 4 2
Prefix: [3] VP ➝ Vi 5 [2, VP ➝ Vi2,3 •, 3] 4, 5 3
Input: the man sleeps
22
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 129: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/129.jpg)
CKY+ Example
Rule Condition Item Active PassiveAxiom DT ➝ the 1 [0, DT ➝ the •,1] 1
NN ➝ man 2 [1, NN ➝ man •, 2] 1, 2Vi ➝ sleeps 3 [2, Vi ➝ sleeps •, 3] 1, 2, 3
Prefix: [1] NP ➝ DT NN 4 [0, NP ➝ DT0,1 • NN, 2] 2, 3, 4 13, 4 2
Prefix: [3] VP ➝ Vi 5 [2, VP ➝ Vi2,3 •, 3] 4, 5 3Complete: [4] [2] 6 [0, NP ➝ DT0,1 NN1,2 •, 2] 5, 6 4
Input: the man sleeps
22
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 130: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/130.jpg)
CKY+ Example
Rule Condition Item Active PassiveAxiom DT ➝ the 1 [0, DT ➝ the •,1] 1
NN ➝ man 2 [1, NN ➝ man •, 2] 1, 2Vi ➝ sleeps 3 [2, Vi ➝ sleeps •, 3] 1, 2, 3
Prefix: [1] NP ➝ DT NN 4 [0, NP ➝ DT0,1 • NN, 2] 2, 3, 4 13, 4 2
Prefix: [3] VP ➝ Vi 5 [2, VP ➝ Vi2,3 •, 3] 4, 5 3Complete: [4] [2] 6 [0, NP ➝ DT0,1 NN1,2 •, 2] 5, 6 4
6 5
Input: the man sleeps
22
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 131: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/131.jpg)
CKY+ Example
Rule Condition Item Active PassiveAxiom DT ➝ the 1 [0, DT ➝ the •,1] 1
NN ➝ man 2 [1, NN ➝ man •, 2] 1, 2Vi ➝ sleeps 3 [2, Vi ➝ sleeps •, 3] 1, 2, 3
Prefix: [1] NP ➝ DT NN 4 [0, NP ➝ DT0,1 • NN, 2] 2, 3, 4 13, 4 2
Prefix: [3] VP ➝ Vi 5 [2, VP ➝ Vi2,3 •, 3] 4, 5 3Complete: [4] [2] 6 [0, NP ➝ DT0,1 NN1,2 •, 2] 5, 6 4
6 5Prefix: [6] S ➝ NP VP 7 [0, S ➝ NP0,2 • VP, 2] 7 6
Input: the man sleeps
22
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 132: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/132.jpg)
CKY+ Example
Rule Condition Item Active PassiveAxiom DT ➝ the 1 [0, DT ➝ the •,1] 1
NN ➝ man 2 [1, NN ➝ man •, 2] 1, 2Vi ➝ sleeps 3 [2, Vi ➝ sleeps •, 3] 1, 2, 3
Prefix: [1] NP ➝ DT NN 4 [0, NP ➝ DT0,1 • NN, 2] 2, 3, 4 13, 4 2
Prefix: [3] VP ➝ Vi 5 [2, VP ➝ Vi2,3 •, 3] 4, 5 3Complete: [4] [2] 6 [0, NP ➝ DT0,1 NN1,2 •, 2] 5, 6 4
6 5Prefix: [6] S ➝ NP VP 7 [0, S ➝ NP0,2 • VP, 2] 7 6Complete: [7] [5] 8 [0, S ➝ NP0,2 VP2,3 •, 3] 8 7
Input: the man sleeps
22
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 133: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/133.jpg)
CKY+ Example
Rule Condition Item Active PassiveAxiom DT ➝ the 1 [0, DT ➝ the •,1] 1
NN ➝ man 2 [1, NN ➝ man •, 2] 1, 2Vi ➝ sleeps 3 [2, Vi ➝ sleeps •, 3] 1, 2, 3
Prefix: [1] NP ➝ DT NN 4 [0, NP ➝ DT0,1 • NN, 2] 2, 3, 4 13, 4 2
Prefix: [3] VP ➝ Vi 5 [2, VP ➝ Vi2,3 •, 3] 4, 5 3Complete: [4] [2] 6 [0, NP ➝ DT0,1 NN1,2 •, 2] 5, 6 4
6 5Prefix: [6] S ➝ NP VP 7 [0, S ➝ NP0,2 • VP, 2] 7 6Complete: [7] [5] 8 [0, S ➝ NP0,2 VP2,3 •, 3] 8 7GOAL: [8] ∅
Input: the man sleeps
22
S ➝ NP VP Vi ➝ sleepsVP ➝ Vi Vt ➝ sawVP ➝ Vt NP NN ➝ manVP ➝ VP PP NN ➝ dogNP ➝ DT NN NN ➝ telescopeNP ➝ NP PP DT ➝ thePP ➝ IN NP IN ➝ with
![Page 134: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/134.jpg)
Correctness of Parsing Strategy
Soundness: if a goal item is proven for s
• then s ∈ L(G)
Completeness: if s ∈ L(G)
• then a goal item can be proven for s
23
![Page 135: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/135.jpg)
Parse Forest
Efficient representation of the whole space TG(s)
• each and every possible tree yielding s
We must be able to represent partial derivations
• including alternative ones
24
![Page 136: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/136.jpg)
AmbiguitySome strings may have more than one derivation in G
25
![Page 137: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/137.jpg)
Dealing with Ambiguity
Statistical model: weight steps in a derivation
• induces a partial ordering over derivations
• can be used to make a decision
• e.g. best tree under the model
26
![Page 138: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/138.jpg)
Probabilistic CFGCFG extended with parameters 0 ≤ θr ≤ 1
• where r ∈ R and
X
↵:X!↵2R
✓X!↵ = 1
27
![Page 139: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/139.jpg)
and strings
Probabilistic CFGDistribution over trees
28
P (S = s) =X
t2TG(s)
P (T = t, S = s)
P (T = t, S = yield(t)) = P (T = hr1 . . . rni, S = s)
=nY
i=1
✓ri =nY
i=1
✓Xi!↵i =nY
r2t
✓rn(r,t)
![Page 140: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/140.jpg)
EstimationLet us assume the parametric form of θ is a multinomial
• one categorical distribution per X ∈ N
Suppose we can observe a treebank, then by MLE
✓X!↵ =n(X ! ↵)
n(X)
=n(X ! ↵)P↵0 n(X ! ↵0)
29
![Page 141: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/141.jpg)
Weighted CKY+Input: G and s = w1 ... wn Item form: [i, X ➝ α •β , j]
asserts that X ⇒* wi+1 ... wj β
Axioms: [i, X ➝ wi • α , i+1]:θr r = X ➝ wi α ∈ R [i, X ➝ ε •, i]:θr r = X ➝ ε ∈ R
Goal: [0, S ➝ α •, n]
Scan Prefix
Complete
30
[i,X ! ↵⌅ • wj+1 �⇤, j] : ✓1[i,X ! ↵⌅wj+1 • �⇤, j + 1] : ✓1
[i, Y ! ↵⌅•, j] : ✓1[i,X ! Yi,j • �⇤, j] : ✓r
r = X ! Y � 2 R
[i,X ! ↵⌅ • Y �⇤, k] : ✓1 [k, Y ! �⌅•, j] : ✓2[i,X ! ↵⌅ Yk,j • �⇤, j] : ✓1
![Page 142: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/142.jpg)
Joint Distribution
0S3 ➝ 0NP2 2VP3
0NP2 ➝ 0DT1 1NN2
2VP3 ➝ 2Vi30DT1 ➝ the1NN2 ➝ man2Vi3 ➝ sleeps
31
![Page 143: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/143.jpg)
Joint Distribution
the man sleeps
0S3 ➝ 0NP2 2VP3
0NP2 ➝ 0DT1 1NN2
2VP3 ➝ 2Vi30DT1 ➝ the1NN2 ➝ man2Vi3 ➝ sleeps
31
![Page 144: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/144.jpg)
Joint Distribution
0DT1
the man sleeps
θDT➝the
0S3 ➝ 0NP2 2VP3
0NP2 ➝ 0DT1 1NN2
2VP3 ➝ 2Vi30DT1 ➝ the1NN2 ➝ man2Vi3 ➝ sleeps
31
![Page 145: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/145.jpg)
Joint Distribution
0DT1 1NN2
the man sleeps
θDT➝the θNN➝man
0S3 ➝ 0NP2 2VP3
0NP2 ➝ 0DT1 1NN2
2VP3 ➝ 2Vi30DT1 ➝ the1NN2 ➝ man2Vi3 ➝ sleeps
31
![Page 146: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/146.jpg)
Joint Distribution
0DT1 1NN2 2Vi3
the man sleeps
θDT➝the θNN➝man θVi➝sleeps
0S3 ➝ 0NP2 2VP3
0NP2 ➝ 0DT1 1NN2
2VP3 ➝ 2Vi30DT1 ➝ the1NN2 ➝ man2Vi3 ➝ sleeps
31
![Page 147: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/147.jpg)
Joint Distribution
0NP2
0DT1 1NN2 2Vi3
the man sleeps
θNP➝DT NN
θDT➝the θNN➝man θVi➝sleeps
0S3 ➝ 0NP2 2VP3
0NP2 ➝ 0DT1 1NN2
2VP3 ➝ 2Vi30DT1 ➝ the1NN2 ➝ man2Vi3 ➝ sleeps
31
![Page 148: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/148.jpg)
Joint Distribution
0NP2 2VP3
0DT1 1NN2 2Vi3
the man sleeps
θNP➝DT NN θVP➝Vi
θDT➝the θNN➝man θVi➝sleeps
0S3 ➝ 0NP2 2VP3
0NP2 ➝ 0DT1 1NN2
2VP3 ➝ 2Vi30DT1 ➝ the1NN2 ➝ man2Vi3 ➝ sleeps
31
![Page 149: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/149.jpg)
Joint Distribution0S3
0NP2 2VP3
0DT1 1NN2 2Vi3
θS➝NP VP
the man sleeps
θNP➝DT NN θVP➝Vi
θDT➝the θNN➝man θVi➝sleeps
0S3 ➝ 0NP2 2VP3
0NP2 ➝ 0DT1 1NN2
2VP3 ➝ 2Vi30DT1 ➝ the1NN2 ➝ man2Vi3 ➝ sleeps
31
![Page 150: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/150.jpg)
Ambiguity
32
![Page 151: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/151.jpg)
Ambiguity
the man
saw
the dog
the telescopewith32
![Page 152: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/152.jpg)
Ambiguity
the man
saw
0DT1
θDT➝the
the dog
the telescopewith32
![Page 153: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/153.jpg)
Ambiguity
the man
saw
0DT1
θDT➝the
1NN2
θNN➝man
the dog
the telescopewith32
![Page 154: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/154.jpg)
Ambiguity
2Vt3the man
saw
0DT1
θDT➝the
1NN2
θNN➝man
θVt➝saw
the dog
the telescopewith32
![Page 155: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/155.jpg)
Ambiguity
2Vt3the man
saw
0DT1
θDT➝the
1NN2
θNN➝man
θVt➝saw
the dog
3DT4
θDT➝the
the telescopewith32
![Page 156: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/156.jpg)
Ambiguity
2Vt3the man
saw
0DT1
θDT➝the
1NN2
θNN➝man
θVt➝saw
the dog
3DT4
θDT➝the
4NN5
θNN➝dog
the telescopewith32
![Page 157: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/157.jpg)
Ambiguity
2Vt3the man
saw
0DT1
θDT➝the
1NN2
θNN➝man
θVt➝saw
the dog
3DT4
θDT➝the
4NN5
θNN➝dog
the telescope
6IN7
withθIN➝with
32
![Page 158: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/158.jpg)
Ambiguity
θDT➝the
2Vt3the man
saw
0DT1
θDT➝the
1NN2
θNN➝man
θVt➝saw
the dog
3DT4
θDT➝the
4NN5
θNN➝dog
7DT8
the telescope
6IN7
withθIN➝with
32
![Page 159: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/159.jpg)
Ambiguity
θDT➝the
2Vt3the man
saw
0DT1
θDT➝the
1NN2
θNN➝man
θVt➝saw
the dog
3DT4
θDT➝the
4NN5
θNN➝dog
7DT8 8NN9
the telescopeθNN➝telescope
6IN7
withθIN➝with
32
![Page 160: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/160.jpg)
Ambiguity
θDT➝the
2Vt3the man
saw
0NP2
θNP➝DT NN
0DT1
θDT➝the
1NN2
θNN➝man
θVt➝saw
the dog
3DT4
θDT➝the
4NN5
θNN➝dog
7DT8 8NN9
the telescopeθNN➝telescope
6IN7
withθIN➝with
32
![Page 161: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/161.jpg)
Ambiguity
θDT➝the
2Vt3the man
saw
0NP2
θNP➝DT NN
0DT1
θDT➝the
1NN2
θNN➝man
θVt➝saw
3NP5
the dog
θNP➝DT NN
3DT4
θDT➝the
4NN5
θNN➝dog
7DT8 8NN9
the telescopeθNN➝telescope
6IN7
withθIN➝with
32
![Page 162: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/162.jpg)
Ambiguity
θDT➝the
2Vt3the man
saw
0NP2
θNP➝DT NN
0DT1
θDT➝the
1NN2
θNN➝man
θVt➝saw
3NP5
the dog
θNP➝DT NN
3DT4
θDT➝the
4NN5
θNN➝dog
7NP9
7DT8 8NN9
the telescope
θNP➝DT NN
θNN➝telescope
6IN7
withθIN➝with
32
![Page 163: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/163.jpg)
Ambiguity
θDT➝the
2Vt3the man
saw
0NP2
θNP➝DT NN
0DT1
θDT➝the
1NN2
θNN➝man
θVt➝saw
3NP5
the dog
θNP➝DT NN
3DT4
θDT➝the
4NN5
θNN➝dog
7NP9
7DT8 8NN9
the telescope
θNP➝DT NN
θNN➝telescope
6IN7
withθIN➝with
6PP9
θPP➝IN NP
32
![Page 164: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/164.jpg)
Ambiguity
θVP➝Vt NP
θDT➝the
2Vt3the man
saw
0NP2
θNP➝DT NN
0DT1
θDT➝the
1NN2
θNN➝man
θVt➝saw
3NP5
the dog
θNP➝DT NN
3DT4
θDT➝the
4NN5
θNN➝dog
7NP9
7DT8 8NN9
the telescope
θNP➝DT NN
θNN➝telescope
6IN7
withθIN➝with
6PP9
θPP➝IN NP
2VP5
32
![Page 165: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/165.jpg)
AmbiguityθVP➝VP PP
θVP➝Vt NP
θDT➝the
2VP9
2Vt3the man
saw
0NP2
θNP➝DT NN
0DT1
θDT➝the
1NN2
θNN➝man
θVt➝saw
3NP5
the dog
θNP➝DT NN
3DT4
θDT➝the
4NN5
θNN➝dog
7NP9
7DT8 8NN9
the telescope
θNP➝DT NN
θNN➝telescope
6IN7
withθIN➝with
6PP9
θPP➝IN NP
2VP5
32
![Page 166: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/166.jpg)
AmbiguityθVP➝VP PP
θVP➝Vt NP θNP➝NP PP
θDT➝the
2VP9
2Vt3the man
saw
0NP2
θNP➝DT NN
0DT1
θDT➝the
1NN2
θNN➝man
θVt➝saw
3NP5
the dog
θNP➝DT NN
3DT4
θDT➝the
4NN5
θNN➝dog
7NP9
7DT8 8NN9
the telescope
θNP➝DT NN
θNN➝telescope
6IN7
withθIN➝with
6PP9
θPP➝IN NP
5NP92VP5
32
![Page 167: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/167.jpg)
AmbiguityθVP➝VP PP
θVP➝Vt NP θNP➝NP PP
θVP➝Vt NP
θDT➝the
2VP9
2Vt3the man
saw
0NP2
θNP➝DT NN
0DT1
θDT➝the
1NN2
θNN➝man
θVt➝saw
3NP5
the dog
θNP➝DT NN
3DT4
θDT➝the
4NN5
θNN➝dog
7NP9
7DT8 8NN9
the telescope
θNP➝DT NN
θNN➝telescope
6IN7
withθIN➝with
6PP9
θPP➝IN NP
5NP92VP5
32
![Page 168: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/168.jpg)
AmbiguityθVP➝VP PP
θVP➝Vt NP θNP➝NP PP
θVP➝Vt NP
θDT➝the
0S9
2VP9
2Vt3
θS➝NP VP
the man
saw
0NP2
θNP➝DT NN
0DT1
θDT➝the
1NN2
θNN➝man
θVt➝saw
3NP5
the dog
θNP➝DT NN
3DT4
θDT➝the
4NN5
θNN➝dog
7NP9
7DT8 8NN9
the telescope
θNP➝DT NN
θNN➝telescope
6IN7
withθIN➝with
6PP9
θPP➝IN NP
5NP92VP5
32
![Page 169: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/169.jpg)
Complexity
33
![Page 170: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/170.jpg)
Complexity
Item form: [i, X ➝ α •β , j]
33
![Page 171: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/171.jpg)
Complexity
Item form: [i, X ➝ α •β , j]
• Each rule segments the input w1 .. wn
33
![Page 172: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/172.jpg)
Complexity
Item form: [i, X ➝ α •β , j]
• Each rule segments the input w1 .. wn
Every CFG can be written in CNF (max arity = 2)
33
![Page 173: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/173.jpg)
Complexity
Item form: [i, X ➝ α •β , j]
• Each rule segments the input w1 .. wn
Every CFG can be written in CNF (max arity = 2)
• In total we get up to 3 indices ranging from 0 .. n
33
![Page 174: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/174.jpg)
Complexity
Item form: [i, X ➝ α •β , j]
• Each rule segments the input w1 .. wn
Every CFG can be written in CNF (max arity = 2)
• In total we get up to 3 indices ranging from 0 .. n
• O(n3) annotated rules
33
![Page 175: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/175.jpg)
Bitext ParsingImagine we have two streams of text
the man sleeps ⇔ dort l' homme
We want to parse both strings simultaneously such that their trees are isomorphic
• same structure up to
• relabelling and permutation of siblings
34
![Page 176: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/176.jpg)
Isomorphic treesS
C E
A B D
e1 e2 e3
S
C'E'
B' A'D'
f2 f1f3
S'
C' E'
A' B' D'
f1 f2 f3
35
![Page 177: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/177.jpg)
Synchronous Grammar
A CFG paired with another
• RHS symbols map one-to-one
36
![Page 178: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/178.jpg)
Synchronous Grammar
A CFG paired with another
• RHS symbols map one-to-one
English French
36
![Page 179: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/179.jpg)
Synchronous Grammar
A CFG paired with another
• RHS symbols map one-to-one
English French
X ➝ A A copy
36
![Page 180: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/180.jpg)
Synchronous Grammar
A CFG paired with another
• RHS symbols map one-to-one
English French
X ➝ A A copy
X ➝ B C B C copy
36
![Page 181: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/181.jpg)
Synchronous Grammar
A CFG paired with another
• RHS symbols map one-to-one
English French
X ➝ A A copy
X ➝ B C B C copy
C B invert
36
![Page 182: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/182.jpg)
Synchronous Grammar
A CFG paired with another
• RHS symbols map one-to-one
English French
X ➝ A A copy
X ➝ B C B C copy
C B invert
X ➝ e f transduce36
![Page 183: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/183.jpg)
Parse EParse with the English side of the grammar
0S3 ➝ 0NP2 2VP3
0NP2 ➝ 0DT1 1NN2
2VP3 ➝ 2Vi30DT1 ➝ the1NN2 ➝ man2Vi3 ➝ sleeps
37
![Page 184: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/184.jpg)
Projection
38
![Page 185: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/185.jpg)
ProjectionEnglish French
38
![Page 186: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/186.jpg)
ProjectionEnglish French
0S3 ➝ 0NP2 2VP3 0NP2 2VP3
38
![Page 187: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/187.jpg)
ProjectionEnglish French
0S3 ➝ 0NP2 2VP3 0NP2 2VP3
2VP3 0NP2
38
![Page 188: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/188.jpg)
ProjectionEnglish French
0S3 ➝ 0NP2 2VP3 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2 0DT1 1NN2
38
![Page 189: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/189.jpg)
ProjectionEnglish French
0S3 ➝ 0NP2 2VP3 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2 0DT1 1NN2
1NN2 0DT1
38
![Page 190: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/190.jpg)
ProjectionEnglish French
0S3 ➝ 0NP2 2VP3 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi3 2Vi3
38
![Page 191: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/191.jpg)
ProjectionEnglish French
0S3 ➝ 0NP2 2VP3 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi3 2Vi30DT1 ➝ the le
38
![Page 192: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/192.jpg)
ProjectionEnglish French
0S3 ➝ 0NP2 2VP3 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi3 2Vi30DT1 ➝ the le
la
38
![Page 193: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/193.jpg)
ProjectionEnglish French
0S3 ➝ 0NP2 2VP3 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi3 2Vi30DT1 ➝ the le
lal'
38
![Page 194: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/194.jpg)
ProjectionEnglish French
0S3 ➝ 0NP2 2VP3 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi3 2Vi30DT1 ➝ the le
lal'
1NN2 ➝ man homme
38
![Page 195: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/195.jpg)
ProjectionEnglish French
0S3 ➝ 0NP2 2VP3 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi3 2Vi30DT1 ➝ the le
lal'
1NN2 ➝ man homme2Vi3 ➝ sleeps dort
38
![Page 196: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/196.jpg)
French GrammarFrench
0S3 ➝ 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi30DT1 ➝ le
lal'
1NN2 ➝ homme2Vi3 ➝ dort
39
![Page 197: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/197.jpg)
Parse FFrench
0S3 ➝ 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi30DT1 ➝ le
lal'
1NN2 ➝ homme2Vi3 ➝ dort
40
![Page 198: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/198.jpg)
Parse F
l' homme1 2 3
dort0
French
0S3 ➝ 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi30DT1 ➝ le
lal'
1NN2 ➝ homme2Vi3 ➝ dort
40
![Page 199: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/199.jpg)
Parse F
l' homme1 2 3
2Vi3
dort0
French
0S3 ➝ 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi30DT1 ➝ le
lal'
1NN2 ➝ homme2Vi3 ➝ dort
40
![Page 200: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/200.jpg)
Parse F
0DT1
l' homme1 2 3
2Vi3
dort0
French
0S3 ➝ 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi30DT1 ➝ le
lal'
1NN2 ➝ homme2Vi3 ➝ dort
40
![Page 201: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/201.jpg)
Parse F
0DT1 1NN2
l' homme1 2 3
2Vi3
dort0
French
0S3 ➝ 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi30DT1 ➝ le
lal'
1NN2 ➝ homme2Vi3 ➝ dort
40
![Page 202: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/202.jpg)
Parse F
0DT1 1NN2
l' homme1 2 3
2VP3
2Vi3
dort0
French
0S3 ➝ 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi30DT1 ➝ le
lal'
1NN2 ➝ homme2Vi3 ➝ dort
40
![Page 203: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/203.jpg)
Parse F
0NP2
0DT1 1NN2
l' homme1 2 3
2VP3
2Vi3
dort0
French
0S3 ➝ 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi30DT1 ➝ le
lal'
1NN2 ➝ homme2Vi3 ➝ dort
40
![Page 204: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/204.jpg)
Parse F0S3
0NP2
0DT1 1NN2
l' homme1 2 3
2VP3
2Vi3
dort0
French
0S3 ➝ 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi30DT1 ➝ le
lal'
1NN2 ➝ homme2Vi3 ➝ dort
40
![Page 205: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/205.jpg)
Cascade of Monolingual Parsers
41
![Page 206: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/206.jpg)
Cascade of Monolingual Parsers
CFG parsing can be seen as intersecting a CFG and an FSA [Bar-Hillel, 1961; Billot and Lang, 1989]
41
![Page 207: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/207.jpg)
Cascade of Monolingual Parsers
CFG parsing can be seen as intersecting a CFG and an FSA [Bar-Hillel, 1961; Billot and Lang, 1989]
CFGs are closed under intersection [Hopcroft and Ullman, 1979]
41
![Page 208: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/208.jpg)
Cascade of Monolingual Parsers
CFG parsing can be seen as intersecting a CFG and an FSA [Bar-Hillel, 1961; Billot and Lang, 1989]
CFGs are closed under intersection [Hopcroft and Ullman, 1979]
• L(CFG) ∩ L(FSA) is a context-free language
41
![Page 209: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/209.jpg)
Cascade of Monolingual Parsers
CFG parsing can be seen as intersecting a CFG and an FSA [Bar-Hillel, 1961; Billot and Lang, 1989]
CFGs are closed under intersection [Hopcroft and Ullman, 1979]
• L(CFG) ∩ L(FSA) is a context-free language
This neat property makes cascading intersection operations (parsers) appealing [Dyer, 2010]
41
![Page 210: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/210.jpg)
Cascade of Monolingual Parsers
CFG parsing can be seen as intersecting a CFG and an FSA [Bar-Hillel, 1961; Billot and Lang, 1989]
CFGs are closed under intersection [Hopcroft and Ullman, 1979]
• L(CFG) ∩ L(FSA) is a context-free language
This neat property makes cascading intersection operations (parsers) appealing [Dyer, 2010]
• e.g. bitext parsing
41
![Page 211: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/211.jpg)
Biproduct: alignmentsFrench
0S3 ➝ 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi30DT1 ➝ le
lal'
1NN2 ➝ 1NN2 ➝ homme2Vi3 ➝ 2Vi3 ➝ dort
42
![Page 212: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/212.jpg)
Biproduct: alignments
l' homme1 2 3
dort0
French
0S3 ➝ 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi30DT1 ➝ le
lal'
1NN2 ➝ 1NN2 ➝ homme2Vi3 ➝ 2Vi3 ➝ dort
42
![Page 213: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/213.jpg)
Biproduct: alignments
l' homme1 2 3
0,2Vi3,1
dort0
French
0S3 ➝ 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi30DT1 ➝ le
lal'
1NN2 ➝ 1NN2 ➝ homme2Vi3 ➝ 2Vi3 ➝ dort
42
![Page 214: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/214.jpg)
Biproduct: alignments
1,0DT1,2
l' homme1 2 3
0,2Vi3,1
dort0
French
0S3 ➝ 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi30DT1 ➝ le
lal'
1NN2 ➝ 1NN2 ➝ homme2Vi3 ➝ 2Vi3 ➝ dort
42
![Page 215: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/215.jpg)
Biproduct: alignments
1,0DT1,2 2,1NN2,3
l' homme1 2 3
0,2Vi3,1
dort0
French
0S3 ➝ 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi30DT1 ➝ le
lal'
1NN2 ➝ 1NN2 ➝ homme2Vi3 ➝ 2Vi3 ➝ dort
42
![Page 216: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/216.jpg)
Biproduct: alignments
1,0DT1,2 2,1NN2,3
l' homme1 2 3
0,2VP3,1
0,2Vi3,1
dort0
French
0S3 ➝ 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi30DT1 ➝ le
lal'
1NN2 ➝ 1NN2 ➝ homme2Vi3 ➝ 2Vi3 ➝ dort
42
![Page 217: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/217.jpg)
Biproduct: alignments
1,0NP2,3
1,0DT1,2 2,1NN2,3
l' homme1 2 3
0,2VP3,1
0,2Vi3,1
dort0
French
0S3 ➝ 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi30DT1 ➝ le
lal'
1NN2 ➝ 1NN2 ➝ homme2Vi3 ➝ 2Vi3 ➝ dort
42
![Page 218: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/218.jpg)
Biproduct: alignments0,0S3,3
1,0NP2,3
1,0DT1,2 2,1NN2,3
l' homme1 2 3
0,2VP3,1
0,2Vi3,1
dort0
French
0S3 ➝ 0NP2 2VP3
2VP3 0NP2
0NP2 ➝ 0DT1 1NN2
1NN2 0DT1
2VP3 ➝ 2Vi30DT1 ➝ le
lal'
1NN2 ➝ 1NN2 ➝ homme2Vi3 ➝ 2Vi3 ➝ dort
42
![Page 219: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/219.jpg)
Complexity• O(l3 x m3)
• where l is the length of the English string
• and m is the length of the French string
• Joint parsing or cascade of parsers has the same theoretical complexity
• Can cascading be more efficient on average? Why?
![Page 220: uva-slpl.github.iouva-slpl.github.io/nlp2/resources/slides/bitext-parsing.pdf · "Dotted items" Parsing a CNF grammar is easy because we know the shape of rules When that's not the](https://reader036.vdocuments.mx/reader036/viewer/2022071218/604e4a7c1b122459ba3c43ab/html5/thumbnails/220.jpg)
Bibliography• Hopcroft, John E. and Ullman, Jeffrey D. 1979. Introduction To Automata
Theory, Languages, And Computation.
• Shieber, S. and Schabes, Y. and Pereira, F. 1995. Principles and implementation of deductive parsing. In Journal of Logic Programming
• Bar-Hillel, Y. and Perles, M. and Shamir, E. 1961. On formal properties of simple phrase structure grammars.
• Billot, S. and Lang, B. 1989. The Structure of Shared Forests in Ambiguous ParsingThe Structure of Shared Forests in Ambiguous Parsing. In Proceedings of the 27th Annual Meeting of the Association for Computational Linguistics.
• Dyer, C. 2010. Two monolingual parses are better than one (synchronous parse). In Human Language Technologies: The 2010 Annual Conference of the North American Chapter of the Association for Computational Linguistics.