A Voting System for Automatic Correction of OCR...
Transcript of A Voting System for Automatic Correction of OCR...
A Voting System for A Voting System for Automatic Correction of OCRAutomatic Correction of OCR
OutputOutput
���� ����� ��������
����������������
IntroductionIntroductionOCR = Optical Character Recognition
����������������
���� ��� ���� �������� ��� ������� ����� ���� ���� ���������
������� ���������� �� ��� � !������
Known Techniques for Known Techniques for Spelling CorrectionSpelling Correction
Edit Distance:The minimum number of editing operations (i.e., insertion, deletion and substitution of letters) required to transform one string to another.
������������
����������������
�������� ��
Known Techniques for Spelling Correction Known Techniques for Spelling Correction (cont...)(cont...)
� Hashing:� Skeleton Key
�������� �� ���� ���
.
.cmnct oui a communi cat i on..
� "���� #������
�����
0 01 02 13 0
4 05 06 17 08 1
��� ������
��� ������
��� ������
������� ��
So, what is the problem ?So, what is the problem ?��
• Most of the techniques are relevant only for typing errors.
• Designed for isolatedwords.
• We are interested in a fullyautomatic system.
The Algor ithmThe Algor ithm
�������������� ����� �������������������� �!!���!�������� ���"#����������� �$����� %��� ������$����� ����� "&����������� �����������"
The Algorithm (cont...)
%�������&����� �����
� "���� ��� �����������
� ������ ��� ���$�����'���������
� ��������� ��� �'���� ��� (���'���� �������
� "���� ��� ��������� �����
)�������� �$ �� �����
*��������� ����������
+����� ��� ����
���������
The Algorithm (cont...)
)�������� ,�� ���������� �����)�������� ,�� ���������� �����
�������� ������1jw 2
jw
*�����)���������
�"'����� ������� �� ����"�"'����� ������� ����%� ��������!� �������$��� "�"'����� ������� ������ �����!� �������$��� "("'����� ������� ������ �% ������$��� "
���-)���������
����)���������
The Algorithm (cont...)
• If words are identical:Accept the word.
� )!� ����� ������� ��*
� +�� �������"
� ���,�������� ���-�������"
� ��!�����.� ��/"
� �� �/ "
1jw 2
jw0
1jw 2
jw0
The Algorithm (cont...)
If the words mismatch:
• If only one of them is valid�Then:Accept the valid one.
1jw 2
jw0
)_,(4.0
)_,(6.0)(
dictionaryglobalwfreq
dictionarylocalwfreqwdictionaryij
ij
ij
⋅
+⋅=
The Algorithm (cont...)
� )!% ��������$��� �'���*
1����� ����� � � ���!��% ���� ����� ������ � ���%�� ���"
1jw 2
jw0
)(
)(2
1
j
j
w
wCandidates
�����������������
����������������� �=
The Algorithm (cont...)
��
��� =
=otherwise. 0
.1),( if 1_
ij
ij k
wwnceedit_distacloseis
)),(_
)(
),,(_(0.4
)),,(_(6.0)(
11
ij
ij
ij
ij
ij
ij
iij
ij
ij
k
k
k
kk
wwcloseis
wdictionary
wwwgramword
OCRwwfreqerrorwmark
+
+⋅
+⋅=
+−
2����� ����!�����3��� ������ � � ��*
�"�+�� �������" �"�� � �+�� ����"
�"�4� 51���" ("���!�����.� ��/"
� I f bot h wor ds ar e val i d:
The Algorithm (cont...)
).,,(_
)_,()(
11ij
ij
ij
ij
ij
wwwgramword
dictionarylocalwfreqwcontext
+−
+=
)]_,(0.4
)(6.0[)()(
dictionaryglobalwfreq
wcontextOCRaccuracywmarkij
ij
iij
⋅
+⋅⋅=
The Algorithm (cont...)
����������������� ������������������ �
�0����6��
#���������0��6��73�����+*
� ����3���!����8�� ��/9�:"
� )# ���������������� ������ ���"
� )# �������� � ��� ����$��� ��� �� � � ������ � � ����� "
The The ExperimentsExperiments
� �������� ��������������������� ����
0.10%1.18%ge
0.48%1.58%1i
0.72%0.15%lf
0.72%0.30%z2
0.10%0.75%dda
0.77%3.54%o0
0.48%1.58%1i
OCR 2OCR 1Error StringSource String
The Environment of the The Environment of the ExperimentsExperiments
.�� ���$����� ����� $�� ������ �� �
Examples of successful Examples of successful correctionscorrections
det ai l sdet aHsd, t ai l sdet ai l s
pr eci sentpr eci ~entpr , c i sentpr eci sent
nei ghbor hoodnei &i bor ho~ne~hbor hoodnei ghbor hood
schoolsci i oolschooischool
t hankf ul l yt hankf i i l yt hankf v l l yt hankf ul l y
we’ r ewe’ ewe’ t ewe’ r e
sur vi vor ssur vi vor ssur veyor ssur vi vor s
goi nggor i nggoi nggoi ng
Accepted WordOCR 2OCR 1Original Word
������ ��� #����� �� ��
Examples of erroneous decisionsExamples of erroneous decisions
����� ��� �� ��������� $�� ������� �������
��/� ����!� �� ��������� (��� �������� $��� ��� ��� 0$�� ����1 (��� ���� ���� �������� ��� ���� �����2�3�
-�/� ������ ��� (���� (��� ���(��� �(� ����� �������������
4����� ��� �$ ��� (���� �� �� ��� ����������1 ��� �� �� ��� ��� ������� ����
5�/� 6���������7 ��� ��!�� (��� 0(���� (�� �������3 �� �� ��������� ����
8�/� �������� $��� � !��!�� ��������� $�� ��� ����!����� ��!�� (����
4zoozooi2ooi2001
4sansassavssays
ci r cus
t he
l i t he
t oe
t oo
dass
l an
5, 6oo
Accepted Word
3
2
2
2
2
1
1
1
Error type
ci r cusci r c. l esci r c l es
Wet heWe
l i s l el i t hel i t t l e
t oet r uet r ue
t oo100100
dassdasscl ass
l anl anI an
5, 6oo5, 6oo5, 600
OCR 2OCR 1Original Word
of the ResultsAnalysis�������� ����� �� ������� ������������������ ���
�������� ����� �� ������� ������������������ ���
�������� ����������������� ��
�������� ���������������� ��
�������� � ����� � ���� � ����� �� ��������� !��
������"� � ����� � ���#!��������������� ���
Analysis of the Results (cont…)
������$� � ����� � ���� �� ��������� !��� ������%�% � � ���
Analysis of the Results (cont…)
3.6%Both – full correction system7
5.1%Both – compar ison + dictionary’s frequencies6
7.2%Both – compar ison + simple dictionary lookup5
8.0%OCR 2 – dictionary + candidates generation4
8.5%OCR 1 – dictionary + candidates generation3
12.1%OCR 2 – no post-processing2
14.0%OCR 1 – no post-processing1
Error Rate
Analysis of the Results (cont…)
(D) false negative(C) false positiveIncorrect word
written to output
(B) true negative(A) true positiveCorrect word
written to output
Do not accept the OCR word, and try to suggest
candidates
Accept words from OCR as is
accepted rdscorrect wo #
OCR fromdirectly accepted rdscorrect wo # Recall =
+=
BA
A
OCR fromdirectly accepted words total#
OCR fromdirectly accepted rdscorrect wo #Precision =
+=
CA
A
Analysis of the Results (cont…)
Recall vs. Precision
84
86
88
90
92
94
96
98
100
90 92 94 96 98 100
Recall
Pre
cisi
on
model 1model 2model 3model 4model 5model 6model 7
Fur ther Work
• More OCR devices.• Context: NLP techniques, word classes.• Specifications for certain language.