Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

PDF Document Loader #38

Open
rikuthinks opened this issue Feb 22, 2023 · 3 comments
Open

PDF Document Loader #38

rikuthinks opened this issue Feb 22, 2023 · 3 comments

Comments

@rikuthinks
Copy link

For PDFs:

https://github.com/kartik1998/pdf-images
https://github.com/naptha/tesseract.js#tesseractjs

Spent many hours experimenting with the best way to extract text data from PDFs. Tried a couple different libraries - they all had problems preserving whitespace. This ended up being pretty problematic when I went to query embeddings of this text. The incorrect formatting would be preserved in the answers, which won't do.

The best solution in practice came out to be converting the PDFs to images then using OCR to extract text from the images.
I have this implemented in python for now but will be rewriting in TS for the production app so can contribute that code in the future if someone else doesn't already pick it up

@cfortuner
Copy link
Owner

Adding this to the roadmap! Would love other people to chime in about their usecases here too.!

@rikuthinks
Copy link
Author

This could be applied to use cases such as performing semantic search on research papers or books, which can be found in the form of PDFs.

@yassinebridi
Copy link

I have the same use case as @rikuthinks , another use case is extracting specific informations, in case of something like an invoice, to extract names, adresses, etc..

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

No branches or pull requests

3 participants