Git Product home page Git Product logo

question-generator-from-pdf's Introduction

PDF Document Parser and Q&A Generator

This repository contains a tool designed to process PDF documents and convert them into an easily navigable question and answer format. The tool automates the extraction of text from PDFs, breaking it down into coherent paragraphs, generating relevant questions, and providing corresponding answers. The process ensures high data quality through a chain of density methodology that refines the content. Additionally, the tool incorporates an anonymization process to protect sensitive information.

Features

  • PDF Parsing: Converts PDF documents into text paragraphs.
  • Paragraph Optimization: Utilizes a chain of density algorithm with LangChain to refine paragraphs for clarity and quality.
  • Question Generation: Automatically generates questions based on the content of the paragraphs.
  • Answer Generation: Provides answers to the generated questions.
  • Data Anonymization: Ensures that personal or sensitive data within the documents is anonymized for privacy.

Installation

To get started with this tool, clone the repository and install the required dependencies:

git clone https://github.com/your-username/your-repository-name.git
cd your-repository-name
pip install -r requirements.txt

Usage

Run the main script to process your PDFs:

python main.py <path_to_your_pdf>

The script will process the document and output the questions and answers, along with the optimized paragraphs, in a structured format.

Modules

  • main.py: The entry point for the tool, coordinating the PDF processing and Q&A generation.
  • anonymizer.py: Module responsible for detecting and anonymizing sensitive data.
  • paragrapher.py: Handles the breakdown of text into optimized paragraphs.
  • questionanswerer.py: Generates questions and answers based on the paragraphs.
  • summarizer.py: Summarizes the content to support the Q&A process.

question-generator-from-pdf's People

Contributors

mayze13 avatar

Watchers

 avatar

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.