Catalog PyPI
PACKAGE EXPLORERView in registry

AGIpdf2json

PyPI

This package can help user parse PDF files into text file and JSON file. Additionally, it can help user parse question-answer pairs into a JSONL document in prompt-completion format, that is supported by OpenAI

Versions collected1
Direct dependencies2From release 1.0.1
Last observed21 Oct, 09:09 UTC

README

Version 1.0.1 documentation

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.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.111 May 20232

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 09:09 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:d653da847a3cced4096e9efc7b4c7e305b9fb2fd45587a10d9978d71ccf5d1f1