Repository navigation
识别扫描的 PDF 里的文字 - #103
Merged
Merged
识别扫描的 PDF 里的文字#103
Conversation
有的通知把文件扫描成 PDF 挂出来,pypdf 取不出文字,抽取就看不到(#47)。 - PDF 的某一页取不出文字时,用 pypdf 取出这一页上的图片,交给图片附件用的文字识别;扫描件一页就是一张图片,不另加渲染页面的库 - pypdf 解出图片要用 Pillow,依赖写成 `pypdf[image]`,锁定的版本不变 - 把真实通知做成扫描件,在限成 4 核、3600 MiB 的容器里实测,结果写进总体设计 §5.2;§5.1、§7.4、§16 跟着改,§18 去掉这一项
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联
Closes #47
改了什么
图片附件的识别已在 #74 合并,这个 PR 接上 #47 剩下的扫描的 PDF:有的通知把文件扫描成 PDF 挂出来,pypdf 取不出文字,抽取就看不到。
pypdf[image];Pillow 已经随 RapidOCR 装上,锁定的版本都不变。怎么验证的
--cpus=4 --memory=3600m --network none的容器里识别。其中 5 份有日期、时刻、网址和邮箱,共 18 项,空格不计:彩色认对 17 项,黑白 16 项,转过的 14 项;峰值内存最高 745 MiB。黑白的图片用 CCITT 压缩,镜像里能解开。crawler/check.sh通过,338 个测试。影响