[Paper Review] Vartani Spellcheck -- Automatic Context-Sensitive Spelling Correction of OCR-generated Hindi Text Using BERT and Levenshtein Distance
Vartani Spellcheck proposes a context-sensitive spelling correction system for OCR-generated Hindi text using BERT embeddings and Levenshtein distance. By combining a lookup dictionary, named entity recognition, and contextual embeddings, it achieves 81% accuracy on Tesseract-OCR'd Ramayana text, significantly outperforming prior context-free methods.
Traditional Optical Character Recognition (OCR) systems that generate text of highly inflectional Indic languages like Hindi tend to suffer from poor accuracy due to a wide alphabet set, compound characters and difficulty in segmenting characters in a word. Automatic spelling error detection and context-sensitive error correction can be used to improve accuracy by post-processing the text generated by these OCR systems. A majority of previously developed language models for error correction of Hindi spelling have been context-free. In this paper, we present Vartani Spellcheck - a context-sensitive approach for spelling correction of Hindi text using a state-of-the-art transformer - BERT in conjunction with the Levenshtein distance algorithm, popularly known as Edit Distance. We use a lookup dictionary and context-based named entity recognition (NER) for detection of possible spelling errors in the text. Our proposed technique has been tested on a large corpus of text generated by the widely used Tesseract OCR on the Hindi epic Ramayana. With an accuracy of 81%, the results show a significant improvement over some of the previously established context-sensitive error correction mechanisms for Hindi. We also explain how Vartani Spellcheck may be used for on-the-fly autocorrect suggestion during continuous typing in a text editor environment.
Motivation & Objective
- To address low accuracy in OCR output for highly inflectional Indic languages like Hindi due to complex scripts and character segmentation issues.
- To develop a context-sensitive spelling correction system that improves post-OCR text quality beyond traditional context-free models.
- To integrate state-of-the-art NLP techniques—specifically BERT and Levenshtein distance—into a practical correction pipeline for Hindi.
- To enable real-time autocorrect suggestions in text editors by leveraging the proposed correction framework.
- To validate the system on a large, real-world corpus of Hindi text (the Ramayana) processed by Tesseract OCR.
Proposed method
- The system uses a lookup dictionary to identify potential spelling errors in OCR-generated Hindi text.
- Named entity recognition (NER) is applied to detect contextually relevant terms that may be misspelled.
- BERT embeddings are used to capture contextual representations of words, enabling context-sensitive correction decisions.
- Levenshtein distance (edit distance) is computed between candidate corrections and the original word to rank plausible corrections.
- The final correction is selected based on the lowest edit distance among BERT-embedded candidates that match the dictionary or NER-identified terms.
- The pipeline is designed to support on-the-fly autocorrection in real-time text editing environments.
Experimental results
Research questions
- RQ1Can a context-sensitive spelling correction system significantly improve the accuracy of OCR-generated Hindi text compared to context-free methods?
- RQ2How effective is the integration of BERT embeddings with Levenshtein distance for detecting and correcting Hindi spelling errors in OCR output?
- RQ3To what extent can named entity recognition and dictionary lookup enhance error detection in low-resource, morphologically rich languages like Hindi?
- RQ4Can the proposed system be adapted for real-time, interactive autocorrect in text editors?
- RQ5What is the performance of the system on a large, real-world corpus of Hindi text such as the Ramayana?
Key findings
- The proposed Vartani Spellcheck system achieves an accuracy of 81% on a large corpus of Tesseract-OCR-processed Hindi text from the Ramayana.
- The context-sensitive approach using BERT and Levenshtein distance outperforms previously established context-free error correction mechanisms for Hindi.
- The integration of named entity recognition and dictionary lookup significantly improves the detection of potential spelling errors in morphologically complex text.
- The system demonstrates feasibility for real-time application, enabling on-the-fly autocorrect suggestions during continuous typing.
- The results confirm that combining contextual embeddings with edit distance yields better correction quality than either method alone in low-resource, high-inflectionality settings.
- The method shows robustness on a large, domain-specific corpus, indicating potential for broader application in Indic language NLP.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.