Digitizing Nepal's Written Heritage: A Comprehensive HTR Pipeline for Old Nepali Manuscripts
This paper introduces the first end-to-end Handwritten Text Recognition pipeline for Old Nepali manuscripts, achieving a 4.9% Character Error Rate through systematic exploration of encoder-decoder architectures and data-centric techniques while releasing code and configurations to support low-resource historical script research.
Original paper licensed under CC BY 4.0 (http://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
Imagine you have a library of ancient, fragile books written in a language that hasn't been spoken in its original form for centuries. The ink is faded, the paper is crinkled, and the handwriting is as unique as a fingerprint—no two scribes wrote the same way. Trying to get a computer to read these books is like asking a robot to decipher a secret code written by a thousand different artists, all using a script that looks like a tangled vine of symbols.
This paper is the story of how a team of researchers built a "super-reader" to digitize Old Nepali manuscripts. Here is how they did it, explained simply:
The Challenge: A Needle in a Haystack
The researchers wanted to teach a computer to read Old Nepali, a language written in the Devanagari script (the same script used for modern Hindi and Nepali, but with some old-school quirks).
- The Problem: There are very few examples of these old handwritten notes available for the computer to study. It's like trying to teach someone to recognize a specific type of bird when you only have three blurry photos of it.
- The Mess: The documents are messy. The ink smudges, the paper is warped, and the writers didn't use spaces between words. They also used strange symbols that look like dots or lines, which change meaning depending on where they are placed.
The Solution: A Three-Step Training Camp
Since they didn't have enough "real" old books to teach the computer directly, they created a three-stage training pipeline. Think of this as a student going from kindergarten to college before tackling a PhD thesis.
Stage 1: The Synthetic Playground (Kindergarten)
The computer couldn't learn from real old books yet because there weren't enough. So, the team built a massive "fake" library using computer-generated text. They took modern Nepali textbooks, printed them in 11 different fonts, and then deliberately "ruined" them. They added digital noise, blurred the lines, and twisted the pages to look like they had been sitting in a dusty attic for 200 years. This gave the computer 100,000 practice examples to learn the basic shapes of the letters.Stage 2: The Printed Bridge (High School)
Next, they moved to real, but printed, Devanagari text. This is like moving from a video game to a real classroom. The text is still clean and clear, but it's real data from a university archive. This step helped the computer bridge the gap between the "fake" messy images and the real world.Stage 3: The Final Exam (College)
Finally, they fed the computer the actual treasure: 3,100 lines of real, handwritten Old Nepali from 155 ancient manuscripts. Because the computer was already well-trained on the first two stages, it could now focus on the specific quirks of the old handwriting, the smudges, and the unique style of the scribes.
The Secret Sauce: Cleaning and Stretching
The researchers realized that the quality of the data mattered more than the complexity of the computer brain.
- Cleaning the Labels: They found that the digital notes describing what the handwriting should say had tiny errors (like using two different codes for the same dot symbol). They "cleaned" these notes so the computer wasn't confused by its own teacher.
- Data Augmentation (The Gym): To make the computer stronger, they took the existing images and digitally "stretched," "warped," and "smudged" them. It's like a weightlifter adding extra weight to the bar. By making the computer practice on thousands of slightly different versions of the same page, it learned to recognize the text even when it was distorted.
The Results: A Near-Perfect Reader
The team tested their system against other tools (like Google's standard OCR and a basic version of their own model).
- The Score: Their best model made a mistake on only 4.9% of the characters. That means if you handed it a page with 1,000 letters, it would get about 951 of them right.
- The Comparison: Standard tools failed miserably, often missing the complex connected letters (conjuncts) that are common in this script. Their custom model was significantly better.
What the Computer Got Wrong
Even with a 95% success rate, the computer isn't perfect. The researchers analyzed the errors and found they weren't random.
- Visual Twins: The computer often confused letters that look very similar in handwriting (like the letter 'y' and 'p'). It's like a human confusing a handwritten 'b' and 'd'.
- Long Struggles: The computer did great on short and medium sentences but started to stumble on very long lines (over 120 characters). It seems the computer gets "tired" or loses its place when the text gets too long, likely because it didn't see enough long examples during training.
The Takeaway
The researchers built a web app where you can upload a photo of an old manuscript, and it will automatically find the lines of text and type them out for you.
The Big Lesson: In the world of reading ancient, messy handwriting, data is king. You don't necessarily need a bigger, more complex computer brain; you need better training data, cleaner labels, and a lot of practice with "messy" examples. By carefully curating their training process, they turned a low-resource, difficult language into something a computer can read with high accuracy, helping to preserve Nepal's written history for the future.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.