Rescuing old books and letters from unreadable PDFs
Reintroducing Project Akshara and Paper Lanterns: turning old Indian books and historical letter collections into free, readable libraries—with a lot of trial, error, and eye strain along the way.
Hello dear readers, Over the weekend, I revamped and relaunched two passion projects I’ve been working on for the last year: Project Akshara and its sister project, Paper Lanterns.
I put up separate posts on Akshara and Paper Lanterns, and honestly, I didn’t want to go through the hassle of writing a brand new post from scratch again. Even though you didn’t ask for it, here’s the combined backstory of what both projects are, how they came to be, why they stalled for months, and why I’m so excited about them right now.
I discovered the virtues of the public domain relatively late in life. That some of the greatest books, letters, pamphlets, music, poetry, and philosophy ever created were freely available for anybody to read, listen to, reuse, and build upon just shattered my already flimsy brain.
Somewhere along that reading journey, I came across Project Gutenberg. I loved the sheer audacity of the idea, let alone that somebody actually made it real: more than 70,000 books, free for anyone to download and share. The fact that volunteers pulled it off before the modern web even existed is spectacular.
And a question got stuck in my head: why isn’t there a Project Gutenberg for India?
We talk endlessly about our history, how old it is, and how we gave the world this and that—all our jingoistic boasts. Yet when it comes to preserving the written memory of our civilization, we’ve done a piss-poor job. Yes, a piss-poor job. Sure, there are lakhs of scans of public-domain Indian books scattered across the Internet Archive, Heidelberg, Chicago’s DSAL, and elsewhere. Every year the government spends, god knows how much, in hundreds or thousands of crores on digitizing this and preserving that across portals I’ve lost track of. Where did all that money go? Where are the actual books?
It depressed me a little that nobody bothered to fix this, even though I knew of noble souls who spent their entire lives scanning and archiving these books, people like Omshivaprakash (behind Sanchaya and Servants of Knowledge) and Shiju Alex (behind Granthappura and the Indic Digital Archive Foundation). Scanning is only one part of it, though. If a book isn’t easy to read and share, its reach shrinks. Even for me, there’s only so much patience I have for squinting at shoddy scans.
Around the same time, I accidentally discovered Shaun Usher’s Letters of Note and fell in love with historical correspondence, which is insanely good.
Letters are unique because most of them were never meant to be read by a large audience. They were intimate messages meant for one person, and the way an author writes a letter is very different from the way they write a book. Take Dostoevsky’s letter to his brother from prison right after his mock execution, which is one of my all-time favorites:
Brother! I have not become downhearted or low-spirited. Life is everywhere life, life in ourselves, not in what is outside us. There will be people near me, and to be a man among people and remain a man for ever, not to be downhearted nor to fall in whatever misfortunes may befall me—this is life; this is the task of life.
— Fyodor Dostoevsky, letter to his brother Mikhail, 22 December 1849
Even though I haven’t read Dostoevsky’s novels, I’m reasonably sure Dostoevsky the writer is different from Dostoevsky the brother. Letters show you a whole other side of people we admire: mostly warm, tender, and affectionate, and sometimes the not-so-good sides too. Plus they’re full of what can only be called bangers, like Francis Bacon telling his uncle Lord Burghley in 1592,
“for I have taken all knowledge to be my province”—a line I try to live by.
For a long time I couldn’t do much with either obsession because I wasn’t a coder. I don’t know JavaScript from idli-vada. Just a reader and a bit of a writer.
Then, after 2023, coding tools like Windsurf, Claude Code, and Codex showed up, and I saw a glimmer of hope. I still had no clue how to turn old scans into clean books, so I started small: a directory of links to Indian public-domain scans called Dhwani (if the books were unreadable, they could at least be discoverable), and an early version of Paper Lanterns with 40 or 50 curated letters.
Then I started messing around with OCR models and had an oh shit moment: I could actually extract text from old scans myself.
In hindsight, what I did at the beginning was very, very stupid. I uploaded entire 700-page PDFs straight into chat boxes. I created five accounts on Baidu’s PaddleOCR to get around their 50,000-page monthly cap and ran books overnight. For the first couple of books—Harihar Das’s Life and Letters of Toru Dutt and Sophia Dobson Collet’s The Life and Letters of Raja Rammohun Roy—I moved to Google AI Studio for its longer context window, asked for Markdown, copy-pasted the output, and stitched the files together by hand. Whenever I hit recitation blocks and content filters, I’d chop the PDFs smaller and do it all over again. A giant waste of time, though since I knew nothing about archiving or text extraction, my stupidity has to be excused.
Everything changed when I told Kailash what I was doing. He gave me what can only be described as a quick workshop and told me to use Gemini’s APIs properly. I’d already been playing with vision models; I just didn’t have a structure.
Suddenly, extracting clean text from challenging PDFs—and turning them into readable web editions, EPUBs, PDFs, and Markdown—became possible. Somewhere around this time last year, I started Akshara and uploaded about 25 books. Simultaneously, I also started working on Paper Lanterns to digitize full collections of letters instead of curating letters one by one, which I still wanted to do, though I parked that idea for a bit and started with a few collections of letters by Nehru, Gandhi, Tagore, and Dostoevsky.
After that, both projects took a backseat because I didn’t want to upload the extracted output as it was. At the bare minimum, I wanted to do a basic check against the PDFs to see if the broad items—front matter, headings, formatting, diacritics, whether the footnotes were linked, whether all the pages were extracted, and so on—were okay.
Manually checking every word is impossible, so what I used to do was enter the first and last word of every paragraph and see if it was all right. Even this took an entire day for one book. Given that I have a full-time job and other commitments, doing this weekend after weekend became impossible. It started showing up physically too: my right eye started hurting from staring at the screen for long periods checking these books, and there’s still some pain in that eye. That’s when the realization dawned on me that this just wasn’t possible.
Then, about a month ago, the new family of Gemini models launched, and out of curiosity I asked Gemini to rebuild the pipeline I was using for text extraction. I was shocked at how good Gemini had gotten. For context, in the first year, I digitized about 25 books on Akshara and about five collections of letters on Paper Lanterns. In the last two weeks alone, I’ve digitized close to 60 books on Akshara and close to 40 collections of letters on Paper Lanterns—all of this working alone, with the accuracy of the extracted text well north of 95%.
There are still a few issues in how the extracted text gets assembled, like footnotes leaking into the body, improper placement of footnotes, bad tagging schemes, and so on. None of them are dealbreakers when it comes to reading a book, and I continue to work on improving the accuracy and quality of the assembled output.
In doing all of this, I also realized that the only way these projects will sustain is if I find other like-minded people who understand the importance of preserving our linguistic heritage. So the idea now is to build a community around this and seek help from other people to proofread these texts. I asked Claude and Gemini to build me a distributed proofreader in the vein of what Wikisource has done, and that’s the idea behind proof.akshara.ink, where anyone can verify the extracted text right alongside the image of the original scan and see if everything is all right.
That being said, if I use frontier models like Google Carbon or Google Neon, I can push the accuracy even further, except these models cost a bomb. Considering I’m a salaried employee paying for this out of pocket, I simply don’t have the money to afford the best models at scale, so I stick to cheaper ones like Gemini Flash. They’re still phenomenal, and those last niggling issues are essentially where human input is needed.
Now I want to try a few crazier things.
I work at Zerodha, and I’m deeply interested in economic and financial history. I know a whole lot of random things about US financial history and almost nothing about India’s, mostly because there are very few modern books I can just buy and read. So the experiment I’m working on under Akshara is a “living book” of the economic and financial history of India: extracting text from old economic books, pamphlets, and letters to build a corpus, and getting an LLM to write an economic history grounded directly in that archive. If it works, I want to try Indian maritime trade next. I have no idea if it’ll pan out, though LLMs are now letting me just do things.
Alongside Paper Lanterns, I also want to track down everything out of copyright in Indian correspondence and philosophy. And the one thing I really, really want to do on Akshara is regional literature: Hindi, Kannada, Tamil, Telugu, and so on. The models still aren’t great at Indian scripts, so if you read Hindi, Kannada, or Tamil and want to help proofread, I’d love to work with you.
Sorry for the long, rambling post; that’s what I’ve been up to.
Go check out Project Akshara and Paper Lanterns (you can also follow new additions on Akshara’s RSS feed and Paper Lanterns’ RSS feed). Everything on both sites is free and in the public domain. Use it and reuse it however you see fit; all I ask is a little credit to the sites, nothing more. I have nothing to sell.
If you know of neglected books or letter collections worth digitizing, want to volunteer on proofreading, or if you work with archival digitization and vision LLMs and know how to do this better and cheaper at scale, please reach out. I have no shame in admitting I’m just a monkey with Claude Code access, and I’m 100% sure this can be done better than what one person hacked together solo. Feedback, suggestions, kudos, and brickbats—all welcome.
Reply to this email, write to me at bhuvan@bebhuvan.com, or find me on Twitter (@bebhuvan) or LinkedIn.
Anyway, thank you for reading.
P.S. If somebody from Google or the Gemini team is reading this: for all the people who shit on you, I remain a fan. Even when your coding was weak, your vision models were really, really good, and they’ve carried both these projects from day one. Please give me some free API credits. 😬 I promise every bit of it goes straight into putting public-domain books and letters back on the open web, with zero commercial interest.
Bhuvan works at Zerodha on markets, data and curation, and writes here about money, technology, history and whatever else he can’t stop thinking about.
Follow the essays by RSS →