Originally created by: ZHA30
需求
- 在 OCR 阶段识别每页的页码、分页的位置,并添加至最终生成的 epub 文件中
使用场景
相关文档
示例
- 在 Koreader 阅读器中的显示

-
Epub 文件中相关的部分
<h1 class="ct"><span id="p2" role="doc-pagebreak" aria-label="2" class="page"/><span id="p3" role="doc-pagebreak" aria-label="3" class="page"/><span xmlns="http://www.w3.org/1999/xhtml" class="koboSpan" id="kobo.1.1"><img src="images/chi-zimmer-fig00001.jpeg" alt="" width="600" height="414"/></span></h1>
<p class="pf"><span xmlns="http://www.w3.org/1999/xhtml" class="koboSpan" id="kobo.4.1">Fifty miles southeast of the Mexican city of Chihuahua is a dry, bare mountain range called Sierra de Naica. </span><span xmlns="http://www.w3.org/1999/xhtml" class="koboSpan" id="kobo.4.2">In 2000, miners worked their way down through a network of caves below the mountains. </span><span xmlns="http://www.w3.org/1999/xhtml" class="koboSpan" id="kobo.4.3">When they got 1,000 feet underground, they found themselves in a place that seemed to belong to another world. </span><span xmlns="http://www.w3.org/1999/xhtml" class="koboSpan" id="kobo.4.4">They were standing in a chamber 30 feet wide and 90 feet long. </span><span xmlns="http://www.w3.org/1999/xhtml" class="koboSpan" id="kobo.4.5">The ceiling, walls, and floor were lined with </span><span id="p4" role="doc-pagebreak" aria-label="4" class="page"/><span xmlns="http://www.w3.org/1999/xhtml" class="koboSpan" id="kobo.5.1">smooth-faced, translucent crystals of gypsum. </span><span xmlns="http://www.w3.org/1999/xhtml" class="koboSpan" id="kobo.5.2">Many caves contain crystals, but not like the ones in Sierra de Naica. </span><span xmlns="http://www.w3.org/1999/xhtml" class="koboSpan" id="kobo.5.3">They measured up to 36 feet long and weighed as much as 55 tons. </span><span xmlns="http://www.w3.org/1999/xhtml" class="koboSpan" id="kobo.5.4">These were not crystals to hang from a necklace. </span><span xmlns="http://www.w3.org/1999/xhtml" class="koboSpan" id="kobo.5.5">These were crystals to climb like hills.</span></p>
-
相关 epub 文件
Originally posted by: Moskize91
很好的建议,在 EPUB 端实现不难,但目前难以从页面中正确提取页码。目前 pdf-craft 识别文字格式使用的是 https://github.com/opendatalab/DocLayout-YOLO ,它无法界定哪些文字是页码,统统都视为 abandon。