visual-parser 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,191 @@
1
+ Metadata-Version: 2.4
2
+ Name: visual-parser
3
+ Version: 1.0.0
4
+ Summary: Standalone Visual-RAG PDF Parser — text extraction + Vision-LLM figure descriptions → JSONL
5
+ License: MIT
6
+ Project-URL: Homepage, https://github.com/SmartLabNuclear/RADIANT_LLM
7
+ Project-URL: Repository, https://github.com/SmartLabNuclear/RADIANT_LLM
8
+ Project-URL: Docker Hub, https://hub.docker.com/r/zev94/radiant-llm
9
+ Keywords: pdf,rag,nougat,vision-llm,ocr,document-parsing,jsonl,knowledge-base
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
17
+ Classifier: Topic :: Text Processing :: Markup
18
+ Classifier: Intended Audience :: Science/Research
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown
21
+ Requires-Dist: PyMuPDF==1.24.7
22
+ Requires-Dist: Pillow==11.1.0
23
+ Requires-Dist: torch==2.7.0
24
+ Requires-Dist: transformers==4.45.2
25
+ Requires-Dist: huggingface-hub==0.36.0
26
+ Requires-Dist: langchain-community==0.3.3
27
+ Requires-Dist: langchain==0.3.13
28
+ Requires-Dist: langchain-text-splitters==0.3.4
29
+ Requires-Dist: openai==1.78.1
30
+ Requires-Dist: google-generativeai==0.8.5
31
+ Requires-Dist: python-dotenv==1.1.0
32
+ Requires-Dist: tqdm==4.67.1
33
+ Provides-Extra: ocr
34
+ Requires-Dist: pytesseract==0.3.13; extra == "ocr"
35
+ Provides-Extra: dev
36
+ Requires-Dist: pytest; extra == "dev"
37
+ Requires-Dist: ruff; extra == "dev"
38
+ Requires-Dist: mypy; extra == "dev"
39
+
40
+ # visual-parser (Standalone Visual-RAG PDF Ingestion)
41
+
42
+ <!-- ![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg) -->
43
+ ![Python 3.12.10](https://img.shields.io/badge/Python-3.12.10-brightgreen.svg)
44
+ <!-- ![PyTorch](https://img.shields.io/badge/PyTorch-2.0%2B-ee4c2c.svg) -->
45
+
46
+ `visual-parser` is a standalone document-ingestion tool that converts PDFs into a multi-modal JSONL knowledge base (text chunks + figure descriptions + metadata). The intended workflow is:
47
+
48
+ 1) Run `visual-parser` on curated PDFs to generate JSONL KB files.
49
+ 2) Run RADIANT-LLM Visual-RAG for QA over the generated KB.
50
+
51
+ ## Outputs (JSONL KB)
52
+
53
+ By default, the pipeline writes:
54
+ - `01_chunks_kb.jsonl`: chunked text extracted from PDFs (Nougat by default).
55
+ - `02_figures_kb.jsonl`: figure/page visual descriptions (Vision LLM).
56
+ - `03_metadata_kb.jsonl`: document metadata rows (title/author/etc.).
57
+ - `04_processed_pdfs.txt`: a tracker so re-runs only process new PDFs (unless `--rebuild`).
58
+
59
+ ## API keys (`.env`)
60
+
61
+ Provide at least one provider:
62
+ - `OPENAI_API_KEY` (OpenAI)
63
+ - `GEMINI_API_KEY` (Gemini)
64
+
65
+ Optional:
66
+ - `HF_TOKEN` (if you use gated Hugging Face models)
67
+
68
+ ## Run with Docker (Docker Hub)
69
+
70
+ Prebuilt images are on **[zev94/radiant-llm](https://hub.docker.com/r/zev94/radiant-llm)** under the **visual-parser** tags:
71
+
72
+ | Tag | Description |
73
+ |-----|-------------|
74
+ | `visual-parser-1.0` | Pinned release |
75
+ | `visual-parser-latest` | Latest visual-parser build |
76
+
77
+ ### 1) Install Docker
78
+ - Docker Desktop (Windows/macOS) or Docker Engine (Linux)
79
+
80
+ ### 2) Pull the image
81
+ ```bash
82
+ docker pull zev94/radiant-llm:visual-parser-1.0
83
+ ```
84
+
85
+ ### 3) Run (input + output on the same mounted folder)
86
+ Windows PowerShell:
87
+ ```powershell
88
+ docker run --rm --env-file .env `
89
+ -v "C:\path\to\pdfs:/data" `
90
+ zev94/radiant-llm:visual-parser-1.0 `
91
+ --input-dir /data --output-dir /data
92
+ ```
93
+
94
+ Linux / WSL:
95
+ ```bash
96
+ docker run --rm --env-file .env \
97
+ -v "/path/to/pdfs:/data" \
98
+ zev94/radiant-llm:visual-parser-1.0 \
99
+ --input-dir /data --output-dir /data
100
+ ```
101
+
102
+ ### 4) Run (separate output directory)
103
+ Windows PowerShell:
104
+ ```powershell
105
+ docker run --rm --env-file .env `
106
+ -v "C:\path\to\pdfs:/data" `
107
+ -v "C:\path\to\out:/out" `
108
+ zev94/radiant-llm:visual-parser-1.0 `
109
+ --input-dir /data --output-dir /out
110
+ ```
111
+
112
+ ### Offline install (legacy `.tar`)
113
+
114
+ ```powershell
115
+ docker load -i .\visual-parser_0.1.0.tar
116
+ docker images # use the tag printed by Docker
117
+ ```
118
+
119
+ ### Model overrides (optional)
120
+
121
+ Default vision model is **GPT-5.5** when using `--vision-provider gpt`. Override on the command line:
122
+
123
+ ```powershell
124
+ docker run --rm --env-file .env -v "C:\path\to\pdfs:/data" `
125
+ zev94/radiant-llm:visual-parser-1.0 `
126
+ --input-dir /data --output-dir /data --vision-model gpt-5.4
127
+ ```
128
+
129
+ <!-- ## Run from source (Python)
130
+
131
+ From `codebase/Visual-Parser/`:
132
+ ```powershell
133
+ python visual-parser.py --input-dir "C:\path\to\pdfs"
134
+ ``` -->
135
+
136
+ ## Common configuration flags
137
+
138
+ After pulling the image, run:
139
+
140
+ ```bash
141
+ docker run --rm zev94/radiant-llm:visual-parser-1.0 --help
142
+ ```
143
+
144
+ For copy-paste **Docker** examples (vision presets, text modes, workers, rebuild), see [`docker-usage-examples.md`](docker-usage-examples.md).
145
+
146
+ Paths:
147
+ - `--input-dir` / `-i` (required)
148
+ - `--output-dir` / `-o` (default: same as input)
149
+
150
+ Text extraction:
151
+ - `--text-mode nougat|lightweight` (default: `nougat`)
152
+ - `--nougat-model facebook/nougat-small`
153
+ - `--chunk-size 500`
154
+ - `--chunk-overlap 100`
155
+
156
+ Vision LLM:
157
+ - `--vision-provider gpt|gemini` (default: `gpt`)
158
+ - `--vision-model gpt-5.2` (or `gpt-4o`, `gemini-2.5-flash`, etc.)
159
+ - `--vision-detail low|high|auto`
160
+ - `--reasoning-effort none|low|medium|high|xhigh`
161
+ - `--metadata-pages 2`
162
+
163
+ Performance / misc:
164
+ - `--max-workers 4`
165
+ - `--rebuild` (reprocess everything; ignore `04_processed_pdfs.txt`)
166
+ - `--log-level DEBUG|INFO|WARNING|ERROR`
167
+
168
+ ---
169
+
170
+ ## Citation
171
+
172
+ If you use RADIANT-LLM or the accompanying evaluation materials, please cite the preprint:
173
+
174
+ ```bibtex
175
+ @article{ndum2026radiant,
176
+ title={RADIANT-LLM: an Agentic Retrieval Augmented Generation Framework for Reliable Decision Support in Safety-Critical Nuclear Engineering},
177
+ author={Ndum, Zavier Ndum and Tao, Jian and Ford, John and Yim, Mansung and Liu, Yang},
178
+ journal={arXiv preprint arXiv:2604.22755},
179
+ year={2026}
180
+ }
181
+ ```
182
+
183
+ Preprint: https://arxiv.org/abs/2604.22755
184
+
185
+ ---
186
+
187
+ ## License
188
+
189
+ This repository is currently proprietary and not licensed for public use, redistribution, or modification. Licensing terms will be updated after institutional review.
190
+
191
+
@@ -0,0 +1,19 @@
1
+ visual_parser/__init__.py,sha256=b68CyJ5cXkaMV0_1qsYLUw4W2rT8rpkhhOfPLF92Rw8,832
2
+ visual_parser/__main__.py,sha256=-p6rqjrnsjrtu71eFtmZdqFI1NgHXX9ASOnjuGqghNo,168
3
+ visual_parser/cli.py,sha256=EfqPnFFK-nlaexYqo3ZMfykL_aKHCAu-Kdl8sU3ZewU,8342
4
+ visual_parser/cli_main.py,sha256=qypXxdGevShfpCcgi_HqCmKBKK9Txc1frOOFn1Pfkz0,7233
5
+ visual_parser/config.py,sha256=Y79S3hUVFlVVUNAX-tmPHa9BryK1LFxhUC7lBex0M5s,7825
6
+ visual_parser/figure_describer.py,sha256=ljUtGdXgP3TkE09VxFaU1e3FXIBO5mG1-D4xPwntJbs,8487
7
+ visual_parser/jsonl_writer.py,sha256=3WFXhrjH599iMyiC5JaJkXZ19NeTgj64VxpT3jvzsBY,3520
8
+ visual_parser/metadata_extractor.py,sha256=_82HtYgntm-kc0Sj7zcaS1VIsyz2nx-encJLteJ0u34,3058
9
+ visual_parser/nougat_engine.py,sha256=_0w_QBCTq1sIC42KMpIoQLlW8IfC2La11GJM4QP83eo,7972
10
+ visual_parser/pdf_tracker.py,sha256=RgFxv7x_WIRpRClWoTO5SrF_vCth4XRSPfPcDHMGCso,3563
11
+ visual_parser/pipeline.py,sha256=izqtJkRvUn0r8_EctV5vWHk7krILdNw8fsYNZm5-MhM,10528
12
+ visual_parser/prompts.py,sha256=wkOHqGnUNxg_OBHwZ1kanTXN0kzWwqeH21F1_A4MIPI,5025
13
+ visual_parser/text_extractor.py,sha256=KHE13y-Z4Xf2sKSWV4G4_aquibXW_Y-2TsQ6azhxNrQ,16476
14
+ visual_parser/vision_llm.py,sha256=I-JHpRxiJ4M8HHpEeqZRdhrDkE2T7jDSWOytBGQKQ9w,9059
15
+ visual_parser-1.0.0.dist-info/METADATA,sha256=6SJzX5YVMR06Veygx7Tjuz8wzRdqxBREJQvSRCW6FyY,6274
16
+ visual_parser-1.0.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
17
+ visual_parser-1.0.0.dist-info/entry_points.txt,sha256=yypghqnxA-nSiyoDyhlg99SK9vfOzloFwUiiwRw4EWI,62
18
+ visual_parser-1.0.0.dist-info/top_level.txt,sha256=_aaZ41uFRN_WX-616YvmcXIroNq4k4m6Ph6FGetxLYY,14
19
+ visual_parser-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ visual-parser = visual_parser.cli_main:main
@@ -0,0 +1 @@
1
+ visual_parser