I am wondering how to take these Hieroglyphs and make them into Unicode. I read through the Tesseract docs on how to create training data, but it seems largely tailored toward "traditional" writing, that goes in one direction and has only one character per vertical-space-per-line. Whereas in Egyptian hieroglyphs, it is sort of nested writing, you might have 3 characters stacked vertically, followed by 2 characters stacked vertically, etc.

So I'm wondering what the best option is for doing the full spectrum, of taking one of the hieroglyphic images in that book, like this:

enter image description here

And layout not completely horizontally like this:

𓏺 π“‚‹ π“ˆ– π“‹΄π“‹΄π“ˆ–π“π“‚Š π“Š‘π“…±π“ͺ π“…œπ“…œπ“‚ π“ˆ— π“…œ π“†„π“ŠΌ π“Œƒπ“†“ π“‡‹π“ˆ– 𓃉𓃉𓃉𓃉 π“Œπ“Œπ“Œ π“€”π“€€ 𓃉𓃉𓃉𓃉 π“‡‹π“€ž 𓏏𓍃𓀭 π“‚žπ“Ž‘ π“ˆ–π“€€ π“Š‘π“…±π“ͺ π“‡›π“…œπ“œ π“‡‹π“Άπ“…œπ“­ π“ˆšπ“‚‹π“π“ƒΏπ“Ž‘ π“Œπ“Ž‘π“€€ π“‹΄ π“π“ˆ–π“‚˜ 𓃀𓏏𓉐 π“Ž€π“…±π“‡Œ 𓁷𓂋 π“‹π“Ž€ 𓃹 π“ˆ–π“Œπ“…±π“Š– 𓇋𓅱 π“€Ίπ“„Ώπ“‚‘ π“ˆ–π“€” π“‹΄π“…±π“Ž›π“π“†‡ π“Ž€π“…±π“‡Œ π“ˆ–π“ π“ŽΌπ“ˆ–π“ŽΌπ“ˆ– π“…¨π“‚‹π“€­ π“‚‹π“…±π“‚§π“―π“œ π“€€π“‚‹π“…±π“‚§π“―π“œ 𓏛 π“‹Ήπ“ˆ–π“π“€€ π“‹Ήπ“ˆ–π“ 𓏛 π“‹΄π“‹΄π“ˆ–π“‚Š π“Š‘π“…±π“ͺπ“‰˜π“€€π“‰ π“‹΄π“‹΄π“ˆ–π“ƒΏ π“Š‘π“…±π“ͺπ“‰˜π“›π“‰

but instead layout in HTML exactly like they are laid out in the original textbook.

What I would imagine to do is, use OCR (or similar technology?) to identify the individual glyphs. I would manually draw squares around characters and map them to unicode characters. Then I would go and use that as training data somehow. Then it would go, page-by-page, through the document, and layout the text as it sees it in the document (with Egyptian Hieroglyphic quirks and all, everything in the proper place). I would imagine that there would be some tool that could use my manually trained squares and return { x: ..., y: ..., w: ..., h: ..., char: ... } for each glyph it finds. Then I can simply do my think with that data and convert it to HTML with CSS and absolute positioning.

The question is, how do I do that middle step? How do I do everything up to the HTML portion even? Should I be looking at Tesseract, or is there a more general tool like an "image recognition" tool that I could use to take my models (of some kind, x/y/w/h perhaps of boxes) and return my x/y/w/h/char array for each page. How can I do that, at a high level? I can figure out the specific CLI commands to run, or library API methods to call, I am just not sure what the state of the art is here and what type of tool would be best and easiest in this case.

  • I am on a similar mission, did you reach any progress, maybe we colab ?
    – omars
    Commented Jun 5, 2023 at 8:20
  • @Omar Nope, made no progress here, if you figure anything out definitely update!
    – Lance
    Commented Jun 5, 2023 at 10:54
  • I'm moving far away from this approach, it is way too complex, I'm going into 1. OCR detect glyph 2. extract into PNG 3. make a characterset, similar to the UnicodeBlock font, but with advanced vocabulary difficult mission, I made a prototype, skeleton app that simplifies experiementation. I can share, to experiment with different algos, I also found a research paper on the topic
    – omars
    Commented Jun 5, 2023 at 11:26
  • 1
    My goal is to make a new Unicode Font with extensive vocabulary from Middle Egyptian
    – omars
    Commented Jun 5, 2023 at 11:29
  • @Omar wow really cool, I'd love to see it when it becomes available!
    – Lance
    Commented Jun 6, 2023 at 1:25


Your Answer

By clicking β€œPost Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.