Natural Language Processing
Historical Document Transcription
Dan Klein — UC Berkeley
Joint work with Taylor Berg-Kirkpatrick and Greg Durrett [ACL 2013]
Natural Language Processing Historical Document Transcription Dan - - PowerPoint PPT Presentation
Natural Language Processing Historical Document Transcription Dan Klein UC Berkeley Joint work with Taylor Berg-Kirkpatrick and Greg Durrett [ACL 2013] Historical Document Historical Document Old Bailey Court Proceedings 1775 Transcription
Historical Document Transcription
Dan Klein — UC Berkeley
Joint work with Taylor Berg-Kirkpatrick and Greg Durrett [ACL 2013]
Historical Document
Historical Document
Old Bailey Court Proceedings 1775
Transcription
Document Image
Transcription
Document Image
and Ch’: priftmer anhc bar. Jacob Lazarus and his IHP1 uh: prifoner. were both together when! rcccivcd lhczn. I fold eievén pair of than for xiirce guincas, and dclivcrcd the rcll'l:.in- d:r hack lo :11: prifuner. 1 fold ftvcn pairof filk to Mark Simpcr : nncpuir of mixcd. and. mo pair of Ifircad to lhz: foolnun, and on: pair of zhrzad to lh: barber. ' Q: What is the foolmarfs name? Fraum Mgfzr. I dun’: know. Hairy Hzrvir. l was flandingar the Camp Icr waizin far the thcrrilfs ufliceruo employ in: : Mo 3‘: daughter came for me to 0 am! take the prifoncr. 1 Wm! to |hc Old aailcy
Transcription (Google Tesseract)
Pipelined Approach
Pipelined Approach
Pipelined Approach
Pipelined Approach
Pipelined Approach
Pipelined Approach
Pipelined Approach
Pipelined Approach
Historical Document
Unknown Fonts
Unknown Fonts
Unknown Fonts
Unknown Fonts
Unknown Fonts
Wandering Baseline
Wandering Baseline
Wandering Baseline
Wandering Baseline
Uneven Inking
Uneven Inking
Uneven Inking
Uneven Inking
Various Historical Documents
1725 1875 1823 1883:
Our Approach
Our Approach
Our Approach
Our Approach
Generative Model
Generative Model
Generative Model
Generative Model
Language Model
Generative Model
Typesetting Model
Generative Model
Typesetting Model
Generative Model
Typesetting Model
Generative Model
Typesetting Model
Generative Model
Typesetting Model
Generative Model
Typesetting Model
Generative Model
Typesetting Model
Generative Model
Typesetting Model
Generative Model
Generative Model
Typesetting Model
Generative Model
Typesetting Model
Generative Model
Typesetting Model
Generative Model
Typesetting Model
Generative Model
Typesetting Model
Generative Model
Typesetting Model
Generative Model
Rendering Model
Generative Model
Rendering Model
Generative Model
Rendering Model
Generative Model
Generative Model
Language Model
P(E)
E
Generative Model
Language Model
P(E)
E
Typesetting Model
· P(T|E)
T
Generative Model
Language Model
P(E)
E
Typesetting Model
· P(T|E)
T X
Rendering Model
P(X|E, T)
Generative Model
Language Model
P(E)
E
Typesetting Model
· P(T|E)
T X
Rendering Model
P(X|E, T)
Language Model
E
Language Model
E
Language Model
ei
ei−1
ei+1
E
Language Model
ei
ei−1
ei+1
Kneser-Ney smoothed character 6-gram
E
Typesetting Model
ei
T
Typesetting Model
ei
T
Typesetting Model
1 5
Left pad width
li
ei
T
Typesetting Model
1 5
Left pad width
1
30
Glyph box width
gi li
ei
T
Typesetting Model
1 5
Left pad width
1 5
Right pad width
1
30
Glyph box width
gi li ri
ei
T
Typesetting Model
1 5
Left pad width
1 5
Right pad width
1
30
Glyph box width
gi li ri
ei
T
Typesetting Model
1 5
Left pad width
1 5
Right pad width
1
30
Glyph box width
gi li ri
ei
T
Typesetting Model
vi
1 5
Left pad width
1 5
Right pad width
1
30
Glyph box width
a a a
Vertical offset
gi li ri
ei
T
Typesetting Model
di vi
1 5
Left pad width
1 5
Right pad width
1
30
Glyph box width
a a
a
a a
a
a
a
a
a
a
a a
a
a a
a
a a
a
a
a
a
a
a
a
a
a
a a
a
a
a
a a
a
a
a
Inking level
a a a
Vertical offset
gi li ri
ei
Rendering Model
Rendering Model
Rendering Model
Glyph box
Rendering Model
gi
Glyph box width Glyph box
Rendering Model
gi
Glyph box width
vi
Vertical
Glyph box
Rendering Model
gi
Glyph box width
vi
Vertical
di
Inking level Glyph box
X
Rendering Model
gi
Glyph box width
vi
Vertical
di
Inking level Glyph box
X
Rendering Model
gi
Glyph box width
vi
Vertical
di
Inking level Glyph box Glyph shape parameters
X
Rendering Model
gi
Glyph box width
vi
Vertical
di
Inking level Glyph box Glyph shape parameters
X
Rendering Model
gi
Glyph box width
vi
Vertical
di
Inking level Glyph box Bernoulli pixel probs Glyph shape parameters
X
Rendering Model
gi
Glyph box width
vi
Vertical
di
Inking level Glyph box Sample pixels Bernoulli pixel probs Glyph shape parameters
X
Rendering Model
gi
Glyph box width
vi
Vertical
di
Inking level Glyph box Glyph shape parameters Sample pixels Bernoulli pixel probs
X
Rendering Model
gi
Glyph box width
vi
Vertical
di
Inking level Glyph box Glyph shape parameters Sample pixels Bernoulli pixel probs
X
Rendering Model
gi
Glyph box width
vi
Vertical
di
Inking level Glyph box Sample pixels Bernoulli pixel probs Glyph shape parameters
X
Rendering Model
gi
Glyph box width
vi
Vertical
di
Inking level Glyph box Sample pixels Bernoulli pixel probs Glyph shape parameters
X
Rendering Model
gi
Glyph box width
vi
Vertical
di
Inking level Glyph box Sample pixels Bernoulli pixel probs Glyph shape parameters
X
Rendering Model
gi
Glyph box width
vi
Vertical
di
Inking level Glyph box Sample pixels Bernoulli pixel probs Glyph shape parameters
X
Rendering Model
gi
Glyph box width
vi
Vertical
di
Inking level Glyph box Sample pixels Bernoulli pixel probs Glyph shape parameters
X
Rendering Model
gi
Glyph box width
vi
Vertical
di
Inking level Glyph box Sample pixels Bernoulli pixel probs Glyph shape parameters
X
Rendering Model
gi
Glyph box width
vi
Vertical
di
Inking level Glyph box Sample pixels Bernoulli pixel probs Glyph shape parameters
X
Rendering Model
gi
Glyph box width
vi
Vertical
di
Inking level Glyph box Sample pixels Bernoulli pixel probs Glyph shape parameters
X
Rendering Model
gi
Glyph box width
vi
Vertical
di
Inking level Glyph box Sample pixels Bernoulli pixel probs Glyph shape parameters
X
Rendering Model
gi
Glyph box width
vi
Vertical
di
Inking level Glyph box Glyph shape parameters Sample pixels Bernoulli pixel probs
X
Rendering Model
gi
Glyph box width
vi
Vertical
di
Inking level Glyph box Glyph shape parameters Sample pixels Bernoulli pixel probs
X
Rendering Model
gi
Glyph box width
vi
Vertical
di
Inking level Glyph box Glyph shape parameters Sample pixels Bernoulli pixel probs
Log-linear Interpolation
Log-linear Interpolation
Glyph shape parameters φ Bernoulli pixel probs θ
Log-linear Interpolation
Bernoulli pixel probs θ Glyph shape parameters φ
Log-linear Interpolation
Bernoulli pixel probs θ Glyph shape parameters φ
Log-linear Interpolation
Bernoulli pixel probs θ Glyph shape parameters φ
Log-linear Interpolation
Bernoulli pixel probs θ Glyph shape parameters φ
Log-linear Interpolation
Bernoulli pixel probs θ Glyph shape parameters φ Interpolation weights α
Log-linear Interpolation
Bernoulli pixel probs θ Glyph shape parameters φ Interpolation weights α Dot product α>φ
Log-linear Interpolation
Bernoulli pixel probs θ Glyph shape parameters φ Interpolation weights α Dot product α>φ Apply logistic
Log-linear Interpolation
Bernoulli pixel probs θ Glyph shape parameters φ Interpolation weights α
Log-linear Interpolation
Bernoulli pixel probs θ Glyph shape parameters φ Interpolation weights α
Log-linear Interpolation
Bernoulli pixel probs θ Glyph shape parameters φ Interpolation weights α
Log-linear Interpolation
Bernoulli pixel probs θ Glyph shape parameters φ
j
j
Interpolation weights α
Log-linear Interpolation
Bernoulli pixel probs θ Glyph shape parameters φ
j
j
Interpolation weights α
Log-linear Interpolation
Bernoulli pixel probs θ Glyph shape parameters φ
j
j
j φ]
Interpolation weights α
Learning and Inference
Learning and Inference
Learning and Inference
Learning and Inference
Learning and Inference
mixtures of modern fonts
Learning and Inference
mixtures of modern fonts
expectations
Learning and Inference
mixtures of modern fonts
expectations
to-fine approach
System Output Example
System Output Example
1 5 1 5 1 30System Output Example how the murderers came to
1 5 1 5 1 30System Output Example how the murderers came to
1 5 1 5 1 30System Output Example how the murderers came to
1 5 1 5 1 30System Output Example how the murderers came to
1 5 1 5 1 30System Output Example how the murderers came to
1 5 1 5 1 30System Output Example
System Output Example
1 5 1 5 1 30System Output Example
taken ill and taken away -- I remember
1 5 1 5 1 30System Output Example
taken ill and taken away -- I remember
1 5 1 5 1 30System Output Example
taken ill and taken away -- I remember
1 5 1 5 1 30System Output Example
taken ill and taken away -- I remember
1 5 1 5 1 30Experiments
Experiments
Test data
Experiments
Test data
20 images, 30 lines each
Experiments
Test data
20 images, 30 lines each
Experiments
Test data
20 images, 30 lines each
10 images, 30 lines each
Experiments
Test data
20 images, 30 lines each
10 images, 30 lines each
Experiments
Baselines Test data
20 images, 30 lines each
10 images, 30 lines each
Experiments
Baselines Test data
20 images, 30 lines each
10 images, 30 lines each
Experiments
Baselines Test data
20 images, 30 lines each
10 images, 30 lines each
Experiments
Baselines Language models Test data
20 images, 30 lines each
10 images, 30 lines each
Experiments
Baselines
York Times
Language models Test data
20 images, 30 lines each
10 images, 30 lines each
Experiments
Baselines
York Times 34M words NYT Gigaword
Language models Test data
20 images, 30 lines each
10 images, 30 lines each
Experiments
Baselines
York Times 34M words NYT Gigaword
Language models Test data
20 images, 30 lines each
10 images, 30 lines each
Experiments
Baselines
York Times 34M words NYT Gigaword
32M words manually transcribed
Language models Test data
Results
10 20 30 40 50 60
Word Error Rate
Old Bailey Court Proceedings (1715-1905)
Results
10 20 30 40 50 60
54.8
Word Error Rate
Old Bailey Court Proceedings (1715-1905)
Google Tesseract
Results
10 20 30 40 50 60
40.0 54.8
Word Error Rate
Old Bailey Court Proceedings (1715-1905)
Google Tesseract ABBYY FineReader
Results
10 20 30 40 50 60
28.1
40.0 54.8
Word Error Rate
Old Bailey Court Proceedings (1715-1905)
Google Tesseract ABBYY FineReader Ocular w/ NYT
[Berg-Kirkpatrick et al. 2013]
Results
10 20 30 40 50 60 24.1
28.1
40.0 54.8
Word Error Rate
Old Bailey Court Proceedings (1715-1905)
Google Tesseract ABBYY FineReader Ocular w/ NYT Ocular w/ OB
[Berg-Kirkpatrick et al. 2013]
Trove Historical Newspapers (1803-1893)
Results
10 20 30 40 50 60
Word Error Rate
Trove Historical Newspapers (1803-1893)
Results
10 20 30 40 50 60
59.3
Word Error Rate
Google Tesseract
Trove Historical Newspapers (1803-1893)
Results
10 20 30 40 50 60
49.2 59.3
Word Error Rate
Google Tesseract ABBYY FineReader
Trove Historical Newspapers (1803-1893)
Results
10 20 30 40 50 60
33.0 49.2 59.3
Word Error Rate
Google Tesseract ABBYY FineReader Ocular w/ NYT
Trove Historical Newspapers (1803-1893)
Results
10 20 30 40 50 60
25.6 49.2 59.3
Word Error Rate
Google Tesseract ABBYY FineReader Ocular w/ NYT
[Berg-Kirkpatrick et al. 2014]
Transcription
and Ch’: priftmer anhc bar. Jacob Lazarus and his IHP1 uh: prifoner. were both together when! rcccivcd lhczn. I fold eievén pair of than for xiirce guincas, and dclivcrcd the rcll'l:.in- d:r hack lo :11: prifuner. 1 fold ftvcn pairof filk to Mark Simpcr : nncpuir of mixcd. and. mo pair of Ifircad to lhz: foolnun, and on: pair of zhrzad to lh: barber. ' Q: What is the foolmarfs name? Fraum Mgfzr. I dun’: know. Hairy Hzrvir. l was flandingar the Camp Icr waizin far the thcrrilfs ufliceruo employ in: : Mo 3‘: daughter came for me to 0 am! take the prifoncr. 1 Wm! to |hc Old aailcy
Google Tesseract
Transcription
and Ch’: priftmer anhc bar. Jacob Lazarus and his IHP1 uh: prifoner. were both together when! rcccivcd lhczn. I fold eievén pair of than for xiirce guincas, and dclivcrcd the rcll'l:.in- d:r hack lo :11: prifuner. 1 fold ftvcn pairof filk to Mark Simpcr : nncpuir of mixcd. and. mo pair of Ifircad to lhz: foolnun, and on: pair of zhrzad to lh: barber. ' Q: What is the foolmarfs name? Fraum Mgfzr. I dun’: know. Hairy Hzrvir. l was flandingar the Camp Icr waizin far the thcrrilfs ufliceruo employ in: : Mo 3‘: daughter came for me to 0 am! take the prifoncr. 1 Wm! to |hc Old aailcy
Google Tesseract
the prisoner at the bar. Jacob Lazarus and his wife, the prisoners were both together when I received them. I sold eleven pair of them for three guineas, and delivered the remain- der back to the prisoner. I sold, seven pair of silk to Mark Simpert one pair of mixed, and two pair of thread to the footman, and one pair of thread to the barber,
Franco Asyut, I don't know- Nearly Norris. I was standing at the Comp- ter waiting for the sherrill's officers to employ me a Moses's daughter came for me to go and take the prisoner. I went to the Old Bailey
Ocular
Learned Fonts
Initializer
Learned Fonts
Initializer
Learned Fonts
Initializer
1700 1740 1780 1820 1860 1900
Learned Fonts
Initializer
Unobserved Pixels
Unobserved Pixels
Unobserved Pixels
Unobserved Pixels
Conclusion
Conclusion
results on documents where font is unknown
Conclusion
results on documents where font is unknown
printing-press era documents is effective
Conclusion
results on documents where font is unknown
printing-press era documents is effective
nlp.cs.berkeley.edu/ocular.shtml
Conclusion