Structural Data Extractor using LLMs
Project description
sdeul
Structural Data Extractor using LLMs
Installation
$ pip install -U sdeul
Usage
-
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
-
Create a JSON Schema file for the output
-
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
sdeul-0.1.3-py3-none-any.whl
(20.6 kB
view hashes)