Repository navigation
🐞 Repair discretionary hyphens in copied PDF text - #236
Merged
Merged
Conversation
Use a local English lexicon to repair flattened OCR and wrapped word fragments when paragraph reflow is enabled. Preserve recognized compounds, identifiers, URL tokens, and page or paragraph boundaries; cover Markdown and plain clipboard paths with regressions. Include the lexicon license in the extension build. Co-authored-by: ChatGPT 6.2 <[email protected]>
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.
PDF text extraction can retain typesetting hyphens even after the original line breaks have been flattened. For example,
clearing cor-porationsandsecuri-ties depositoriesshould copy asclearing corporationsandsecurities depositories.This change adds conservative, offline English dictionary-assisted dehyphenation to the shared clipboard reflow pipeline. It also recognizes geometric line wraps, including PDF text items without an explicit end-of-line marker. Genuine compounds such as
self-regulatory,book-entry, andco-operate, URL tokens, and numeric identifiers such as17Ad-10are retained. Unknown and ambiguous spellings are left intact rather than silently rewritten. The original layout remains available when paragraph reflow is disabled.The committed tree and changed files were verified. The full dependency-backed test suite has not been run locally because this environment cannot access the npm registry; CI must validate the package and regressions.