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.9.tar.gz (197.2 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.9-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pint_lib-0.2.9.tar.gz
  • Upload date:
  • Size: 197.2 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.9.tar.gz
Algorithm Hash digest
SHA256 e289083e0a13a41291dae4d5745d8a049ce79ad51a40a77da6e01ad20eb42721
MD5 35309f3d8d3574dccb22f10314aabf36
BLAKE2b-256 9619df8b6037d8dc36850bf20b6d36d9ca2e0b5266f17b0ec9bcce3a0514bba4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pint_lib-0.2.9-py3-none-any.whl
  • Upload date:
  • Size: 22.2 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 bf9756c37b01da902e00595c3e9f6bbd40f53fc7c3e41fc2c024dc0201bb7548
MD5 77b94c3c9b2d51c416aca8a2eecae79f
BLAKE2b-256 0d101c74a189e7242e623579ae73a10d9f55e805ad6c634bc4b20afba6b7c1c5

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