journal article·2020-10-31Open access

Towards the Natural Language Processing as Spelling Correction for Offline Handwritten Text Recognition Systems

Arthur Flor de Sousa Neto, Byron Leite Dantas Bezerra, Alejandro Héctor Toselli

Applied Sciences· Volume 10· Issue 21

Abstract

The increasing portability of physical manuscripts to the digital environment makes it common for systems to offer automatic mechanisms for offline Handwritten Text Recognition (HTR). However, several scenarios and writing variations bring challenges in recognition accuracy, and, to minimize this problem, optical models can be used with language models to assist in decoding text. Thus, with the aim of improving results, dictionaries of characters and words are generated from the dataset and linguistic restrictions are created in the recognition process. In this way, this work proposes the use of spelling correction techniques for text post-processing to achieve better results and eliminate the linguistic dependence between the optical model and the decoding stage. In addition, an encoder–decoder neural network architecture in conjunction with a training methodology are developed and presented to achieve the goal of spelling correction. To demonstrate the effectiveness of this new approach, we conducted an experiment on five datasets of text lines, widely known in the field of HTR, three state-of-the-art Optical Models for text recognition and eight spelling correction techniques, among traditional statistics and current approaches of neural networks in the field of Natural Language Processing (NLP). Finally, our proposed spelling correction model is analyzed statistically through HTR system metrics, reaching an average sentence correction of 54% higher than the state-of-the-art method of decoding in the tested datasets.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Handwritten Text Recognition Techniques · Hand Gesture Recognition Systems · Natural Language Processing Techniques

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Escola Politécnica de Pernambuco, Universidade de Pernambuco, Recife 50720-001, Brazil

PRHLT Research Center, Universitat Politécnica de Valéncia, 46022 Valencia, Spain

Funding

Coordenação de Aperfeiçoamento de Pessoal de Nível Superior · Conselho Nacional de Desenvolvimento Científico e Tecnológico

References (97)

Show source-provided references
1. Singh, S., Kariveda, T., Das Gupta, J., and Bhattacharya, K. (2015, January 4–7). Handwritten words recognition for legal amounts of bank cheques in English script. Proceedings of the ICAPR 2015—2015 8th International Conference on Advances in Pattern Recognition, Kolkata, India.10.1109/ICAPR.2015.7050716 ↗
2. A Set of Benchmarks for Handwritten Text Recognition on Historical Documents10.1016/j.patcog.2019.05.025 ↗
3. Medicine Box: Doctor’s Prescription Recognition Using Deep Machine Learning10.14419/ijet.v7i3.34.18785 ↗
4. Burie, J.C., Chazalon, J., Coustaty, M., Eskenazi, S., Luqman, M.M., Mehri, M., Nayef, N., Ogier, J.M., Prum, S., and Rusiñol, M. (2015, January 23–26). ICDAR2015 competition on smartphone document capture and OCR (SmartDoc). Proceedings of the 2015 13th International Conference on Document Analysis and Recognition (ICDAR), Nancy, France.10.1109/ICDAR.2015.7333943 ↗
5. Palehai, D., and Fanany, M.I. (2017, January 17–19). Handwriting Recognition on Form Document Using Convolutional Neural Network and Support Vector Machines (CNN-SVM). Proceedings of the 5th International Conference on Information and Communication Technology (ICoIC7), Melaka, Malaysia.
6. Bezerra, B., Zanchettin, C., Toselli, A., and Pirlo, G. (2017). Handwriting: Recognition, Development and Analysis, Nova Science Publishers. Computer Science, Technology and Applications.
7. Survey on Handwritten Character Recognition using Artificial Neural Network
8. A Survey on Handwritten Character Recognition (HCR) Techniques for English Alphabets10.5121/avc.2016.3101 ↗
9. Off-line Cursive Handwriting Recognition using Hidden Markov Models10.1016/0031-3203(95)00013-P ↗
10. Saritha, B.S., and Hemanth, S. (2010). An Efficient Hidden Markov Model for Offline Handwritten Numeral Recognition. arXiv.
11. Toselli, A.H., and Vidal, E. (2015, January 22). Handwritten Text Recognition Results on the Bentham Collection with Improved Classical N-Gram-HMM methods. Proceedings of the 3rd International Workshop on Historical Document Imaging and Processing (HIP@ICDAR), Nancy, France.10.1145/2809544.2809551 ↗
12. Handwritten Urdu character recognition using one-dimensional BLSTM classifier10.1007/s00521-017-3146-x ↗
13. Scheidl, H., Fiel, S., and Sablatnig, R. (2018, January 5–8). Word Beam Search: A Connectionist Temporal Classification Decoding Algorithm. Proceedings of the 16th International Conference on Frontiers in Handwriting Recognition (ICFHR), Niagara Falls, NY, USA.10.1109/ICFHR-2018.2018.00052 ↗
14. Ingle, R.R., Fujii, Y., Deselaers, T., Baccash, J., and Popat, A.C. (2019, January 20–25). A Scalable Handwritten Text Recognition System. Proceedings of the 2019 International Conference on Document Analysis and Recognition (ICDAR), Sydney, Australia.10.1109/ICDAR.2019.00013 ↗
15. Puigcerver, J. (2017, January 9–15). Are Multidimensional Recurrent Layers Really Necessary for Handwritten Text Recognition?. Proceedings of the 14th IAPR International Conference on Document Analysis and Recognition (ICDAR), Kyoto, Japan.10.1109/ICDAR.2017.20 ↗
16. Bluche, T. (2016). Joint Line Segmentation and Transcription for End-to-End Handwritten Paragraph Recognition. Adv. Neural Inf. Process. Syst., 838–846.
17. Pirinen, T.A., and Lindén, K. (2014, January 6–12). State-of-the-Art in Weighted Finite-State Spell-Checking. Proceedings of the 15th International Conference on Computational Linguistics and Intelligent Text Processing, Kathmandu, Nepal.10.1007/978-3-642-54903-8_43 ↗
18. Swaileh, W. (2017). Language Modelling for Handwriting Recognition. [Ph.D. Thesis, Normandie Université].
19. Stolcke, A. (2002, January 16–20). SRILM—An extensible language modeling toolkit. Proceedings of the 7th International Conference on Spoken Language Processing (ICSLP 2002), Denver, CO, USA.10.21437/ICSLP.2002-303 ↗
20. Povey, D., Ghoshal, A., Boulianne, G., Burget, L., Glembek, O., Goel, N., Hannemann, M., Motlíček, P., Qian, Y., and Schwarz, P. (2011, January 11–15). The Kaldi speech recognition toolkit. Proceedings of the IEEE 2011 Workshop on Automatic Speech Recognition and Understanding, Waikoloa, HI, USA.
21. Bluche, T. (2015). Deep Neural Networks for Large Vocabulary Handwritten Text Recognition. [Ph.D. Thesis, Université Paris-Sud].
22. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, L., and Polosukhin, I. (2017, January 4–9). Attention is All you Need. Proceedings of the Conference on Neural Information Processing Systems (NIPS), Long Beach, CA, USA.
23. Liu, X., Wang, W., Liang, W., and Li, Y. (2019). Speed Up the Training of Neural Machine Translation. Neural Process. Lett.10.1007/s11063-019-10084-y ↗
24. Susanto, R.H., Phandi, P., and Ng, H.T. (2014, January 25–29). System Combination for Grammatical Error Correction. Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Doha, Qatar.10.3115/v1/D14-1102 ↗
25. Chollampatt, S., and Ng, H.T. (2018, January 2–7). A Multilayer Convolutional Encoder–Decoder Neural Network for Grammatical Error Correction. Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, Frontiers, New Orleans, LA, USA.10.1609/aaai.v32i1.12069 ↗
26. Sutskever, I., Vinyals, O., and Le, Q. (2014). Sequence to Sequence Learning with Neural Networks. Adv. Neural Inf. Process. Syst., 4.
27. Schmaltz, A., Kim, Y., Rush, A., and Shieber, S. (2016, January 12–17). Sentence-Level Grammatical Error Identification as Sequence-to-Sequence Correction. Proceedings of the 11th Workshop on Innovative Use of NLP for Building Educational Applications (BEA@NAACL-HLT 2016), The Association for Computer Linguistics, San Diego, CA, USA.10.18653/v1/W16-0528 ↗
28. Junczys-Dowmunt, M., Grundkiewicz, R., Guha, S., and Heafield, K. (2018, January 1–6). Approaching Neural Grammatical Error Correction as a Low-Resource Machine Translation Task. Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics (NAACL), New Orleans, LA, USA.10.18653/v1/N18-1055 ↗
29. Cho, K., van Merriënboer, B., Bahdanau, D., Bougares Fethi Schwenk, H., and Bengio, Y. (2014, January 25–29). Learning Phrase Representations using RNN Encoder–Decoder for Statistical Machine Translation. Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Doha, Qatar.10.3115/v1/D14-1179 ↗
30. Bahdanau, D., Cho, K.H., and Bengio, Y. (2015, January 7–9). Neural machine translation by jointly learning to align and translate. Proceedings of the 3rd International Conference on Learning Representations (ICLR), San Diego, CA, USA.
31. Luong, T., Pham, H., and Manning, C.D. (2015, January 17–21). Effective Approaches to Attention-based Neural Machine Translation. Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, Lisbon, Portugal.10.18653/v1/D15-1166 ↗
32. Dai, Z., Yang, Z., Yang, Y., Carbonell, J., Le, Q., and Salakhutdinov, R. (August, January 28). Transformer-XL: Attentive Language Models beyond a Fixed-Length Context. Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, Florence, Italy.
33. Thus, D.R., Liang, C., and Le, Q.V. (2019, January 10–15). The Evolved Transformer. Proceedings of the 36th International Conference on Machine Learning, Long Beach, CA, USA.
34. Sentence Correction Incorporating Relative Position and Parse Template Language Models10.1109/TASL.2009.2031237 ↗
35. Gatos, B., Louloudis, G., Causer, T., Grint, K., Romero, V., Sánchez, J.A., Toselli, A.H., and Vidal, E. (2014, January 7–10). Ground-truth production in the tranScriptorium project. Proceedings of the 11th IAPR International Workshop on Document Analysis Systems (DAS), Tours, France.10.1109/DAS.2014.23 ↗
36. The IAM-database: An English sentence database for offline handwriting recognition10.1007/s100320200071 ↗
37. Grosicki, E., Carre, M., Brodin, J.M., and Geoffrois, E. (2008, January 19–21). RIMES evaluation campaign for handwritten mail processing. Proceedings of the ICFHR 2008: 11th International Conference on Frontiers in Handwriting Recognition, Montréal, QC, Canada.
38. Fischer, A., Indermühle, E., Bunke, H., Viehhauser, G., and Stolz, M. (2010). Ground truth creation for handwriting recognition in historical documents. ACM Int. Conf. Proc. Ser., 3–10.10.1145/1815330.1815331 ↗
39. Fischer, A., Frinken, V., Fornés, A., and Bunke, H. (2011, January 16–17). Transcription Alignment of Latin Manuscripts Using Hidden Markov Models. Proceedings of the 2011 Workshop on Historical Document Imaging and Processing, Beijing, China. HIP’11.10.1145/2037342.2037348 ↗
40. Bluche, T., and Messina, R. (2017, January 9–15). Gated Convolutional Recurrent Neural Networks for Multilingual Handwriting Recognition. Proceedings of the 14th IAPR International Conference on Document Analysis and Recognition (ICDAR), Kyoto, Japan.10.1109/ICDAR.2017.111 ↗
41. Granell, E., Chammas, E., Likforman-Sulem, L., Martínez-Hinarejos, C.D., Mokbel, C., and Cirstea, B.I. (2018). Transcription of Spanish Historical Handwritten Documents with Deep Neural Networks. J. Imaging, 4.10.3390/jimaging4010015 ↗
42. Integrated Handwriting Recognition In addition, Interpretation Using Finite-State Models10.1142/S0218001404003344 ↗
43. Graves, A., Fernández, S., Gomez, F., and Schmidhuber, J. (2006, January 25-29). Connectionist temporal classification: Labelling unsegmented sequence data with recurrent neural networks. Proceedings of the ICML 2006—23rd International Conference on Machine Learning, Pittsburgh, PA, USA.10.1145/1143844.1143891 ↗
44. A Novel Connectionist System for Unconstrained Handwriting Recognition10.1109/TPAMI.2008.137 ↗
45. Tensmeyer, C., Wigington, C., Davis, B., Stewart, S., Martinez, T., and Barrett, W. (2018, January 5–8). Language Model Supervision for Handwriting Recognition Model Adaptation. Proceedings of the 2018 16th International Conference on Frontiers in Handwriting Recognition (ICFHR), Niagara Falls, NY, USA.10.1109/ICFHR-2018.2018.00032 ↗
46. Toselli, A.H. (2004). Reconocimiento de Texto Manuscrito Continuo. [Ph.D. Thesis, Universidad Politécnica de Valencia].
47. Efficient illumination compensation techniques for text images10.1016/j.dsp.2012.04.010 ↗
48. A New Normalization Technique for Cursive Handwritten Words10.1016/S0167-8655(01)00042-3 ↗
49. Scheidl, H. (2018). Handwritten Text Recognition in Historical Documents. [Ph.D. Thesis, Technischen Universität Wien].
50. Dauphin, Y.N., Fan, A., Auli, M., and Grangier, D. (2017, January 6–11). Language Modeling with Gated Convolutional Networks. Proceedings of the 34th International Conference on Machine Learning, JMLR.org, ICML’17, Sydney, Australia.
51. Large vocabulary offline handwriting recognition: A survey10.1007/s10044-002-0169-3 ↗
52. Pham, V., Bluche, T., Kermorvant, C., and Louradour, J. (2014, January 1–4). Dropout Improves Recurrent Neural Networks for Handwriting Recognition. Proceedings of the 2014 14th International Conference on Frontiers in Handwriting Recognition, Hersonissos, Greece.10.1109/ICFHR.2014.55 ↗
53. Voigtlaender, P., Doetsch, P., and Ney, H. (2016, January 23–26). Handwriting Recognition with Large Multidimensional Long Short-Term Memory Recurrent Neural Networks. Proceedings of the 15th International Conference on Frontiers in Handwriting Recognition (ICFHR), Shenzhen, China.10.1109/ICFHR.2016.0052 ↗
54. Are 2D-LSTM really dead for offline text recognition?10.1007/s10032-019-00325-0 ↗
55. An Empirical Study of Smoothing Techniques for Language Modeling10.1006/csla.1999.0128 ↗
56. Knerr, S., and Augustin, E. (1998, January 20). A neural network-hidden Markov model hybrid for cursive word recognition. Proceedings of the Fourteenth International Conference on Pattern Recognition (Cat. No.98EX170), Brisbane, Australia.
57. De Castro Oliveira, D.W. (2018). Deep Multidimensional Recurrent Neural Networks for Offline Handwriting Text Line Recognition. [Master’s Thesis, Universidade de Pernambuco].
58. Schuster-Böckler, B., and Bateman, A. (2007). An Introduction to Hidden Markov Models. Curr. Protoc. Bioinform.10.1002/0471250953.bia03as18 ↗
59. Jurafsky, D., and Martin, J.H. (2019). Speech and Language Processing—An Introduction to Natural Language Processing, Computational Linguistics, and Speech Recognition, Prentice Hall. [3rd ed.].
60. Whitelaw, C., Hutchinson, B., Chung, G.Y., and Ellis, G. (2009, January 6–7). Using the Web for Language Independent Spellchecking and Autocorrection. Proceedings of the 2009 Conference on Empirical Methods in Natural Language Processing, Singapore.10.3115/1699571.1699629 ↗
61. Li, Y., Duan, H., and Zhai, C. (2012, January 16–20). CloudSpeller: Query spelling correction by using a unified Hidden Markov Model with Web-scale resources. Proceedings of the WWW’12 21st Annual Conference on World Wide Web Companion, Lyon, France.10.1145/2187980.2188130 ↗
62. Guo, J., Sainath, T.N., and Weiss, R.J. (2019, January 12–17). A Spelling Correction Model for End-to-end Speech Recognition. Proceedings of the 2019 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Brighton, UK.10.1109/ICASSP.2019.8683745 ↗
63. Context-sensitive Spelling Correction Using Google Web 1T 5-Gram Information
64. Lichtarge, J., Alberti, C., Kumar, S., Shazeer, N., Parmar, N., and Tong, S. (2019, January 2–7). Corpora Generation for Grammatical Error Correction. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Minneapolis, MN, USA.10.18653/v1/N19-1333 ↗
65. Kurdi, M. (2017). Natural Language Processing and Computational Linguistics 2: Semantics, Discourse, and Applications, ISTE Wiley.10.1002/9781119419686 ↗
66. Taylor, A., Marcus, M., and Santorini, B. (2003). The Penn Treebank: An Overview, Springer.10.1007/978-94-010-0201-1_1 ↗
67. Four types of context for automatic spelling correction
68. Spell Checking Techniques in NLP: A Survey
69. A Survey of Spelling Error Detection and Correction Techniques
70. Hakkinen, J., and Tian, J. (2001, January 9–13). N-gram and decision tree based language identification for written words. Proceedings of the IEEE Workshop on Automatic Speech Recognition and Understanding, 2001 ASRU ’01, Madonna di Campiglio, Italy.
71. Word-frequency and vocabulary acquisition: An analysis of elementary spanish college textbooks in the USA10.4067/S0718-48832009000200004 ↗
72. Vocabulary and Reading Comprehension Revisited: Evidence for High-, Mid-, and Low-Frequency Vocabulary Knowledge10.1177/2158244019845182 ↗
73. An intelligent spelling error corrector10.1016/0306-4573(83)90046-8 ↗
74. Collection and characterization of spelling errors in scientific and scholarly text
75. The String-to-String Correction Problem10.1145/321796.321811 ↗
76. Probability scoring for spelling correction10.1007/BF01889984 ↗
77. Zimmermann, M., and Bunke, H. (2004, January 26–29). N-Gram Language Models for Offline Handwritten Text Recognition. Proceedings of the Ninth International Workshop on Frontiers in Handwriting Recognition, IWFHR ’04, Tokyo, Japan.
78. Mokhtar, K., Bukhari, S.S., and Dengel, A. (2018, January 24–27). OCR Error Correction: State-of-the-Art vs an NMT-based Approach. Proceedings of the 2018 13th IAPR International Workshop on Document Analysis Systems (DAS), Vienna, Austria.10.1109/DAS.2018.63 ↗
79. Ioffe, S. (2017, January 4–9). Batch Renormalization: Towards Reducing Minibatch Dependence in Batch-Normalized Models. Proceedings of the 31st International Conference on Neural Information Processing Systems, Long Beach, CA, USA.
80. He, K., Zhang, X., Ren, S., and Sun, J. (2015, January 7–13). Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classification. Proceedings of the 2015 IEEE International Conference on Computer Vision (ICCV), Santiago, Chile.10.1109/ICCV.2015.123 ↗
81. Jaf, S., Bradley, S., Gajbhiye, A., Al Moubayed, N., and Mcgough, A. (2018, January 4–7). An Exploration of Dropout with RNNs for Natural Language Inference. Proceedings of the 27th International Conference on Artificial Neural Networks (ICANN), Rhodes, Greece.
82. Ba, J., Kiros, J.R., and Hinton, G.E. (2016). Layer Normalization. arXiv.
83. Agarwal, S., Godbole, S., Punjani, D., and Roy, S. (2007, January 28–31). How Much Noise Is Too Much: A Study in Automatic Text Classification. Proceedings of the Seventh IEEE International Conference on Data Mining (ICDM 2007), Washington, DC, USA.10.1109/ICDM.2007.21 ↗
84. Graves, A. (2012). Supervised Sequence Labelling with Recurrent Neural Networks, Springer. Studies in Computational Intelligence.10.1007/978-3-642-24797-2 ↗
85. Better Bootstrap Confidence Intervals10.1080/01621459.1987.10478410 ↗
86. Wilcoxon, F. (1992). Individual Comparisons by Ranking Methods, Springer.10.1007/978-1-4612-4380-9_16 ↗
87. Conover, W.J. (1971). Practical Nonparametric Statistics, John Wiley & Sons.
88. Hwang, K., and Sung, W. (2016, January 20–25). Character-level incremental speech recognition with recurrent neural networks. Proceedings of the 2016 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Shanghai, China.10.1109/ICASSP.2016.7472696 ↗
89. Glorot, X., and Bengio, Y. (2010, January 13–15). Understanding the difficulty of training deep feedforward neural networks. Proceedings of the International Conference on Artificial Intelligence and Statistics (AISTATS’10), Sardinia, Italy.
90. Dropout: A Simple Way to Prevent Neural Networks from Overfitting
91. Ioffe, S., and Szegedy, C. (2015, January 6–11). Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift. Proceedings of the 32nd International Conference on International Conference on Machine Learning—JMLR.org, ICML’15, Lille, France.
92. Maas, A.L., Hannun, A.Y., and Ng, A.Y. (2013, January 16). Rectifier nonlinearities improve neural network acoustic models. Proceedings of the ICML Workshop on Deep Learning for Audio, Speech and Language Processing, Atlanta, Georgia.
93. Lecture 6.5–RmsProp: Divide the gradient by a running average of its recent magnitude
94. Stefanovič, P., Kurasova, O., and Štrimaitis, R. (2019). The N-Grams Based Text Similarity Detection Approach Using Self-Organizing Maps and Similarity Measures. Appl. Sci., 9.10.3390/app9091870 ↗
95. Norvig, P. (2019, October 17). How to Write a Spelling Corrector. Available online: https://norvig.com/spell-correct.
96. Garbe, W. (2019, October 17). 1000x Faster Spelling Correction Algorithm. Available online: https://towardsdatascience.com/symspellcompound-10ec8f467c9b.
97. Kingma, D.P., and Ba, J. (2015, January 7–9). Adam: A Method for Stochastic Optimization. Proceedings of the 3rd International Conference on Learning Representations (ICLR), San Diego, CA, USA.