Giter VIP home page Giter VIP logo

.github's Introduction

.github

.github's People

Contributors

chakshugautam avatar

Watchers

 avatar

Forkers

rachitavya

.github's Issues

Extracting section headings and chunks from PDFs

Sample pdf here

We need to be able to extract text from it and be able to chunk it in the form of headings and related chunks.

We have tired 2 different approaches :

  1. Using Deepdoc detection to extract the text headings and structure of each page and converting it into a json format : here
  2. Using Pymupdf to get the boundaries of the text from the pdf and then using that to figure out the headings and the content pieces : here

PDF Parser -

Overall ambition :

We should be able able to parse a pdf such that we are able to get this following structure out of it.
It includes the following key capabilities :

  1. Ability to process pdfs with multiple languages - English/Odia/Hindi
  2. Ability to create chunks with headings on the basis of the way the pdf is structured. We should be able to recognize that some texts are headings, some are content and then be able to convert that into the structure above.
  3. Be able to process images and tables and convert them into chunks that can be passed to an LLM to answer questions based on them.

Where are we on this now :

Chunking

Free text chunking :

We are able to chunk free text (unstructured text) here

Structured pdf chunking

We have looked at 2 approaches for chunking text :

  1. Using Deepdoc detection to extract the text headings and structure of each page and converting it into a json format : here
  2. Using Pymupdf to get the boundaries of the text from the pdf and then using that to figure out the headings and the content pieces : here

What is a good chunk

  • Should be around 100 to 200 words.
  • The text/topic in a chunk should be on a similar topic which makes semantic sense.
  • The text/topic in a chunk should be different from other chunks
  • Ideally it should cover a small topic in its entirety. It could cover multiple topics but these small topics should not be a part of some other chunk.

For example :
Bad Chunk :

Here is a list of links : 
Cab booking  :  http:/sdjnsdkgj/  
Hotel form :  http:/sfjgkjnfsgn/  

This is a bad chunk because :

  1. The chunk is small is size
  2. The links cover multiple topics at once. Cab booking form should be a part of the chunk that should be a part that describes how to book a cab. Similarly, for the hotel booking lunch

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.