Metadata-Version: 2.4
Name: geotech-report-extraction
Version: 0.1.0
Summary: Extract geotechnical data from PDF reports and output DIGGS XML
Author-email: Sean O'Connell <soconnell345@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/soconnell345/GeotechReportExtraction
Project-URL: Repository, https://github.com/soconnell345/GeotechReportExtraction
Project-URL: Issues, https://github.com/soconnell345/GeotechReportExtraction/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pymupdf>=1.24.0
Requires-Dist: pydantic>=2.0
Requires-Dist: lxml>=4.9
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Provides-Extra: ocr
Requires-Dist: pytesseract>=0.3.10; extra == "ocr"
Requires-Dist: Pillow>=9.0; extra == "ocr"
Provides-Extra: vision
Requires-Dist: anthropic>=0.30.0; extra == "vision"
Provides-Extra: geo
Requires-Dist: pyproj>=3.6; extra == "geo"
Requires-Dist: geopy>=2.4; extra == "geo"
Requires-Dist: folium>=0.15; extra == "geo"
Requires-Dist: shapely>=2.0; extra == "geo"
Requires-Dist: geopandas>=0.14; extra == "geo"
Requires-Dist: contextily>=1.5; extra == "geo"
Requires-Dist: utm>=0.7; extra == "geo"
Requires-Dist: mgrs>=1.4; extra == "geo"
Requires-Dist: matplotlib>=3.7; extra == "geo"
Provides-Extra: all
Requires-Dist: geotech-report-extraction[geo,ocr,vision]; extra == "all"
Dynamic: license-file

# Geotech Report Extraction

Extract geotechnical borehole data from PDF reports and output [DIGGS 2.6](https://diggsml.org/) XML.

[![PyPI version](https://badge.fury.io/py/geotech-report-extraction.svg)](https://pypi.org/project/geotech-report-extraction/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Features

- Parse borehole logs from geotechnical PDF reports (Langan, Schnabel, and generic formats)
- Extract soil layers, SPT blow counts, groundwater levels, and lab test results
- Optional vision-based extraction using Anthropic Claude or GPT-4o via Palantir Funhouse
- Output DIGGS 2.6 XML for interoperability
- Geospatial utilities for coordinate conversion and boring location mapping
- Confidence scoring for extracted data quality

## Installation

```bash
pip install geotech-report-extraction
```

### Optional extras

```bash
# OCR support (Tesseract)
pip install geotech-report-extraction[ocr]

# Vision LLM extraction (Anthropic Claude)
pip install geotech-report-extraction[vision]

# Geospatial utilities (coordinate conversion, mapping)
pip install geotech-report-extraction[geo]

# Everything
pip install geotech-report-extraction[all]
```

## Quick Start

```python
from geotech_report_extraction import extract_report

# Basic text-based extraction
result = extract_report("report.pdf")

# Vision-based extraction with Anthropic Claude
result = extract_report("report.pdf", use_vision=True, vision_api_key="sk-...")

# Vision-based extraction with Palantir Funhouse
from geotech_report_extraction import FunhouseBackend
result = extract_report("report.pdf", llm_backend=FunhouseBackend(model="gpt-4.1"))
```

## CLI

```bash
geotech-extract report.pdf -o output.xml
```

## License

MIT
