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

ENH: Support PDFs #45

Open
dmoore247 opened this issue Feb 22, 2024 · 0 comments
Open

ENH: Support PDFs #45

dmoore247 opened this issue Feb 22, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@dmoore247
Copy link
Collaborator

dmoore247 commented Feb 22, 2024

Is your feature request related to a problem? Please describe.
Add ability to chunk out the text in a PDF into a dataframe / delta lake table to enable building RAG applications / semantic search applications.
Have controls for overlap and chunk size.
Add capability to Pixels to index and collect header metadata from PDFs.
Add capability to run embedding on chunked out text.

The value add is minimal lines of code to scale up processing 100k+ PDF files.

Sample python splitting code take from this volumes blog

@udf('array<string>')
def gen_chunks(path: str) -> list[str]:
   from pdfminer.high_level import extract_text
   from langchain.text_splitter import TokenTextSplitter
   text = extract_text(path)
   splitter = TokenTextSplitter(chunk_size = 500, chunk_overlap  = 50)
   return [doc.page_content for doc in splitter.create_documents([text])]

The solution should be a pluggable SparkML Transformer

@dmoore247 dmoore247 added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant