-
Notifications
You must be signed in to change notification settings - Fork 1
Migrate from spa cy and nltk #154
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
Merged
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
Harder than anticipated, for a few reasons:
* can't get things in order. I guess that's the point of PDFminer, but...
* PDF miner doesn't give you AcroForms at all. It has a completley hardcoded
way of getting them, outside the context of the page.
* We can do these two things:
* kinda put all of the fields back in the original text (see replace_original_text).
Doesn't work too well though, lots of duplicate pieces of text that put many of the fields
in the same place, when they should be in a different place.
* could gather fields with the same adjacent text, and get all parts of that text in the PDF.
Not guaranteed to be in order tho.
* for each field, get all of the surrounding context. Is okay! But consistently gets too much text for GPT4.
Even if we make it smaller, sometimes the surrounding context isn't the full sentence, or gets too much from other
fields (will have too much shared / confusing the two fields).
TBH next goal is to try the PDFPageAndFieldInterpreter approach, notes in there.
…te unit test accordingly
Co-authored-by: Bryce Willey <[email protected]>
Co-authored-by: Bryce Willey <[email protected]>
…ance in the repo itself instead of just PR
…r into replace-passivepy
Replace passivepy with a call to an LLM
…nfig when it's available there
…n-available Allow working without .env; pull creds from docassemble config
…mpletion functions
…nd started promptfoo but still needs work
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Bryce Willey <[email protected]>
Co-authored-by: Bryce Willey <[email protected]>
Finish the migration to LLMs; removing NLTK, etc.
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 just merges the smaller changes into
mainthat have already been reviewed.The purpose of this PR is to remove all of the clunky older ML libraries that this package used to rely on, both to improve performance and to reduce costs (since those functions were being hosted on an always-on server).
Fix #135
Fix #145
Fix #133
Fix #131
Fix #128
Fix #79
Fix #37
Fix #39
Fix #41
Fix #42