Skip to main content

A package for automated processing of (pubmed) text with LLM

Project description

PubMed Integrated NLP Tool (PINT)

A tool for serial processing of open-source PubMed Central papers with various Large Language Models.

Overview

PINT allows you to process academic papers from PubMed using your choice of:

  • OpenAI models
  • Anthropic's Claude
  • External shell script integration

Dependencies

  • pdfminer.six - for reading pdf files
  • openpyxl - for reading .xlsx files
  • requests - to use PubMed API
  • anthropic - to use anthropic's Clause API
  • openai - to use OpenAI's ChatGPT API

Installation

pip install pint_lib

Basic Installation

Without dependencies - you can install separately only those you need

pip install pint_lib[base]

Usage

python -m pint_lib <Config_file>

The configuration file (Excel or CSV format) controls all aspects of processing:

  • Which LLM to use
  • Data source locations
  • Prompt specifications
  • Additional settings

Input/Output

Input:

  • CSV or Excel file with a specified column containing either:
    • PubMed ID (PMC number)
    • Filename (if not numerical or PMC format)

Output:

  • CSV file containing the ID and requested extracted data

Example

A simple example using PDF files is provided in the example folder:

cd example
python -m pint_lib test_config_pdf.xlsx

Configuration

Configuration is handled via Excel or CSV files.

Notes

  • You can substitute CSV files for Excel files throughout, though Excel provides better document formatting.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pint_lib-0.2.8.tar.gz (194.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pint_lib-0.2.8-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file pint_lib-0.2.8.tar.gz.

File metadata

  • Download URL: pint_lib-0.2.8.tar.gz
  • Upload date:
  • Size: 194.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pint_lib-0.2.8.tar.gz
Algorithm Hash digest
SHA256 c9c56c9acb838036195842098c15fcb36a60d81c182152758f4d27dd9bde7840
MD5 9faacdab3b459b25fae9e0e864c2633e
BLAKE2b-256 2b169da588c3b3f4a66f718ed2bfef5d872b5ad1e11a79120ce41dbb28ba471d

See more details on using hashes here.

File details

Details for the file pint_lib-0.2.8-py3-none-any.whl.

File metadata

  • Download URL: pint_lib-0.2.8-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pint_lib-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 2bbefab3aef7112683a5da0a8bd7191ad684f37f78d6d60d69edf18f48270f9e
MD5 ea13e9eee44ab504488cc7885dbc2fa0
BLAKE2b-256 462710a4b07dfe5834b7cb85d6d369d5471a6baefeb3e83ccd0b459b7ee0f743

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page