Live data from Hacker News

Ask HN: OCR for 100 year old (German) handwritten cursive script?

news.ycombinator.com

21–30 of 45 posts

Re: Ask HN: OCR for 100 year old (German) handwritten cursive script?

#22
post #3

You can train Tesseract to recognize Handwriting[1], but the first and most important step would be the preprocessing of your documents. I would recommend to start with a local adaptive thresholding algorithm[2] like Sauvola for binarization. The preprocessing steps would be[3] 1) Binarization 2) Skew Correction 3) Noise Removal 4) Thinning and Skeletonization Probably you are facing "Sütterlin"[4], which differs qui…

This is great, I also did find this https://github.com/IgorMeloS/OCR/blob/main/7%20-%20template-... which is part of this https://github.com/IgorMeloS/OCR could be useful for this as well.

Re: Ask HN: OCR for 100 year old (German) handwritten cursive script?

#23
I don't know if it will be significantly different than what Google Translate does, but I would give the major cloud vendors (Google, Amazon, Microsoft and I guess OpenAI/ChatGPT) OCR services a shot. It's pretty simple and cheap to do (like, about a dollar for the whole thing). Last time I compared them, Google's OCR came out ahead, but it's task-dependent so in your case it might be different.

General purpose open-source OCR solutions like Tesseract, TrOCR, etc will probably not be as good as the cloud ones, based on my experience.

There's some specialized research work out there for antique manuscripts, but that will require some digging on your part with an uncertain outcome. I think at that point, I would also look into manual transcription - for 200 pages, it might be reasonably affordable.

Re: Ask HN: OCR for 100 year old (German) handwritten cursive script?

#24
post #9

GPT-4 Vision. I have seen some examples of middly agy looking pages tried.

I would try this but the downside is GPT-4 vision currently doesn’t like to extract large text blocks. You could try extracting line bounding boxes with PyMupdf and feeding it individual lines.

Re: Ask HN: OCR for 100 year old (German) handwritten cursive script?

#25

I don't know if it will be significantly different than what Google Translate does, but I would give the major cloud vendors (Google, Amazon, Microsoft and I guess OpenAI/ChatGPT) OCR services a shot. It's pretty simple and cheap to do (like, about a dollar for the whole thing). Last time I compared them, Google's OCR came out ahead, but it's task-dependent so in your case it might be different. General purpose open-…

Fwiw, we've found the Azure AI OCR service to be pretty good, much better then anything we could get from Tesseract out of the box (no tuning).

Re: Ask HN: OCR for 100 year old (German) handwritten cursive script?

#26
post #3

You can train Tesseract to recognize Handwriting[1], but the first and most important step would be the preprocessing of your documents. I would recommend to start with a local adaptive thresholding algorithm[2] like Sauvola for binarization. The preprocessing steps would be[3] 1) Binarization 2) Skew Correction 3) Noise Removal 4) Thinning and Skeletonization Probably you are facing "Sütterlin"[4], which differs qui…

The letters from [4] remind me of modern Russian cursive which has some similarly interesting changes to some letters to make them faster to write. I wonder if there's any research on Russian cursive OCR that could help

Re: Ask HN: OCR for 100 year old (German) handwritten cursive script?

#27
post #4

Does it look like Sütterlin? Are you familiar with it? [] https://en.wikipedia.org/wiki/S%C3%BCtterlin

Not familiar with it, but it doesn’t look like that. I wish haha

100 years ago Sütterlin would be pretty likely. If your sample is not Sütterlin I would consider the possibility that it is older.

Re: Ask HN: OCR for 100 year old (German) handwritten cursive script?

#28
I worked in the same space as a company that does this with ML (and charges for it), using some form of Recurrent Neural Network IIRC. Maybe LSTMs?

They had a contract to index historical French archives composed of handwritten latin documents in elasticsearch.

Depending of the historical relevance of your documents (read: some academic funds), they may be able to help. Doesn't hurt to contact them:

https://teklia.com/

Re: Ask HN: OCR for 100 year old (German) handwritten cursive script?

#30
Low hanging fruit when reading these old German scripts is to get used to distinguish the different forms of the letter s. That alone will get you far. Same for OCR, it needs to be capable of that. Otherwise the result will read as if someone without front teeth has written how they speak.
Post reply on HN