Ensemble Method for OCR Error Handling in Early-Modern Japanese Texts
This paper proposes an ensemble method combining a Bi-GRU model, a dictionary, and BERT to effectively detect and correct OCR errors in early-modern Japanese texts, achieving a 74.9% F-measure that outperforms baseline approaches.
Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
The written word is a fragile thing. Paper yellows, ink fades, and the physical pages of history slowly crumble. To preserve these records, libraries and archives have spent decades scanning books and converting the images of their pages into digital text that computers can read and search. This process, known as optical character recognition, works remarkably well for modern books where the fonts are uniform and the paper is clean. However, the task becomes far more difficult when the source material is from a time before standardization, such as Japanese books published between the late 19th and early 20th centuries. These texts feature a chaotic variety of typefaces, worn printing, and characters that look startlingly similar to one another. When a computer tries to read them, it often mistakes one character for another, creating a digital text that looks correct at a glance but is filled with subtle, silent errors that render the content useless for serious research.
A team of researchers from universities in Nara, Kyoto, and Shiga has developed a new way to fix these specific mistakes. They created a system that acts like a two-step editor for these damaged digital texts. First, the system scans the text to find where the errors are hiding. Instead of relying on a single method to do this, they combined two different approaches: one that checks if a word exists in a known list, and another that uses a computer model trained to understand the flow and context of a sentence. By having these two methods work together, the system can catch errors that one method might miss while ignoring false alarms that the other might raise. Once an error is found, the system suggests the correct character to replace it, using a powerful language model to guess the most likely word based on the surrounding text. Their experiments showed that this combined approach finds errors more accurately than previous methods and successfully corrects a significant portion of them, making the digitized history of early modern Japan much more reliable for scholars and the public.
The challenge of reading these old books is not just about the age of the paper, but the nature of the printing itself. Unlike today's books, which use consistent fonts, publications from the Meiji to the early Showa era were printed with a wide variety of typefaces that changed from publisher to publisher and even from year to year. The printing process of that time often resulted in blurry or uneven characters. When modern optical character recognition software, which is trained on clean, standard text, tries to read these pages, it frequently confuses characters that look alike. For example, a character with a slight extra stroke might be read as a completely different word. While specialized software has been built to handle these old fonts, it still makes mistakes on roughly three percent of the characters. In a long sentence, this means that nearly half of all sentences contain at least one error, which is too many for a computer to search through or for a researcher to trust without verification.
To solve this, the researchers built a system that operates in two distinct stages: detection and correction. The first stage is the most critical, as the system must identify exactly which characters are wrong without flagging the correct ones as errors. The team realized that using just one tool to find these mistakes was not enough. A simple dictionary check, which looks to see if a word is in a list of known words, is very good at spotting nonsense but often fails when it encounters a rare or unknown word that is actually correct. On the other hand, a computer model that learns from the context of a sentence is very good at understanding how words fit together, but it can sometimes get confused by rare names or specific terms it has not seen often.
The researchers decided to combine these two strengths into a single ensemble method. They took the output from a dictionary-based checker and the output from a context-aware computer model and made them work together. If the dictionary says a word is missing, the system checks if the context model also thinks it is wrong. If both agree, the system marks it as an error. If only one thinks it is wrong, the system assumes it might be a rare but correct word and leaves it alone. This strategy significantly reduced the number of times the system falsely accused a correct word of being an error. In their testing, this combined approach correctly identified errors about 75 percent of the time while keeping the number of false alarms much lower than either method could achieve on its own.
Once the system has pinpointed the errors, it moves to the second stage: fixing them. The researchers replaced the suspected wrong character with a blank space, or a "mask," and asked a sophisticated language model to predict what the original character should have been. This model, trained on vast amounts of text from the same era, looks at the words before and after the blank space to guess the most likely candidate. To ensure the guess was a good fit, the system also checked how similar the new character looked to the old, wrong one, since OCR errors usually happen between characters that resemble each other. The system then ranked its top guesses and selected the best one.
The results of this new method were promising. When the researchers tested their system on thousands of sentences from digitized books, they found that it corrected about 65 percent of the errors it successfully detected. This was a noticeable improvement over using the context model alone, which corrected about 58 percent of the errors. The system was particularly effective when it had found the exact location of the error without any confusion; in those cases, the correction success rate jumped to over 90 percent. However, the researchers also noted a trade-off. By being very careful to avoid false alarms, the system sometimes missed some errors entirely, meaning it did not catch every single mistake in the text. They found that the system struggled most with very rare words or proper names that were not common in the training data, as neither the dictionary nor the context model had enough information to be sure about them.
Despite these limitations, the study demonstrates that combining different types of checks is a powerful way to clean up historical texts. The researchers showed that by letting a dictionary and a context-aware model cross-check each other, they could create a more reliable tool for historians and librarians. This work does not claim to have solved the problem of reading old Japanese books completely, but it provides a significant step forward in making the digital versions of these texts accurate enough to be useful. As more books are digitized, methods like this will be essential for ensuring that the digital archive is a faithful reflection of the original, preserving the true voice of the past for future generations.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.