Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDF Document Analysis System

Analyzes PDF documents, extracts structured information, groups similar documents, and identifies the most recent version.

Installation

# Create virtual environment
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

Usage

# Analyze PDFs in current directory
python main.py

# Analyze PDFs in specific directory
python main.py /path/to/pdfs

# Specify output file
python main.py /path/to/pdfs -o output.json

# Verbose mode
python main.py /path/to/pdfs -v

What It Does

-> Extracts revision dates, numbers, paragraphs, and images from PDFs -> Groups similar documents together -> Identifies the most recent/authoritative version -> Outputs structured JSON with all findings

Output Format

{
  "groups": [
    {
      "groupId": "A",
      "documents": [
        {
          "fileName": "Document1.pdf",
          "revisionDate": "12/15/2024",
          "revisionNumber": "2.1",
          "paragraphs": [
            {"title": "Paragraph 1", "text": "..."}
          ],
          "images": [
            {"exists": true}
          ]
        }
      ],
      "isIdentical": false
    }
  ]
}

Running Tests

pytest

About

a project that takes raw PDFs and groups and analyses them

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages