Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

去除页眉页脚的工作 #249

Open
lbboier opened this issue Jan 13, 2024 · 4 comments
Open

去除页眉页脚的工作 #249

lbboier opened this issue Jan 13, 2024 · 4 comments
Labels
question discussion

Comments

@lbboier
Copy link

lbboier commented Jan 13, 2024

我之前实习时做了pdf转txt的工作,其中pdf转word使用的该库(pdf2docx),然后word转txt是手写的。也在很大程度上实现了去除页眉页脚,但仅仅能满足于输出端是txt(不提取多列的表格)。在我实习期间处理了500w+本的pdf转txt,并在公司内部上线了部署服务。我走后接手这个工作的实习生又进行了优化,具体改进我没问。
我想看看大家对这个需求大不大,我可以选择新建一个开源库或者在pdf2docx提一个pr。希望有需求的可以在下方留言

@parksmallfish
Copy link

parksmallfish commented Jan 16, 2024

请问是什么思路呢?我尝试用文本相似性仅去除了一部分页眉页脚

@dothinking dothinking added the question discussion label Jan 16, 2024
@dothinking
Copy link
Contributor

我之前实习时做了pdf转txt的工作,其中pdf转word使用的该库(pdf2docx),然后word转txt是手写的。也在很大程度上实现了去除页眉页脚,但仅仅能满足于输出端是txt(不提取多列的表格)。在我实习期间处理了500w+本的pdf转txt,并在公司内部上线了部署服务。我走后接手这个工作的实习生又进行了优化,具体改进我没问。 我想看看大家对这个需求大不大,我可以选择新建一个开源库或者在pdf2docx提一个pr。希望有需求的可以在下方留言

目前页眉页脚都被当成正文处理,很多人都对识别页眉页脚这个功能提出了期待。欢迎分享识别页眉页脚的思路,或者直接提PR。

@nunamia
Copy link

nunamia commented Mar 26, 2024

使用layoutlmv3,可以识别出页眉,页脚的blocks,然后过滤掉区域即可

@lbboier
Copy link
Author

lbboier commented Mar 26, 2024

使用layoutlmv3,可以识别出页眉,页脚的blocks,然后过滤掉区域即可

pdf情况太复杂了,我去年也尝试过直接页眉页脚的区域(每页的上面和下面,检测文本变化,然后去除block),但是效果很不好。你有测试出比较好的效果吗?最好数据量大一点的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question discussion
Projects
None yet
Development

No branches or pull requests

4 participants