Skip to main content

Multi-purpose PDF parser

This parser was designed keeping in mind requirement for parsing PDFs file to streamline fine tuning process of Large Language Models such as Open AI's GPT models.

Functionalities:

  • PDF file to Text File conversion
  • PDF file to JSON file conversion
  • PDF file to JSONL file conversion

How to use?

  1. PDF file to Text File conversion.

    You can use command pdfparser pdftotext INPUT_PDF_FILE_PATH -o OUTPUT_TEXT_FILE_PATH to make a copy of contents in your PDF file in a TEXT file of your own choosing.

  2. PDF file to JSON File conversion.

    You can use command pdfparser pdftojson INPUT_PDF_FILE_PATH -o OUTPUT_TEXT_FILE_PATH to make a copy of contents in your PDF file in a JSON file of your own choosing. The JSON file will be in format {'text':PDF_CONTENTS}.

  3. PDF file to JSONL File conversion.

    This utility will prove quite helpful if you want to process a question answer data file into JsONL file to process it as source data for various Large Language Model's operations. You can use command pdfparser pdftojsonl INPUT_PDF_FILE_PATH -o OUTPUT_TEXT_FILE_PATH to extract question-answer pairs from your PDF file and save it in a separate JSONL file.

    Input file format: Your question answer pairs in PDF should be in Question: What is a cat? Answer: Cat is an animal. New line separator will not affect the parser at all. Output format: A jsonl file in structure similar to [{'prompt':Question, 'completion':Answer}] format.

Metadata

Release files for AGIpdf2json 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for AGIpdf2json 1.0.1
File Size Uploaded Provenance
AGIpdf2json-1.0.1.tar.gz 3.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for AGIpdf2json 1.0.1
File Interpreter ABI Platform
AGIpdf2json-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.1 kB

Release files / AGIpdf2json-1.0.1.tar.gz

Download URL AGIpdf2json-1.0.1.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
96753329383a180b37548e6b212b0dadf99fa85a33e7a99ac9785b112b6252a1
BLAKE2b-256 checksum
How to use checksums
dd8c656a7ae837848a543b9f7e66f0d3207f8437d25520b8411242acaca301ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / AGIpdf2json-1.0.1-py3-none-any.whl

Download URL AGIpdf2json-1.0.1-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e2b334d5ef7bc44e14c6647a5c501281c894294c2b79e3b501311afb6550b264
BLAKE2b-256 checksum
How to use checksums
7b77584b3b151d686564c00806d8225be2a990d19b4458218dac175f768b9522
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Security for AGIpdf2json 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page