I n d on e s i an   Jo u r n al   o El e c t r i c al   En gi n e e r i n g   an d   C o m p u te r   S c i e n c e   V o l .   21 ,   N o .   1 J a n u a r y   202 1 pp .   23 3 ~ 24 1   IS S N :   25 02 - 4752 ,   D O I :   10. 1 1591 / i j e e c s . v 21 .i 1 . pp 23 3 - 241             233       Jou r n al   h o m e pa ge ht t p: / / i j e e c s . i a e s c or e . c om   C o r p u s - b a s e d   t e c h n i q u e   f o r   i m p r o v i n g   A r a b i c   OC R   s y st e m       A h m e d   H u s s ai n   A l i w y 1 ,   Bas h e e r   A l - S ad aw i 2   1 F a c ul t y   of   C S   a n M a t h e m a t i c s   D e pa r t m e nt   o f   C o m put e r   S c i e nc e ,   U ni v e r s i t y   o f   K uf a ,   K uf a ,   I r a q   2 I nf o r m a t i o T e c hno l o gy   R e s e a r c a n D e v e l o pm e nt   C e nt r e ,   U n i v e r s i t y   o f   K uf a   U ni v e r s i t y   o f   K uf a ,   K uf a ,   I r a q       A r ti c l e   I n fo     A B S TR A C T   Ar t i c l e   h i s t or y :   R e c e i v e A pr   8 ,   2020   R e v i s e J u n   24 ,   2020   A c c e pt e J ul   8 ,   2020       A o pt i c a l   c ha r a c t e r   r e c o g ni t i o ( O C R )   r e f e r s   t o   a   pr o c e s s   o f   c o n ve r t i ng   t he   t e x t   do c um e nt   i m a g e s   i n t o   e d i t a bl e   a nd  s e a r c ha bl e   t e x t .   O C R   p r o c e s s   po s e s   s e v e r a l   c ha l l e ng e s   i pa r t i c ul a r   i t h e   A r a bi c   l a ng ua g e   due   t o   i t   h a s   c a us e a   hi g pe r c e nt a g e   o f   e r r o r s .   I t hi s   p a pe r ,   a   m e t ho d,   t o   i m p r o v e   t he   o ut put s   o f   t he   a r a b i c   o pt i c a l   c ha r a c t e r   r e c o g ni t i o ( A O C R )   S y s t e m s   i s   s ug g e s t e ba s e d   o a   s t a t i s t i c a l   l a ng ua g e   m o de l   bu i l t   f r o m   t he   a v a i l a b l e   hug e   c o r po r a .   T h i s   m e t ho i nc l u de s   d e t e c t i ng   a nd  c o r r e c t i ng   no n - w o r a nd   r e a l   w o r ds   e r r o r   a c c o r di ng   t o   t he   c o nt e xt   o f   t he   w o r i t he   s e nt e nc e .   T h e   r e s ul t s   s ho w   t ha t   t he   pe r c e n t a g e   o f   i m pr o v e m e nt   i t h e   r e s u l t s   i s   u t o   ( 98 % )   a s   a   ne w   a c c ur a c y   f o r   A O C R   o ut put .     Ke y w or ds :   A O CR   po s t - pr o c e s s i n g   A ra b i c   o pt i c a l   c ha r a c t e r   r e c o gn i t i o n   N - gra m   l a n gu a ge   m o de l   N L P - b a s e O CR   N o n - w o r e rr o r   R e a l - w o r e rr o r   T hi s   i s   an   ope n   ac c e s s   ar t i c l e   u nde r   t he   C C   B Y - SA   l i c e ns e .     Cor r e s pon di n g   Au t h or :   B a s h e e r   A l - S a d a w i   In f o r m a t i o T e c hn o l o gy   R e s e a r c h   a n d   D e v e l o pm e n t   Ce n t r e   U n i v e r s i t y   of   K uf a ,   K uf a ,   I ra q   E m a i l :   b a s h e e r. a l a s d i @ uo kuf a . e du       1.   I N TR O D U C TI O N   In   t h e   t e c h   e ra ,   d i v e r s e   t e c h ni que s   ha v e   be e n   pr o duc e i n c r e a s i n gl y   t o   a c c e s s   a n a c qui s i t i o n   o f   t h e   i n f o r m a t i o n   b e s i de s   i t   l e a ds   t e xt e n t h e   r e vo l ut i o n   o f   s c i e n c e   a n kn o w l e dge   t h a t   a f f e c t   h um a n   l i f e   f a c i l i t i e s   a n a n i m a t i o n s .   T h e s e   t e c h s   s uc h   a s   t e c hni que s   o f   da t a   m i ni n g ,   de e l e a rni n g ,   A I ,   c l a s s i f i c a t i o n s ,   N a t u ra l   L a n g ua ge   p r o c e s s i n a nd  e t c .   [1 2] .   F o r   s e ve r a l   de c a de s ,   n e w s pa pe r   a rt i c l e s ,   b oo ks ,   a n r e s e a r c h e s   h a v e   b e e n   di g i t i z e t o   m a ke   r e s o ur c e s   a v a i l a b l e   t o   r e s e a r c h e r s   a n d   r e a de r s .   T h e   di gi t i z a t i o n   p r o c e s s   i s   do n e   b y   o pt i c a l   c ha r a c t e r   r e c o gn i t i o n   s y s t e m   i s   b r a n c h   o f   pa t t e rn   r e c o gn i t i o n   a n a rt i f i c i a l   i n t e l l i ge n c e   t h a t   c o n v e r t   t h e   i m a ge   o f   t h e   t e xt   i nt o   a n   m a c hi n e - r e a d a b l e   t e xt ,   w h i c h   m a ke s   t h e s e   t e xt s   us a b l e   t o   b e   pr o c e s s e d   by   o t h e t o o l s   o r   t a s s uc h   a s   i n de xi ng,   m a c hi n e   t r a n s l a t i o n ,   a n s e a r c h   e n g i n e   [3] .   O pt i c a l   c h a ra c t e r   r e c o gni t i o n   i s   di f f i c ul t   t a s k   f o r   m a n y   r e a s o n s   s uc h   a s   l o w   s c a n ni n a n p r i nt i n qu a l i t y .   t hus ,   l e a t o   n o   goo r e s ul t   f o r   t e xt   r e c o gn i t i o n.   T hi s   di f f i c ul t y   i s   i n c r e a s e i n   c a s e   o f   r e c o gn i t i o n   o f   a   h i g h   i n f l e c t e l a ngua ge   s uc h   a s   A r a b i c   l a n gu a ge ,   due   t o   t h e   m o r p h o l o gi c a l   a n s c ri pt   c h a ra c t e ri s t i c s   o A r a b i c   l a ngua ge   [4] .   A s   w e l l   a s ,   S o m e   A O CR   s y s t e m s   pr o duc e   m ul t i pl e   b a o ut put s   f o r   t h e   s a m e   do c um e n t   i m a ge   [5] .   T hi s   i s   w h e r e   n a t u r a l   l a n gu a ge   p r o c e s s i n (N L P )   t ha t   p r e s e nt e c o n s i de ra b l e   pr o gr e s s   i n   m a c h i n e   l e a rn i ng  [6]   t o   i m p r o v e   O C o ut put .   I n   t h i s   pa pe r,   a   po s t - p r o c e s s i n s y s t e m   i s   s ugge s t e fo r   i m p r o v i ng  A O CR   o ut put   b a s e o n   a   l a ngua ge   m o de l   (L M b ui l t   f r o m   h uge   c o r po ra   c o m b i n e f r o m   s e v e r a l   s o ur c e s .   O CR   pr o c e s s   c o n v e r t s   i m a ge   o f   pr i n t e o h a ndw r i t t e n   t e xt   i n t o   di g i t a l   t e xt   t ha t   c a n   b e   m o di f i e d,   pr o c e s s e d,   s e a r c h e d,   a nd  c o pi e [7] .   A l t h o ug h   t h e r e   a r e   s t i l l   s e v e r a l   s h o r t c o m i n gs   o f   t h e   t e c hn o l o g y   t h a t   n e e t o   b e   t r e a t e a n d   r e s o l ve t o   ra i s e   a c c ur a c y ,   O CR   i s   a   m e s m e ri z i ng  t e c hn o l o g y   t ha t   h a s   s h o ul de r e c o m put e r s   t o   di gi t i z e   t e xt s   [8] .   T h e   m a ni pul a t i o n   p r o c e s s   i n c l ude s   s e gm e nt a t i o n   i m a ge   i nt o   l i n e s ,   w o r ds   a nd  pa r t s   of  w o r ds ,   t h us   s e gm e nt i ng  t h e   w o r i m a ge   i n t o   i m a ge s   of  c h a ra c t e r s .   C ha ra c t e r   i m a ge s   a r e   s e que n t i a l l y   Evaluation Warning : The document was created with Spire.PDF for Python.
                                IS S N :   2502 - 4752   In do n e s i a J   E l e c   E ng  &   Co m S c i ,   V o l .   21 ,   N o .   1 J a n u a r y   2021   :     23 3   -   241   234   r e c o gn i z e by   c l a s s i f i e r s   t o   c o n v e r t   t h e m   i nt o   t e xt   e n c o di n gs .   T h e   r e s ul t s   o f   O C R   s y s t e m s   m a y   b e   n o t   s a t i s f a c t o r y   w h e n   t h e s e   s y s t e m s   w o r o l o w - qua l i t y   do c u m e nt s   s uc a s   o l do c um e n t s   o t h e s e   s y s t e m s   w o r a c c o r di n t o   i n c o m pe t e nt   s e gm e nt a t i o n   a l go r i t h m s   a n t h us   w i l l   l e a t o   m a n y   n o n - r e c o gn i z e l e t t e r   i m a ge   w h i c r e duc e   t h e   a c c u r a c y   a s   a   r e s ul t   o f   m i s m a t c w i t s a m pl e s .   T h e r e   a r e   t w o   t y p e s   o f   e r r o r s :   ( i n o n - w o r ds   e rr o r s   a nd  (i i r e a l   w o r e rr o r .   F i r s t ,   n on - w o rd  e rr o rs   a re   t h e   w o rds   t ha t   c a nno t   b e   c o n s i de re d   v a l i d   w o rds ,   b e c a u s e   t h e s e   w o rds   do e s   n o t   e x i s t   i t h e   l e x i c o n   [9 ] .   I t hi s   t y pe   o f   e rr o r s   s o m e   l e t t e rs   a re   r e pl a c e w i t h   s y m b o l s   o r   nu m b e r s .   F o e x a m pl e ,   O CR   s y s t e m   r e c o g ni z e   t he   w o r ds   " ب ا ت ك " - " b o o k" )   a nd   ( ب ع ل ي "" -   " p l a y " )   a s   ب ك   a nd   عل ي 7 ”  r e s pe c t i v e l y .   T hi s   t y pe   o f   e rr o e a s y   t o   de t e c t   b e c a us e   t he   p r o b a b i l i t y   o f   a   w o r c o nt a i ni ng  s y m b o l s   o r   nu m b e r s   i s   v e r y   s m a l l   o r   z e r o   [1 0] .   It   m a y   a l s o   a ppe a w h e n   a   l e t t e r   o f   t he   o ri g i na l   w o rd  i s   r e p l a c e b y   o t h e l e t t e rs ,   b u t   t h e   re s u l t i ng  i s   a   n o n - v a l i w o r i t h e   l a ng ua ge .   F o e x a m p l e ,   t h e   w o rd   (" س ر د ي   " s t udy " )   r e c o g ni z e d   a s   (" س ر د ظ "   ) .   T he   de t e c t i o o f   t h e s e   t y pe s   o f   e rro r s   de pe nd s   o t h e   e f f i c i e n c y   o f   t h e   us e d   d i c t i o na r y .   S e c o n d,   r e a l - w o r (a l s o   c a l l e c o n t e xt - s e n s i t i v e   o r   s e m a nt i c   e r r o r   i s   a   c l a s s   o e r r o r   t h a t   e s c a pe s   t h e   t y pi c a l   e rr o r s   c h e c ke r   w h i c h   b a s e o di c t i o na r y   l oo k - up  [11] .   T hi s   t y pe   of   e r r o w o r i s   d i f f i c ul t   t o   de t e c t   b e c a us e   t h e   r e s ul t i n g   w o r i s   a n o t h e r   v a l i f r e que n t   w o r i n   t h e   l a n gu a ge   b ut   s e m a nt i c a l l y   o r   gra m m a t i c a l l y   i n c o rr e c t   w i t h   r e s pe c t   t o   i t s   c o n t e xt   [ 10] .   F o e xa m pl e ,   c a s e   o f   O CR   s y s t e m   r e c o gn i z e s   t h e   w o r (" ة قفص   " de a l " )   a s   t h e   w o r (" ة ع ن ص   " c ra f t " i t h e   c o n t e xt   (" ة م و ؤ ش م ل ا   ن ر ق ل ا   ة قفص   " T h e   f a t e f ul   de a l   o t h e   c e n t u r y " w h e r e   t h e s e   w o r ds   a r e   v e r y   c l o s e   i n   s c r i p t i ng.   T h e s e   e rr o r   w o r ds   c a nn o t   b e   ha n d l e s e pa r a t e l y   t o   c l a s s i fy   t h e m   a s   e rr o r s   b e c a us e   t h e   p r o c e s s   of   di s c l os ure   n e e ds   m o r e   c o n t e xt ua l   i n f o r m a t i o n.   Co nt e xt - b a s e m e t h o ds   a r e   us e f o r   de t e c t i n g   t hi s   t y pe   o f   e r r o r       2.   R ELA TED   WO R K S   S e v e ra l   s y s t e m s   a nd  w o rks   ha v e   b e e n   p r o po s e t o   i m p r o v e   t h e   o u t pu t   o f   O CR   s y s t e m   f o r   A ra b i c   l a ng ua ge .   T he   m o s t   c o m m o us e O CR   s y s t e m s   f o A ra b i c   l a ng u a ge   a re   O m ni p a ge   a nd   S a k hr  A u t o m a t i c   R e a de r   t ha t   e v a l u a t e b y   K a nu ngo   e t   a l .   (1 99 9)  [1 2 ] .   S u z a n   V e r b e rne   ( 20 0 2)  [1 3]   c o n s t ruc t e a   c o nt e x t - s e n s i t i v e   s pe l l   c h e c k i ng  B E S L   b y   us i ng  t he   p r o b a b i l i t i e s   o f   t ri g ra m   w o rds   t o   de t e c t   a nd  c o rr e c t   r e a l - w o r e rro r s .   T a hi ra   N a s e e m   (2 00 4 [1 4]   e m p l o y e t w o   m e t h o ds   f o s pe l l   c h e c k   o f   U rd l a ng ua ge   ( i )   S o u nde a l go ri t hm   t e c hni q ue s   a nd  ( i i S i ng l e   E d i t   D i s t a nc e   f o s pe l l i ng  c o rre c t i o n.   M a g dy   a nd  D a r w i s ( 20 0 6)  [4 ]   i nt ro d uc e a   po s t   p r o c e s s i ng  s y s t e m   c o n s i s t i ng  o f   t hre e   m o de l s   t o   i m p r o v e   t h e   o u t pu t   b a s e o n   t he   L e v e n s ht e i n   e d i t   d i s t a n c e   m o de l ,   t ri g ra m   l a ng u a ge   m o de l ,   a nd  s ha l l o w   m o rp h o l o g i c a l   m o de l .   S ha a l a n   e t   a l .   (2 0 12 [ 15 ]   p r o po s e po s t - p r o c e s s i ng  s y s t e m   f o ( i de t e c t i ng   m i s s pe l l   w o rds   b y   di re c t   d e t e c t i o a nd   l a ng u a ge   m o de l   b a s e de t e c t i o n,   a nd  (i i c o rre c t i o n   m o de l   c o n s i s t s   o f   ge n e ra t i ng  c a nd i d a t e s   a nd  s e l e c t i o n   b y   n o i s y   c ha nne l   a nd  t h e m i ni m u m   e di t   di s t a nc e .   D o u s h   a nd  A l - T ra (2 01 6)  [ 16 ]   D e v e l o pe A O C R   po s t - p r o c e s s i ng  s y s t e m   b a s e t hre e   s t ra t e g i e s   G o o gl e   o nl i ne   s u gge s t i o s y s t e m ,   A y a s pe l l   s pe l l   c h e c ke w i t G o o g l e   o nl i ne   s u gge s t i o s y s t e m   a nd   M i c r o s o f t   O f f i c e   W o r d   w i t G o o gl e   o nl i n e   s u gge s t i o s y s t e m .   I m a Q a s i m   (2 0 16 [1 7]   p r o po s e d   a   h y b ri m o de l   f r o m   c o m b i n e t hre e   i m p r o v e t e c hni q ue s   o f   a l i g nm e nt ,   d i f f e r e nt i a t i o n,   a nd   v o t i ng  t o   o v e r c o m e   t h e   i de nt i f i e d   d ra w b a c k s   t o   r e c o g ni z e   t he   o p t i c a l   c ha ra c t e r s   i t he   A ra b i c   l a ng u a ge .   A n w a a H a m di   ( 2 01 6)   [ 18 ]   de v e l o pe t he   s t a t i s t i c a l   A ra b i c   L a ng u a ge   M o de l   b y   h y b ri d i z a t i o n   c o nt e x t   a pp r o a c w i t h   E rro r   M o de l   a p p r o a c h   t o   i m p r o v i ng   t h e   o ut p ut   o f   A O CR   s y s t e m s .   S o ni a   Y o u s f   e t   a l .   ( 20 1 7)  [1 9]   p r e s e nt e i m p r o v i ng  L o ng - S h o rt   T e rm   M e m o r y   (L S T M o f   A O CR   o f   t e xt   i v i de o s   by   r e c u rre nt   c o nn e c t i o ns   l a ng u a ge   m o de l l i ng  b y   f o c us i n o n   t w o   f a c t o rs   R e c u rr e nt   N e u ra l   N e t w o rk  (R N N )   f o l a ng u a ge   m o de l l i ng  a nd   de c o d i ng  s c h e m a .   D o us h,   A l k ha t e e b ,   a nd  H a m d i   (2 01 8)  [2 0]   P r o po s e m o de l   o f   l a ng u a ge - i nde pe nde nt   a   A O C R   po s t - p r o c e s s i ng  s y s t e m   by   t w o   f ra m e w o rks   t he   L a ng u a ge   m o de l   a nd   h y b ri d   e rr o m o de l   w i t c o nt e x t u a l   m o de l .       3.   A R C H I TEC TU R O F   T H E   P R O P O S ED   S Y S TE M   In   t h i s   p a pe r,   a   po s t - p r o c e s s i n o f   O C R   o ut put s   w i t h   na t ura l   l a n g ua ge   p r o c e s s i n t e c hni que s   i s   s ugge s t e d.   T h e   pr o po s e pos t - pr o c e s s i n c o n s i s t s   o f   t w o   pa r t s   (i t h e   f i r s t   p a r t   i s   t h e   c o n s t r uc t i o n   o f   a   l a n gu a ge   m o de l   fo r   m a s s i v e   da t a   a f t e r   c o l l e c t i n o f   t h e m .   ( i i T h e   s e c o n pa rt   i s   t h e   de t e c t i o n   a nd  c o rr e c t i o of   e rr o r s .   T h e   s t r uc t u r e   o f   pr o po s e pos t - pr o c e s s i n s y s t e m   i s   s h o w n   i n   F i gu r e   1 .         Evaluation Warning : The document was created with Spire.PDF for Python.
In do n e s i a J   E l e c   E ng  &   Co m S c i     IS S N :   2502 - 4752       C or pus - bas e d   t e c h ni qu e   f or   i m pr ov i ng   A r ab i c   O C R   s y s t e m   ( A hm e d   H us s ai n   A l i w y )   235       F i gu r e   1 .   S t ruc t u r e   o f   po s t - pr o c e s s i n s y s t e m       3. 1 .       C o n s tr u c ti o n   o l an gu age   m o d e l   (L M )   T h e   f i r s t   pa rt   of   t h e   pr o po s e s y s t e m   i s   c o n s t r uc t i o n   o f   L M   f r o m   h uge   A r a b i c   t e xt s .   It   c o n s i s t s   o fo ur   s t e ps ;   da t a   c o l l e c t i o n ,   p r e p r o c e s s i n g ,   di c t i o n a r y   c o n s t r u c t i o n ,   a n n - g ra m   l a n gu a ge   m o de l   c o n s t r uc t i o n.   T h e s e   s t e ps   a r e   de s c ri b e i n   t h e   f o l l ow i n g   s e c t i o n s .       3. 1 . 1.   D ata   c o l l e c t i o n   H uge   t e xt s   w e r e   c o l l e c t e f r o m   m a n y   s o ur c e s   f o r   c o n s t r uc t i o n   a   s u i t a b l e   c o r pus   f o r   o ur   w o r k.   T h e   c o l l e c t e t e xt s   w e r e   i n   di f f e r e n t   e x t e n s i o n s   (D o c ,   D o c x,   t xt ,   a n P df ).   N u m b e r   o f   w o r ds   i n   t h e   c o l l e c t e d   c o r p o r a   i s   1, 099 , 054 , 713   w o r i n   d i f f e r e n t   do m a i n s .   T h e s e   s o ur c e s   a r e   A L   S H A M IL A   L IBR A RY   (994, 0 11, 9 55  w o r ds c o l l e c t e f r o m   Is l a m i c   bo o ks ,   A N T   C o r pus   v 1. a n v 1. [21 ,   22]  (1 , 474 , 000  w o r ds c o l l e c t e f r o m   n e w s   a r t i c l e s   of   T un i s i a n   w e r a d i o   s i t e   J a w h a r a   F M ,   A N T   Co r pus   v [23]  (9, 67 0, 00 w o r ds f r o m   N e w s   a r t i c l e s   a n d ,   A r a Co r pus   (93, 898 , 758   w o r ds c o l l e c t e f r o m   N e w s   a n d   e s s a y s   a r t i c l e s .     3. 1 . 2 P r e p r o c e s s i n g   T h e   p r e - p r o c e s s i n s t a ge   a i m s   t o   r e duc e   t h e   n o i s e   i t h e   c o m b i n e t e xt   o f   Co r pus   f i l e s .   T hi s   s t a ge   i n c l u de s   t h e   f o l l o w i n o pe ra t i o n s :   a)   T a t w e e l   r e m o v a l :   r e m o v i n g   t h e   s y m b o l   t ha t   m a ke   w o r m o re   s t r e t c [2 4] .   (e . g.   t h e   w o r (" ل ا ـ ـ ـ ـ ـ ـ ـ ـ ـ ـ ـ ق   " s a y " b e c o m e   (" ل ا ق   "   s a y "   ))   b)   D i a c ri t i c s   r e m o v a l :   r e m o v i ng  s pe c i a l   m a rks   t ha t   a ppe a r   w i t h   A ra b i c   l e t t e r s   (e . g.   t h e   p hra s e   ("   ن ِ إ َ ف   ا م   م ُ ك َ ل   ْ م ُ ت ْ ل َ أ َ س " b e c a m e   (" م ت ل أ س   ا م   م ك ل   ن إ ف " ).   c)   N um b e r s   r e m o v a l :   t h e   e l i m i na t i o n   o f   n um b e r s   f r o m   t h e   t e x t   s uc h   a s   da t e s ,   n u m b e r i n a n r e f e r e n c e s   n u m b e r s .   d)   F o r e i gn  t e xt   r e m o v a l :   e l i m i na t i o o f   f o r e i gn   s c r i p t s   ( n o n -   A r a b i c   s c r i pt s f r o m   t h e   t e xt   (e . g .   t h e   a b b r e v i a t i o n   B B C).   e)   S pe c i a l   s y m b o l s   r e m o v a l :   r e m o v i n g   s y m b o l s   t h a t   i s   n o t   c o n s i de r e s e n t e n c e   bo un da ri e s   s uc h   a s   (# ,   @ , !   ,   $ , % , ^ , & , * , | , ~ , + , = ).   f)   S i ngl e   l e t t e r   r e m o v a l :   e l i m i na t i o n   o f   t h e   s i n g l e   l e t t e r s   b e c a u s e   t h e   m i ni m um   l e n gt h   o f   a   w o r i n   A ra b i c   i s   t w o   l e t t e r s   [25] .     3. 1 . 3 D i c ti o n ar y   c o n s tr u c ti o n     A f t e r   r e duc i n t h e   n o i s e   f r o m   t h e   c o r pus ,   t h e   p r o c e s s   of   c o n s t r uc t i o n   o f   t h e   di c t i o n a r y   s t a r t s   by   t o ke n i z a t i o o f   t h e   r u nni n g   t e xt   i nt o   w o r ds   de pe ndi n g   o t h e   w h i t e   s p a c e .   T h e s e   w o r ds   a r e   s t o r e i t h e   di c t i o na r y   a s   ke y s ,   w h i l e   w o r f r e que n c i e s   i n   t h e   Co r p us   a re   s t o r e a s   t h e   v a l ue s   f o r   t h e s e   ke y s .   T h i s   i s   c a b e   c o n s i de r e a s   u ni g ra m   d i c t i o na r y   w h e r e   i t   i s   b a s e o n   o n e   w o r d .       Evaluation Warning : The document was created with Spire.PDF for Python.
                                IS S N :   2502 - 4752   In do n e s i a J   E l e c   E ng  &   Co m S c i ,   V o l .   21 ,   N o .   1 J a n u a r y   2021   :     23 3   -   241   236   3. 1 . 4 .   C o n s tr u c ti o n   o N - gr am   l an gu age   m o d e l   T h i s   p ha s e   i n v o l ve   t h e   c o n s t r uc t i o n   o f   t h e   h e a r t   o f   t h e   p r o pos e s y s t e m   t ha t   r e p r e s e n t   t h e   m a i n   p a r t   fo r   de t e c t i n g   a nd  c o rr e c t i n g   e rr o r s .   T h i s   p h a s e   c a b e   a c h i e v e by   pe r fo r m i ng  t h e   f o l l ow i n g   t a s k:     a)   S e n t e n c e s   S e gm e n t a t i o w h i c h   c a b e   a c hi e v e us i ng  p u n c t u a t i o n   m a rks   s uc h   a s   {   ?   ,   [   ,   ]   ,   ,   ,   .   ,   } .   b)   A ddi n g   b o un da ri e s   t a gs   ( < / s >   a nd  < s > )   t o   e a c h   s e n t e n c e .   c)   Co n s t r uc t i ng  N - g r a m   m o de l s   fo r   N = 2,   3 ,   4,   w i t h   t h e i r   f r e q ue n c i e s   by   A c qui s i t i o n   c h a i n s   o w o r ds   b y   m o v i n t h e   s l i di ng  w i n do w   w i t h   a   s pe c i f i c   l e n gt h   N   i n   o n e   i t e m   (w o r d)  a t   a   t i m e .   T h e   t e xt   c ha i r e p r e s e n t s   t h e   w o r ds   b e l ow   t h e   s l i d i n g   w i n do w   f i e l ds   a f t e r   t he   m o v e m e n t .     3. 2 .       E r r o r s   d e t e c t i o n   an d   c o r r e c t i o n   T h e   m e t h o do l o g y ,   w h i c h   us e i n   t hi s   pa pe r   f o r   c o r r e c t i o n   m i s s pe l l i n e rr o r s ,   i s   a c h i e v e b y   ge n e ra t i n c o rr e c t i o n ’s   c a n d i da t e s   a n r a nki n o f   t h e m .   T he   pr o po s e s y s t e m   de t e c t s   a n c o r r e c t s   t h e   b o t h   t y p e s   of   e r r o r s   n o n - w o r e rr o r s   a n R e a l - w o r l d   e rr o r s   by   fo l l ow i n t h e   m a i n   s t e ps   t ha t   i s   s h o w n   i F i gu r e   2.             F i gu r e   1 .   T h e   s t e ps   o f   e rr o de t e c t i o a nd  c o rr e c t i o n       3. 2 . 1 .   Ex tr a c ti n g   an d   e l i m i n at i n s ym b o l s   A n y   t e r m   (n u m b e r s ,   s y m bo l s ,   fo r e i g n   c ha r a c t e r s ,   e t c . s h o ul be   i n di c a t e w i t h   t h e i r   i n d i c e s   i n   t h e   t e xt   a nd  i f   t h e y   a r e   n o t   e xi s t s   i t h e   pu n c t ua t i o l i s t ,   t h e y   w i l l   b e   r e pl a c e by   s pa c e   i n   t h e   t e xt .   A f t e r   c o m pl e t i o n   o f   t h e   c o rr e c t i o n   p r o c e s s ,   t h e s e   s y m bo l s   w i l l   b e   i n s e rt e t o   t h e i r   o r i g i n a l   p l a c e s .   T h e   s e pa r a t e A ra b i c   l e t t e r s   a r e   t r e a t e l i ke   t h e s e   s y m bo l s   b e c a us e   t h e s e   l e t t e r s   c a n   b e   a s   s e m a n t i c   s y m bo l s   s uc h   a s   pa ge   n u m b e r   l i ke   ("  ص 02 " ).     3. 2 . 2 S e n t e n c e   s e gm e n tati o n   S e n t e n c e   S e gm e n t a t i o n   i s   t h e   p r o c e s s   of   s pl i t t i n a   t e xt   i nt o   s e n t e n c e s   us i n pu n c t ua t i o n s   s y m bo l s   w h e r e   t h e   b o un da r i e s   o f   e a c h   s e n t e n c e   i s   i n d i c a t e b y   t h e   s y m b o l   of   b e gi n   a nd  e n d   (< s > ,   < \ s > ) .     3. 2 . 3 D e t e c ti o n   o A O C R   e r r o r s   In  t h e   p r o po s e s y s t e m ,   t h e   n o n - w o r e rr o i s   de t e c t e by   l o o ki n i n   t h e   u ni g r a m   di c t i o n a r y   t h a t   c o n s t r uc t e i n   t h e   L a n g ua ge   m o de l   c o n s t r uc t i o n   p ha s e   t o   i ndi c a t e   w h e t h e r   a   w o r i s   e xi s t s   i n   t h e   l a n gu a ge   vo c a b ul a r y   o r   n o t .   If   i t   do e s   n o t   e xi s t   i n   t h e   di c t i o na r y ,   i t   c o n s i de r s   O ut   O f   V o c a b ul a r y   w o r (O O V ).   T h e   R e a l - w o r e rr o r   de t e c t i o n   i s   do n e   by   l o o kup  fo r   t h i s   w o r w i t h   i t s   t w o   a dj a c e n t   w o r ds   (o n e   f r o m   l e f t   a n o n e   f r o m   r i g ht a s   a   c h a i n   i n   t h e   t ri g ra m   L M   da t a b a s e   t h a t   p r e v i ous l y   pr e pa r e d.   W h e n   t h i s   c ha i n   o f   w o r ds   i s   e xi s t   i n   t h e   t ri g ra m   L M ,   t hi s   w o r i s   c o n s i de r e c o r r e c t ;   o t h e r w i s e ,   i t   i s   c o n s i de r e a   R e a l   e rr o r   w o r d.   F o r   e xa m pl e ,   t h e   w o r (" ح س ل ا   " w e a po n " i s   c o rr e c t ,   a n i t   i s   p r e s e n t   i n   t h e   u n i g r a m   d i c t i o na r y ,   b ut   i f   t h i s   w o r a ppe a r s   i t h e   s e n t e n c e   (" ض ر ا   ح س ل ا   ث ر ح " - " t h e   w e a po n   p l o w e t h e   l a nd" ),   i t   w i l l   b e   a   r e a l - w o r e rr o r.   B e c a us e   t h e s e   t hr e e   w o r ds   n o t   f r e que n t e i n   t h e   t r i g r a m   L M .   T h e r e f o r e ,   t h i s   w o r m us t   b e   c o r r e c t e t o   b e c o m e   (" ض ر ا   ح فل ا   ث ر ح " -   " T h e   f a rm e r   p l o w e t h e   l a n d" )   a s   s h o w n   i n   F i gu r e   3   Evaluation Warning : The document was created with Spire.PDF for Python.
In do n e s i a J   E l e c   E ng  &   Co m S c i     IS S N :   2502 - 4752       C or pus - bas e d   t e c h ni qu e   f or   i m pr ov i ng   A r ab i c   O C R   s y s t e m   ( A hm e d   H us s ai n   A l i w y )   237       F i gu r e   2 .   D e t e c t i o o f   r e a l - w o r e rr o r       3. 2 . 4 .   C o r r e c t i o n   o A O C R   e r r o r s   T h e   c o r r e c t i o n s   o f   bo t h   t y pe s   of   e r r o r s   ( r e a l - w o r e rr o r   a nd  n o n - w o r e rr o r)  a r e   do n e   us i n t hr e e   m a i n   s t e ps   r e s pe c t i v e l y   ( A ge n e ra t i ng  o f   c a ndi d a t e s   ( B p ru ni n g   o f   c a n di d a t e s   a n d   ( C )   c a n di da t e   s e l e c t i o n .   1)   Ca n di da t e s   ge n e r a t i o n   F i r s t l y   fo r   e a c h   e rr o r   w o r d,   t h e   c a n d i da t e ’s   w o r ds   s h o ul b e   pr o duc e d.   T h e   pr o c e s s   of   ge n e r a t i n g   c a n d i da t e s   i s   a   f o r m   o f   e di t   di s t a n c e   w h e r e   t h e   ge n e r a t o r   w o r ks   b a s i c a l l y   a s   a   c h a r a c t e r - b a s e ge n e ra t o r .   I t   w o r ks   by   a   s e t   of   o pe r a t i o n s   t h a t   a p pl i e t o   e r r o r   w o r ds   t o   ge n e r a t e   a   l i s t   o f   a l l   po s s i b l e   w o r ds   w i t h i n   a   s i n g l e   e di t   di s t a n c e .   T h e s e   o pe r a t i o n s   i n c l u de   ge n e ra t i o n   by   s u b s t i t ut i o n ,   i n s e r t i o n ,   de l e t i o n   a n P a i r   L e t t e r s   S ub s t i t ut i o n .   S uppo s e   t h a t   t h e   l e n g t h   o f   e rr o w o r i s   n ,   t h e s e   s t e ps   a r e   a s   f o l l o w i n g.   a)   G e n e ra t i o by   S ubs t i t ut i o n :   I t   i s   t h e   p r o c e s s   o f   ge n e r a t i n g   a   l i s t   o f   c a n d i d a t e s   by   r e pl a c i n e a c l e t t e i e rr o w o r by   e a c h   l e t t e f r o m   t h e   A ra b i c   a l p ha b e t .   T h e   p r o d uc e l i s t   w i l l   b e   29 c a n d i da t e s ,   i n   a dd i t i o n   t hr e e   f i na l   l e t t e r s   ( ء   , ى   , ة t o   b e   (29 n+ 3).     b)   G e n e ra t i o n   by   In s e rt i o n:   I t   i s   t h e   p r o c e s s   of   ge n e r a t i n a   l i s t   of   c a n di d a t e s   w o r ds   by   i n s e r t i ng  e a c h   l e t t e of   A r a b i c   a l p h a b e t   a f t e r   e a c h   l e t t e r   i n   t h e   e rr o r   w o r o r   b e fo r e   t h e   f i r s t   l e t t e r   i n   e rr o r   w o r d.   T h e   pr o duc e l i s t   w i l l   b e   (29( n+ 1)  + 3)   c a n d i da t e s   c)   G e n e ra t i o n   by   D e l e t i o n :   It   i s   t h e   p r o c e s s   of   ge n e r a t i n a   l i s t   of   c a n di d a t e s   w o r ds   by   d e l e t i ng  e a c l e t t e f r o m   e rr o r   w o r o n e   a t   a   t i m e .   T h e   r e m a i nde o f   t h e   e rr o w o r i s   a dde t o   t h e   c a n di da t e ' s   l i s t .   T h e   pr o duc e l i s t   w i l l   b e   ( n c a ndi d a t e s .     d)   G e n e ra t i o n   by   P a i r   L e t t e r s   S ub s t i t ut i o n :   It   i s   t h e   p r o c e s s   of   ge n e r a t i n a   l i s t   o f   c a n di d a t e s   w o r ds   by   r e pl a c i n e v e r y   t w o   a dj a c e n t   l e t t e r s   i n   t h e   e rr o r   w o r w i t a l l   l e t t e r s   o f   A ra b i c   a l p ha b e t .   T h e   p r o duc e l i s t   w i l l   b e   (29(n - 1 + 3)  c a n d i da t e .   T hi s   o pe r a t i o n   t ri e s   t o   c o r r e c t   t h e   r e c o gn i t i o n   o m o r e   t ha n   o n e   l e t t e e rr o r s .   2)   P r u ni n g   o f   c a n d i d a t e s   T h e   c a n di da t e s ,   ge n e ra t e b y   t h e   p r e v i o us   o pe r a t i o n s ,   a r e   c o n s i de r e a s   b rut e   f o r c e   o pe r a t i o n s   s o   i t   pr o duc e s   a   h uge   n u m b e r   of   c a n di da t e s .   F o r   e xa m pl e ,   w h e n   t h e   l e ngt h   o f   e r r o r   w o r i s   c h a r a c t e r s   l o n g ,   t h e   t o t a l   c a ndi d a t e s   w i l l   b e   537  a s   s h o w n   i T a b l e   1.   B e c a us e   t h e r e   a r e   l a rge   n u m b e r s   o f   ge n e r a t e c a n d i d a t e s ,   f i l t e r i ng  a n d   e l i m i na t i o o f   i n c o rr e c t   c a n d i d a t e s   s h o ul b e   a p pl i e us i n g   t h e   d i c t i o n a r y   l o o kup  i t hi s   s t a ge .         T a b l e   1 .   T h e   ge n e ra t e d   c a n di da t e s   c o unt   f o r   a   w o r w i t l e ngt h   l e t t e r   O p e r a t i o n   F o r m u l a   Ca n d i d a t e 's   N u m b e r   S u b s t i t u t i o n   2 9 n + 3   177   In s e rt i o n   2 9 (n + 1 )+ 3   206   D e l e t i o n   n   6   P a i r - S u b s t i t u t i o n   2 9 (n - 1 )+ 3   148   T o t a l   537       3)   Ca n di da t e   s e l e c t i o n   A f t e r   t h e   c a n d i da t e s   ge n e r a t i o n   a n p r u n e t i o n,   o n e   o f   t h e s e   c a n d i da t e s   s h o ul b e   s e l e c t e t o   be   t h e   c o r r e c t   a l t e rna t i v e   w o r fo r   t h e   e rr o r   w o r d.   I n   t h e   p r o po s e s y s t e m ,   t hr e e   m e t h o ds   a r e   us e a n a ppl i e s e que n t i a l l y   fo r   s e l e c t i n t h e   a l t e rna t e   c a n di d a t e :   ( 1 S e l e c t i o n   by   E xa c t   Co n t e xt ,   ( 2 s e l e c t i o n   by   e di t   di s t a n c e ,   a nd  ( 3 s e l e c t i o by   pr o b a b i l i t y .     -   S e l e c t i o n   by   e xa c t   c o n t e xt   Ch o o s i n t h e   c o r r e c t   w o r a m o n c a n di da t e s   i s   a f fe c t e by  t h e   c o n t e xt .   T h i s   f e a t u r e   i s   a do pt e i t h e   l a n g ua ge   m o de l   t ha t   b ui l t   f r o m   t h e   Co r p us .   s uppo s e   t ha t   t h e   po s i t i o n   o f   t h e   e rr o r   w o r i s   (e a n t h e   c a n d i da t e   l i s t   f o r   t h e   e rr o r   w o r i s   (Ce ).   F o r   a l l   t h e   w o r ds   i n   po s i t i o n s   (e + 1,   e + 2 ,   e + a n e + 4) ,   t h e   c a ndi d a t e   l i s t s   (Ce + , Ce + , Ce + a n Ce + 4)  w i l l   b e   ge n e r a t e r e s pe c t i v e l y   i f   a n y   of   t h e s e   w o r ds   i s   de t e c t e a s   e r r o w o r d.   O f fc o ur s e   i f   a n y   w o r i n   t h e s e   po s i t i o n s   i s   c o rr e c t   w or d ,   w i l l   ha s   o n e   w o r (t hi s   w o r d).   F r o m   t h e s e   l i s t s ,   t h e   c o m b i n a t i o n s   o f   2 - gr a m , 3 - g ra m , 4 - g ra m   a n 5 - g ra m   w i l l   b e   pr o duc e w i t h   c h e c ki n t h e m   v a l i di t y   i n   n - g ra m   L M   da t a b a s e .   T h e   r e s ul t   c h a i n s   ( n g ra m s w i l l   b e   t a ke n   i f   e xi s t s   i 5 - g ra m , 4 - g ra m   o r   3 - g r a m   Evaluation Warning : The document was created with Spire.PDF for Python.
                                IS S N :   2502 - 4752   In do n e s i a J   E l e c   E ng  &   Co m S c i ,   V o l .   21 ,   N o .   1 J a n u a r y   2021   :     23 3   -   241   238   c o m b i na t i o n s   l i s t s   r e s pe c t i v e l y .   T h e   de t a i l s   o f   t h i s   de s c ri p t i o n   a r e   s h o w n   i n   F i gu r e   4.   i f   t h i s   m e c ha n i s m   c a nn o t   m a ke   a   de c i s i o n ,   t h e   s a m e   s c e n a ri o   w i l l   b e   do n e   o n   t h e   w o r ds   o n   r i g h t   o f   e r r o r   w o r a t   po s i t i o n s   (e - 1, e - 2,   e - a n e - 4).   F o r   e xa m pl e ,   s uppo s e   t ha t   t h e   o ut put   o f   A O CR   t h a t   c o n t a i n s   e rr o r s   i s   t h e   w o r s e que n c e   (' ه ي م ع  ي ذ ل ا   ل م م   ي ل   ل ا ج ' )   w h e r e   t h e   e rr o w o r t o   b e   c o r r e c t e by   c o n t e xt   i s   (' ل ا ج ' ).   i t   i s   c o r r e c t e d   by   t h e   p hra s e   n e i g h b o ur s   t o   i t   (‘ يل ‘  , ل م م ‘  , ي ذ ل ا ’  a nd   ه ي م ع ’).   A c c o r di n g   t o   t h e   f i v e   l i s t s   o f   c n di d a t e s   a n d   t h e i c o m b i n a t i o n   fo r   5 - g ra m s ,   t h e r e   a r e   t hr e e   5 - g ra m s   (c ha i n s e x i s t   i t h e   5 - gra m   l a n gu a ge   m o de l   t h e r e f o r e   t h e y   w i l l   b e   t h e   o ut put   o f   t h e   c o nt e xt - b a s e c o r r e c t i o n   a s   s h o w n   i n   F i gu r e   5 .   A s   w e   c a n   s e e   t h e   o t h e r   c o m b i na t i o f o r   4,   a n d   g ra m s   w i l l   b e   n e gl e c t e d.           F i gu r e   3 .   T h e   s t e ps   o f   s e l e c t i n g   t h e   b e s t   c a n d i da t e s ,   a c c o r di ng  t o   t h e   c o n t e xt           F i gu r e   4 .   E xa m p l e   o f   s e l e c t i o n   c a n d i d a t e   by   e xa c t   c o n t e xt       -   S e l e c t i o n   by   l e ve n s ht e i n   e di t   di s t a n c e   m e a s u r e   T h e   o ut put   o s e l e c t i o n   by   e xa c t   c o n t e xt   w i l l   b e   a   l i s t   o f   5 - gr a m ,   4 - g ra m   o r   3 - g ra m   c ha i n s .   If   t h e   l i s t   c o n t a i n s   m o r e   t h a n   o n e   c ha i n,   o n e   of   t h e m   s h o ul b e   s e l e c t e a s   t h e   o pt i m a l   c ha i n   t ha t   c o n t a i n s   t h e   c o rr e c t   w o r f o r   t h e   s e l e c t e e rr o r   w o r d.   T h e   de c i s i o c a n   b e   m a d e   by   c a l c ul a t i ng  m i ni m u m   e di t   d i s t a n c e   b e t w e e n   t h e   c h a i n s   a nd  t h e   e qui v a l e n t   s e que n c e   of   w o r ds   i n   A O CR   out put .   A f t e r   c o m pl e t i n t h e   c a l c ul a t i o n   o f   t h e   e di t   di s t a n c e   f o r   a l l   t h e   c ha i n s ,   t h e   c h a i n s   w i t h   t h e   m i ni m um   e di t   di s t a n c e   a r e   a do pt e d,   t a k i n i n t o   c o n s i de ra t i o t h a t   t h e r e   m a y   be   m o r e   t h a n   o n e   c ha i n   ha v i n t h e   m i ni m u m   e di t   di s t a n c e .   T h e   o ut put   o F i gur e   w i l l   be   pr o c e s s e by   m i ni m um   e di t   d i s t a n c e   a s   i F i gu r e   6 .     -   S e l e c t i o n   by   pr o b a b i l i t y     A s   i t   w a s   s e e n   i n   t h e   p r e v i o us   e xa m pl e ,   t h e r e   i s   m a y be   m o r e   t h a o n e   c h a i n   w i t m i n i m um   e di t   di s t a n c e .   T h e r e f o r e   a n o t h e r   a pp r o a c h   i s   us e f o r   s e l e c t i ng  o n e   o f   t h e s e   c h a i n s .   T h e   p r o b a b i l i t y   of   t h e   s e que n c e   w o r i s   a do pt e t o   r e duc e   t h e   n u m b e r   o f   c h a i n s   a n t o   s e l e c t   o n e   c h a i n.   T h e   us e r o l e ,   t o   c a l c ul a t e   t h e   p r o b a b i l i t y   of   a   s e que n c e :   Evaluation Warning : The document was created with Spire.PDF for Python.
In do n e s i a J   E l e c   E ng  &   Co m S c i     IS S N :   2502 - 4752       C or pus - bas e d   t e c h ni qu e   f or   i m pr ov i ng   A r ab i c   O C R   s y s t e m   ( A hm e d   H us s ai n   A l i w y )   239   ( 1 ) ( | 1 = 1 )     (1)     W h e r e   ( 1 )   i s   t h e   p r o b a b i l i t y   of   t h e   s e que n c e   w 1… w n   a nd  ( | 1 )   r e p r e s e n t   t h e   p r o b a b i l i t y   of   w o r W gi v e n   t h e   p r e c e di n w o r W k - 1           F i gu r e   5 .   C a l c ul a t i n g   t h e   m i ni m um   e di t   d i s t a n c e   f o r   c h a i n s       3. 2 . 5 R e i n s e r t i n o s ym b o l s   A f t e r   c o m pl e t i n t h e   c o r r e c t i o n   pr o c e s s   fo r   a l l   t h e   w o r ds   i n   t h e   do c um e n t ,   t h e   s y m b o l s ,   pun c t ua t i o n s   m a r ks ,   a n num b e r s   t h a t   e xt ra c t e b e fo r e   t h e   c o rr e c t i o p r o c e s s   s h o ul b e   r e t u rn e t o   r e a c h   a   r e s ul t   m a t c hi n t h e   o r i g i n a l   i m a ge .   T h e s e   e l e m e nt s   a r e   r e - e n t e r e i nt o   t h e   t e xt   b a s e o n   t h e i r   c o o r di na t e s ,   w hi c i n c l u de   t h e   l i n e   i n de a n d   t h e   w o r i n de x.       4.   R ES U LTS   A N D   D I S C U S S I O N S   T h e   pr o po s e A O C R   p o s t - pr o c e s s i n s y s t e m   w a s   i m pl e m e n t e us i n py t h o n   3 . b e c a us e   i t   h a s   m a n y   pa c ka ge s   s ui t a b l e   fo r   t hi s   t a s k ,   c ha r a c t e r i z e a s   a n   o pe n - s o ur c e   l a n g ua ge ,   c a n   us e   f o r   a n y   pl a t f o r m   o pe r a t i ng  s y s t e m   a n d   pe r f o r m i n v a ri o us   s c i e n t i f i c   c a l c ul a t i o n [26] .   I t   w a s   t e s t e us i n g   t h e   r e s ul t s   o f   t w c o m m e r c i a l   O CR   a ppl i c a t i o n s ,   i 2O CR   t h a t   e v a l ua t e by   ( S ,   V i j a y a r a ni   A ,   S a ki l a a s   b e t t e r   pe r f o r m a n c e   a m o ng  s e v e n   o t h e r   s y s t e m s   [27]   a n A B B Y Y   F IN E   R E A D E R   t ha t   p r o v i de s   r e c o gn i z e s   t e xt   qu i c kl y   a n a c c ur a t e l y   [28] ,   o n   s e ve r a l   i m a ge s   of   Is l a m i c   b oo pa ge s   t h a t   ha e rr o r s   due   t o   t h e   po o r   qua l i t y   of   t h e   i m a ge s .   F i v e   t e s t s   o f   di ffe r e nt   r e s o l ut i o n s ,   f o r   10   do c um e n t s   i m a ge s ,   w e r e   m a de   a s   i n pu t   t o   e a c h   c o m m e r c i a l   a ppl i c a t i o n   a nd  t h e n   t h e   s ugge s t e m e t h o i s   a pp l i e o n   t h e   o ut put s .   F i g u r e s   &   s h o w   gr a p hi c   r e p r e s e n t a t i o n   f o r   t h e   a c c ura c i e s   b e fo r e   a nd  a f t e r   a pp l y i n t h e   s ugge s t e m e t h o o n   t h e   o ut pu t s   o f   i 2O C a n A B B Y Y   F IN E   R E A D E R   r e s pe c t i v e l y   fo r   di f f e r e n t   i m a g e   r e s o l ut i o n s .     T h e   a c c u ra c y   o f   t h e   i 2O CR   r e s ul t s   i s   de t e ri o ra t e w h e ne v e r   t he   do c u m e nt   i m a ge   s p a t i a l   r e s o l u t i o i s   de c r e a s e a s   s h o w n   i F i g u r e   7 .   T he   a v e ra ge   a c c u ra c y   ra t e   s y s t e m   o u t p u t   i s   (9 6 . 2 6 a t   a   re s o l u t i o n   (1 90 X   26 87 ) .   I t   c o nt i nue s   t o   de c l i n e   u nt i l   t h e   a c c e s s   t he   a v e ra ge   a c c u ra c y   (80 . 51 a t   a   r e s o l u t i o n   (1 50 2 12 1) .   T he   o ut pu t   e rro rs   a re   de t e c t e a nd  c o rre c t e d   b y   t h e   p r o po s e po s t - p r o c e s s i ng  s y s t e m   t o   ra i s i ng  t he   s y s t e m ' s   a v e ra ge   a c c u ra c y   t o   ( 9 9 . 5 5)   a t   a   r e s o l ut i o ( 19 00   X   2 68 7 )   u nt i l   t he   a v e ra ge   a c c u ra c y   (9 2 . 15 )   a t   r e s o l u t i o (1 50 0   x   2 12 1) .     A s   s ho w i F i g u re   8 ,   t he   a v e ra g e   a c c u ra c y   o f   t he   A B B Y Y   O C R   s y s t e m   o u t p u t s   i s   ( 9 7 . 5 2 )   a t   t he   s p a t i a l   re s o l u t i o ( 1 2 4 0   x   1 7 4 5 ) ,   a nd   i t   c o nt i nu e s   t o   go   do w u nt i l   i t   r e a c he s   ( 7 5 . 6 9 )   a t   t he   s p a t i a l   re s o l u t i o ( 6 0 0   x   8 4 8 ) .   B y   t he   a p p l i e d   t he   p ro p o s e d   po s t - p ro c e s s i ng ,   t he   a c c u ra c y   o f   t he   re s u l t s   i s   i m p ro v e d   t o   b e   ( 9 9 . 4 9 )   a t   t he   s p a t i a l   re s o l u t i o ( 1 2 4 0   x   1 7 4 5 )   a nd   ( 8 6 . 3 3 )   a s   a v e ra g e   a c c u ra c y   a t   t he   s p a t i a l   re s o l u t i o ( 6 0 0   x   8 4 8 ) .   A c c o rd i ng   t o   re s u l t s ,   t he   p ro p o s e d   s y s t e m   g i v e s   g o o d   i m p ro v e m e nt   re s u l t s   a s   a   p o s t p ro c e s s i ng   p a rt   w he a p p l i e d   t o   t he   o u t p u t s   o f   A ra b i c   O CR   s y s t e m s .   E v e r y   f i v e   w o rd s   o f   t he   o u t p u t s   o f   t he   A ra b i c   O C R   s y s t e m s   a re   t re a t e d   a s   o n e   p a t c i t he   p ro p o s e d   s y s t e m .   T a b l e   2   s ho w s   s a m p l e s   o f   t he   c o rre c t e d   e rro rs   f o t he   o u t p u t   o f   t he   u s e d   c o m m e rc i a l   s y s t e m s .     A f t e r   a na l y z i n g   t h e   e rr o r   w o r ds   o f   t h e   o ut put   o f   t h e   c o m m e r c i a l   s y s t e m s ,   w e   s e e   t h a t   m us t   o f   t h e m   (63%)  c a b e   s o l ve by   s i n gl e   s u b s t i t ut i o n   w hi l e   37 o t h e   e rr o r s   c a b e   s o l v e by   pa i s ub s t i t u t i o n,   i n s e r t i o n,   de l e t i o o o t h e r s .     Evaluation Warning : The document was created with Spire.PDF for Python.
                                IS S N :   2502 - 4752   In do n e s i a J   E l e c   E ng  &   Co m S c i ,   V o l .   21 ,   N o .   1 J a n u a r y   2021   :     23 3   -   241   240       F i gu r e   6 .   i 2O CR   i m p r o v m e n t   f o r   r e s o l ut i o n s   1900   X   26 87,   1 800  X   2456 ,   1700   X   2 404,     1600  x   22 63  a n d   1500   x   2121           F i gu r e   7 .   A B B Y Y   O CR   i m p r o v m e n t   f o r   r e s o l ut i o n s   1240   x   1745, 9 00  12 73,   800   x   1131 ,     700  x   990   a nd  600  8 48       T a b l e   2 .   S a m p l e s   o f   t h e   c o rr e c t e e rr o r s   Se   E rro r   P h ra s e   Co rr e c t e d   P h ra s e   1   " ة ت ي قح ل ا   س ل ط   ن إ   ك ل   ل ب س ق ا "   " ة قي قح ل ا   بل ط   ن إ   ك ل   ل و ق ا "   2   " ن ا ع ت ب م و   ا ا ن د ا ر م   و ه  ا ي ي ل إ   ل و س ص و ل ا و ا "   " ا ن ا غ ت ب م و   ا ن د ا ر م   و ه  ا ه ي ل إ   ل و ص و ل ا و "   3   " قع ل ا   ي ف س م ل ف ل ا   ل ي ل ئ ل ا   ق ي ر ط   ن عا ر ي ل "   " قع ل ا   ي ف س ل فل ا   ل ي ل د ل ا   ق ي ر ط   نع يل "   4   " ت ل ا   ة م ل ظ ل ا   ك ر س ص ب   ن ع  ي ل ج أ و "   " ي ت ل ا   ة م ل ظ ل ا   ك ر ص ب   ن ع  ي ل ج أ و "   5   " ي س ث ل ا   ن ها و ر   ي ذ ل ا   حي ح س ص ل ا   ر ب خ ل ا خ "   "   حي ح ص ل ا   ر ب خ ل ا خ ي ش ل ا   ه ا و ر   ي ذ ل ا "       5.   C O N C LU S I O N S   A N D   F U TU R E   W O R K S   In   t h i s   p a pe r,   Co r p us - b a s e e r r o r   c o r r e c t i o n   w a s   i nt r o duc e fo r   c o r r e c t i n t h e   o ut put   o f   A O C s y s t e m .   T h e   p r o po s e s y s t e m   i s   b a s e o n   di c t i o n a r y   a n N - gra m   l a n gu a ge   m o de l   L M   c o n s t r uc t e f r o m   t h e   h u ge   c o r pus .   T h e   e xpe r i m e nt s   s h o w e d,   a s   c a n   b e   s e e n   f r o m   t h e   r e s ul t s ,   v e r y   goo i m p r o v e m e n t   i n   c o rr e c t i o n   of   e r r o r s   o f   A O C R   s y s t e m s   fo r   b o t h   t y pe s   r e a l - w o r e rr o a n n o n - w o r e rr o r s .   I o t h e r   w o r ds ,   t h e   s y s t e m   r e l i e o n   t h e   c o n t e xt   o f   t h e   w o r i e rr o r   c o rr e c t i o a s   w e l l   a s   t h e   v a l i di t y   of   w o r d.   A s   w e   c a n   s e e   f r o m   t h e   r e s ul t s ,   t h e   s y s t e m   s t i l l   c a c o rr e c t   e rr o r s   i n   s pi t e   o f   t h e   dr o do w n   of   a c c ur a c y   of   t h e   c o m m e r c i a l   s y s t e m s   r e s ul t   f r o m   t h e   i m a ge   r e s o l ut i o n .   T h e   a v e r a ge   o f   c o r r e c t i o n   a ppr o xi m a t e l y   i s   7. 96  w h e r e   t h e r e   i s   a   c a s e   t h e   c o r r e c t i o n   i s   15 . 35% .   T h e   p r o po s e s y s t e m   c a n   b e   i m p r o v e by   us i n h uge   b a l a n c e c o r pus   t ha t   c o v e r s   a l l   do m a i n s .   A l s o ,   t h e   s y s t e m   c a n   w o r o n   w e b   pa ge s   a f t e r   us i ng  t h e   P o s t g r e S Q L   da t a b a s e   e n gi n e ,   w hi c w o r ks   o n   a   c l i e n t - s e r v e r   m o de l ,   f o r   go o pe r f o r m a n c e .     Evaluation Warning : The document was created with Spire.PDF for Python.
In do n e s i a J   E l e c   E ng  &   Co m S c i     IS S N :   2502 - 4752       C or pus - bas e d   t e c h ni qu e   f or   i m pr ov i ng   A r ab i c   O C R   s y s t e m   ( A hm e d   H us s ai n   A l i w y )   241   R EF ER EN C ES   [ 1]   A .   F .   H .   A l ha r a n ,   H .   K .   F a t l a w i ,   a nd  N .   S .   A l i ,   A   c l us t e r - ba s e f e a t ur e   s e l e c t i o m e t ho f o r   i m a g e   t e x t ur e   c l a s s i f i c a t i o n,   I ndone s i a n   J o ur n al   of   E l e c t r i c a l   E ng i ne e r i ng   and   C om put er   Sc i e nc e   ( I J E E C S) ,   v o l .   14,   n o .   3,   pp .   1433 - 144 2,   20 19,   do i :   10. 1159 1/ i j e e c s . v 14. i 3. pp14 33 - 144 2.   [ 2]   H .   K .   F a t l a w i ,   A .   F .   H .   A l ha r a n ,   a nd  N .   S .   A l i ,   A e f f i c i e nt   h y br i m o de l   f o r   r e l i a bl e   c l a s s i f i c a t i o o f   hi g di m e n s i o na l   d a t a   us i ng   k - m e a n s   c l us t e r i ng   a nd  b a g g i ng   e ns e m bl e   c l a s s i f i e r ,   J .   T he or .   A pp l .   I nf .   T e c hn ol . ,   v o l .   96 ,   no .   24 ,   pp .   8379 - 83 98,   2 018 .   [ 3]   Y .   O ua d i d,   A .   E l b a l a o ui ,   M .   B o ut a o un t e ,   M .   F a k i r ,   a nd  B .   M i na o ui ,   H a ndw r i t t e t i f i n a g c ha r a c t e r   r e c o g ni t i o us i ng   s i m p l e   g e o m e t r i c   s ha p e s   a nd  g r a ph s ,   I ndone s i an   J ou r na l   of   E l e c t r i c al   E ng i ne e r i ng   and   C om pu t er   S c i e nc e   ( I J E E C S) ,   v o l .   13 ,   no .   2,   pp .   598 - 60 5,   2 019 ,   do i :   10. 115 91 / i j e e c s . v 13. i 2 . pp5 98 - 605 .   [ 4]   W .   M a g dy   a nd  K .   D a r w i s h ,   A r a b i c   O C R   e r r o r   c o r r e c t i o us i ng   c ha r a c t e r   s e g m e nt   c o r r e c t i o n,   l a ng ua g e   m o de l i ng ,   a nd  s ha l l o w   m o r pho l o gy ,   C O L I N G / A C L   2006   -   E M N L P   200 2 006  C o nf .   E m p i r .   M e t ho ds   N at .   L a ng .   P r oc e s s .   P r oc .   C onf . ,   no .   J ul y ,   pp .   408 - 41 4,   20 06 ,   do i :   10 . 311 5/ 1 6100 75 . 161 0132 .     [ 5]   Z .   Q .   A l - Z a y di   a nd  H .   S a l a m ,   M ul t i pl e   O ut put s   T e c hn i qu e s   E v a l u a t i o f o r   A r a bi c   C ha r a c t e r   R e c o g ni t i o n,   I n t .   J .   C om put .   T e c h. ,   v o l .   2 ,   no .   5 ,   pp .   2 - 8,   201 5.     [ 6]   K .   H .   A bdul ka r e e m   e t   al . ,   A   R e v i e w   of   F og   C o m put i ng   a nd  M a c hi n e   L e a r n i ng :   C o nc e pt s ,   A ppl i c a t i o ns ,   C ha l l e ng e s ,   a nd  O pe I s s ue s ,   I E E E   A c c e s s ,   v o l .   7 ,   no .   A pr i l   2 020 ,   p p.   1531 23 - 1531 40 ,   20 19,   do i :   10. 1 109 / A C C E S S . 201 9. 2947 542 .   [ 7]   Y .   B a s s i l   a nd  M .   A l w a n i ,   O C R   P o s t - P r o c e s s i ng   E r r o r   C o r r e c t i o A l go r i t hm   us i ng   G oo g l e   O nl i ne   S pe l l i ng   S ug g e s t i o n,   v o l .   3,   no .   1,   2 012 .     [ 8]   S .   N a z ,   N .   H .   K h a n,   S .   Z a ho o r ,   a n M .   I .   R a z z a k,   D e e O C R   f o r   A r a bi c   s c r i pt - b a s e l a ng ua g e   l i ke   P a s t ho ,   E x pe r t   Sy s t . ,   no .   M a r c h ,   pp.   1 - 11 ,   202 0,   do i :   10. 1111 / e xs y . 12565 .     [ 9]   J .   O u t i f a ,   S .   L .   A o ur a g h,   a nd  S .   E l   A l a o ui   O ua t i k ,   I nt e g r a t i o o f   da t a   s o ur c e s   i a a ut o m a t i c   c o r r e c t o r   o f   A r a bi c   t e x t s ,   C o l l o q.   I nf .   Sc i .   T e c hn ol .   C i s t ,   v o l .   0 ,   p p.   34 4 - 348 ,   2 016 ,   do i :   10. 1109 / C I S T . 2016 . 78 0506 8.     [ 10]   N .   S a nk a r a a nd  C .   V   J a w a ha r ,   E r r o r   de t e c t i o i hi g h l y   i nf l e c t i o na l   l a ng ua g e s ,   P r oc .   I n t .   C on f .   D oc .   A n al .   R e c ogni t i on,   I C D A R ,   v o l .   1,   pp .   113 5 - 1139 ,   2013 ,   do i :   10. 1 109 / I C D A R . 2013. 2 30.     [ 11]   A .   M .   A z m i ,   M .   N .   A l m ut e r y ,   a nd  H .   A .   A bo a l s a m h ,   R e al - W o r E r r o r s   i n   A r a bi c   T e xt s :   A   B e t t e r   A l g o r i t hm   f o r   D e t e c t i o a nd  C o r r e c t i o n ,   I E E E / A C M   T r an s .   A u di S pe e c L ang.   P r oc e s s . ,   v o l .   27,   no .   8,   pp .   130 8 - 1320 ,   2019 ,   do i :   10. 1109 / T A S L P . 2019 . 291 8404 .     [ 12]   T .   K a nung o ,   G .   A .   M a r t o n,   a nd  O .   B u l bu l ,   O m n i P a g e   v s .   S a k hr :   pa i r e m o de l   e v a l u a t i o o f   t w o   A r a bi c   O C R   pr o duc t s ,   D oc .   R e c o gni t .   R e t r .   V I ,   v o l .   3 651 ,   no .   J a nu a r y ,   p .   109 ,   1 999,   do i :   10. 1117 / 1 2. 3 3580 8.     [ 13]   S .   V e r be r ne ,   C o nt e x t - s e ns i t i v e   s pe l l   c he c ki ng   ba s e o w o r t r i g r a m   pr o ba b i l i t i e s ,   R e ad.   W r i t . ,   v o l .   131,   no .   5 ,   pp.   3 - 509 ,   200 2,   do i :   10. 1 007 / s 1 114 5 - 006 - 9040 - z .     [ 14]   E .   S c i e nc e s   a n T .   N a s e e m ,   A   H y br i A ppr o a c f o r   U r du   S pe l l   C h e c ki ng ,   Sc i e nc e   ( 80 - .   ) . ,   no .   N o v e m be r ,   20 04.     [ 15]   K .   S h a a l a n ,   Y .   S a m i h,   M .   A t t i a ,   P .   P e c i na ,   a nd  J .   V a G e na b i t h,   A r a bi c   w o r g e ne r a t i o a nd   m o de l l i ng   f o r   s p e l l   c he c ki ng ,   P r oc .   8t I n t .   C on f .   L ang .   R e s our .   E v a l .   L r .   20 12 ,   p p.   71 9 - 725,   20 12.     [ 16]   I .   A .   D o us a nd  A .   M .   A l - T r a d,   I m pr o v i ng   p o s t - pr o c e s s i ng   o pt i c a l   c ha r a c t e r   r e c o g ni t i o do c um e nt s   w i t A r a bi c   l a ng ua g e   us i ng   s pe l l i ng   e r r o r   de t e c t i o a nd   c o r r e c t i o n,   I nt .   J .   R e as on.   I n t e l l .   Sy s t . ,   v o l .   8,   no .   3 - 4,   pp.   91 - 103 ,   2016 ,   do i :   10. 150 4/ I J R I S . 2016. 1 0003 960 .     [ 17]   I .   Q .   H a b e e b ,   H y br i M o de l   o f   P o s t - P r o c e s s i ng   T e c hn i qu e s   f o r   A r a bi c   O pt i c a l   C ha r a c t e r   R e c o g ni t i o D o c t o r   o f   P hi l o s o ph y ,   20 16.     [ 18]   A .   H .   G ha r i b e h ,   A   H y br i A ppr o a c f o r   A r a bi c   O C R   P o s t - P r o c e s s i ng   U s i ng   R u l e   B a s e a nd  W o r C o nt e xt   T e c hni qu e s ,   J .   C he m .   I n f .   M ode l . ,   v o l .   5 3,   no .   9 ,   p .   28 7,   20 16,   do i :   10 . 10 17/ C B O 9781 1074 1532 4. 0 04 .     [ 19]   S .   Y o us f i ,   S .   A .   B e r r a ni ,   a n C .   G a r c i a ,   C o nt r i bu t i o o f   r e c ur r e nt   c o nne c t i o ni s t   l a ng ua g e   m o de l s   i i m pr o v i ng   L S T M - ba s e A r a b i c   t e xt   r e c o g ni t i o i v i de o s ,   P at t e r R e c o gn i t . ,   v o l .   64,   no .   N o v e m be r   201 6,   pp.   245 - 25 4,   2017 ,   do i :   10. 101 6/ j . pa t c o g . 2016. 11 . 01 1.     [ 20]   I .   A .   D o us h,   F .   A l kha t e e b ,   a nd  A .   H a m di ,   A   nov e l   A r a bi c   O C R   po st - pr o c e s s i ng   us i ng   r ul e - ba s e a nd  w o r c o nt e xt   t e c hni que s ,   I n t .   J .   D oc .   A nal .   R e c ogn i t . ,   2018 ,   do i :   10. 1 007 / s 1 003 2 - 018 - 0297 - y .     [ 21]   T .   A l v a r e z - l   a nd  M .   F e r n,   " A   P r o p o s a l   f o r   B o o k   O r i e n t e A s pe c t   B a s e S e n t i m e nt   A na l y s i s " Spr i nge r   I nt e r n at i on al   P ubl i s h i ng ,   v o l .   2 ,   2018 .     [ 22]   A .   C ho ui g ui ,   O .   B e K h i r o un,   a nd   B .   E l a y e b,   " R e l at e t e r m s   e x t r a c t i on   f r om   A r ab i c   ne w s   c or pu s   u s i ng  w or d   e m be ddi ng " Spr i nge r   I nt e r na t i ona l   P ubl i s h i ng ,   v o l .   112 31   L N C S . ,   2019 .     [ 23]   A .   C ho ui g ui ,   O .   B e n   K hi r o un,   a n B .   E l a y e b,   A N T   c o r pus :   A A r a bi c   ne w s   t e x t   c o l l e c t i o f o r   t e xt ua l   c l a s s i f i c a t i o n,   P r oc .   I E E E / A C I n t .   C on f .   C om put .   Sy s t .   A pp l .   A I C C SA ,   v o l .   2017 - O c t o b,   pp.   135 - 14 2,   20 18,   do i :   10. 1 109 / A I C C S A . 2017. 22 .     [ 24]   N .   Y .   H a ba s h ,   " I nt r o duc t i o t o   A r a bi c   n a t ur a l   l a ng ua g e   p r o c e s s i ng " ,   v o l .   3,   no .   1 .   2010 .     [ 25]   M .   A t t i a ,   P .   P e c i na ,   Y .   S a m i h ,   K .   S h a a l a n ,   a n J .   V a n ,   A r a b i c   s pe l l i ng   e r r o r   de t e c t i o a nd  c o r r e c t i o n,   2 015 ,   do i :   10. 1 017 / S 13 5132 4915 0000 30 .     [ 26]   A .   K um a r   a nd  S .   P .   P a nda ,   A   S ur v e y :   H o w   P y t h o P i t c he s   i I T - W o r l d,   P r oc .   I n t .   C onf .   M ac h.   L e ar n .   B i D at a,   C l oud  P ar a l l e l   C om p ut .   T r e nds ,   P r e s pe c t i v e s   P r os pe c t .   C om .   2019 ,   pp .   248 - 251 ,   20 19,   do i :   10. 1 109 / C O M I T C o n. 2019 . 886 2251 .   [ 27]   V .   S   a nd   S .   A ,   P e r f o r m a nc e   C o m pa r i s o o f   O C R   T o o l s ,   I nt .   J .   U bi C o mp ,   v o l .   6,   no .   3 ,   pp.   19 - 30 ,   2 015 ,   do i :   10. 5 121 / i j u . 20 15. 6303 .     [ 28]   S .   J .   J a ng ,   O c r   r e l a t e d   t e c hno l o gy   t r e nds ,   v o l .   8,   no .   1,   p p.   13 - 20 ,   2020 .         Evaluation Warning : The document was created with Spire.PDF for Python.