-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: support pdf link extraction in hi_res strategy #3753
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
Merged
christinestraub
merged 27 commits into
main
from
feat/support-link-extraction-in-pdf-hi_res
Oct 31, 2024
Merged
feat: support pdf link extraction in hi_res strategy #3753
christinestraub
merged 27 commits into
main
from
feat/support-link-extraction-in-pdf-hi_res
Oct 31, 2024
Conversation
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
48d0233 to
881d6fc
Compare
…ixtures update (#3760) This pull request includes updated ingest test fixtures. Please review and merge if appropriate. Co-authored-by: christinestraub <[email protected]>
cragwolfe
reviewed
Oct 29, 2024
cragwolfe
reviewed
Oct 29, 2024
test_unstructured_ingest/expected-structured-output/biomed-api/65/11/main.PMC6312790.pdf.json
Outdated
Show resolved
Hide resolved
…ixtures update (#3761) This pull request includes updated ingest test fixtures. Please review and merge if appropriate. Co-authored-by: christinestraub <[email protected]>
…ixtures update (#3765) This pull request includes updated ingest test fixtures. Please review and merge if appropriate. Co-authored-by: christinestraub <[email protected]>
…df-hi_res # Conflicts: # CHANGELOG.md # unstructured/__version__.py
cragwolfe
approved these changes
Oct 31, 2024
temp-adelyn
pushed a commit
to temp-adelyn/unstructured
that referenced
this pull request
Mar 3, 2025
…#3753) This PR aims to add support for link extraction in pdf `hi_res` strategy. The `partition_pdf()` function now supports link extraction when using the `hi_res` strategy, allowing users to extract hyperlinks from PDF documents. ### Summary - Added functionalities to support link extraction in hi_res flow - Enhanced word extraction functionality used for link extraction in both `fast` and `hi_res` flows, resulted in more correct `start_index` and `text` in `links` metadata. - Updated ingest fixture update workflow to not skip Astra DB source test ### Testing ``` elements = partition_pdf( filename="example-docs/pdf/embedded-link.pdf", strategy="hi_res" ) assert len(elements[0].metadata.links) == 3 ``` --------- Co-authored-by: ryannikolaidis <[email protected]> Co-authored-by: christinestraub <[email protected]> Co-authored-by: cragwolfe <[email protected]>
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.
This PR aims to add support for link extraction in pdf
hi_resstrategy. Thepartition_pdf()function now supports link extraction when using thehi_resstrategy, allowing users to extract hyperlinks from PDF documents.Summary
fastandhi_resflows, resulted in more correctstart_indexandtextinlinksmetadata.Testing