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

[MRG] Add line_overlap and boxes_flow to LAParams #219

Merged
merged 1 commit into from
Jun 14, 2021
Merged

[MRG] Add line_overlap and boxes_flow to LAParams #219

merged 1 commit into from
Jun 14, 2021

Conversation

Arnie97
Copy link
Contributor

@Arnie97 Arnie97 commented Dec 17, 2020

I need to lower the line_overlap parameter to arrange punctuation marks on correct lines, hence this pull request.


As an example:

The correct result, after setting line_overlap=0.25:

 接京沪、津秦、津霸客专高速、京津联
络、武津、天津西、津霸客专线

The incorrect result produced when line_overlap=0.5, which is the default value provided by pdfminer. Note the punctuations were placed on a different line:

 接京沪 津秦 津霸客专高速 京津联
    、  、      、
络 武津 天津西 津霸客专线
 、  、   、

@codecov-io
Copy link

Codecov Report

Merging #219 (0dee385) into master (7709e58) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #219   +/-   ##
=======================================
  Coverage   88.35%   88.35%           
=======================================
  Files          14       14           
  Lines        1571     1571           
  Branches      358      358           
=======================================
  Hits         1388     1388           
  Misses        128      128           
  Partials       55       55           
Impacted Files Coverage Δ
camelot/utils.py 82.05% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7709e58...0dee385. Read the comment docs.

@claire-peters
Copy link

claire-peters commented Jun 2, 2021

Hey, @vinayak-mehta, is there a reason this change hasn't been merged? I'm eager to see this happen because I also need to be able to tweak the line_overlap and boxes_flow parameters, and it seems like a relatively minor fix - not counting the documentation, it's six lines of code.

@vinayak-mehta
Copy link
Member

Sorry for the late reply here.

Closing and reopening to see if checks run again.

@vinayak-mehta vinayak-mehta reopened this Jun 14, 2021
@vinayak-mehta vinayak-mehta merged commit ec21904 into camelot-dev:master Jun 14, 2021
@vinayak-mehta
Copy link
Member

💚 💙 💜 💛 ❤️

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

Successfully merging this pull request may close these issues.

4 participants