Skip to main content

Structural Data Extractor using LLMs

Project description

sdeul

Structural Data Extractor using LLMs

Test CI to Docker Hub Release on PyPI and GitHub

Installation

$ pip install -U sdeul

Usage

  1. Prepare a Llama 2 GGUF file.

    Example:

    $ curl -SLO https://huggingface.co/TheBloke/Llama-2-13B-chat-GGUF/resolve/main/llama-2-13b-chat.Q4_K_M.gguf
    
  2. Create a JSON Schema file for the output

  3. Extract structural data from given text using sdeul extract.

    Example:

    sdeul extract --pretty-json \
        llama-2-13b-chat.Q4_K_M.gguf \
        test/data/medication_history.schema.json \
        test/data/patient_medication_record.txt
    

    Expected output:

    {
      "MedicationHistory": [
        {
          "MedicationName": "Lisinopril",
          "Dosage": "10mg daily",
          "Frequency": "daily",
          "Purpose": "hypertension"
        },
        {
          "MedicationName": "Metformin",
          "Dosage": "500mg twice daily",
          "Frequency": "twice daily",
          "Purpose": "type 2 diabetes"
        },
        {
          "MedicationName": "Atorvastatin",
          "Dosage": "20mg at bedtime",
          "Frequency": "at bedtime",
          "Purpose": "high cholesterol"
        }
      ]
    }
    

Run sdeul --help for more details.

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

sdeul-0.1.2.tar.gz (42.7 kB view details)

Uploaded Source

Built Distribution

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

sdeul-0.1.2-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

File details

Details for the file sdeul-0.1.2.tar.gz.

File metadata

  • Download URL: sdeul-0.1.2.tar.gz
  • Upload date:
  • Size: 42.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for sdeul-0.1.2.tar.gz
Algorithm Hash digest
SHA256 deb39e1bd463faf7e32abd339c24503293afd422ff45d637666098f0a6acf796
MD5 76ca3285616cba8d41d9692c401b8e10
BLAKE2b-256 4d62a4f370f16f5f99672d20820c131a1dae3e3f1ca50f86d9fb06cdc39ada7b

See more details on using hashes here.

File details

Details for the file sdeul-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: sdeul-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 31.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for sdeul-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e69155581502b265181b3c6d954b4e5b90a3b3382efeebfd3bf6771f95ef7670
MD5 c313f7f27cd79bfbbc4f2d90a79c0740
BLAKE2b-256 7f0e13d86468ea63a01ee1df3d3efb29f76526dfad4499771779551d56d76269

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