|
|
--- |
|
|
license: mit |
|
|
task_categories: |
|
|
- other |
|
|
size_categories: |
|
|
- n<1K |
|
|
--- |
|
|
|
|
|
# Extraction Examples Dataset |
|
|
|
|
|
This dataset contains 17 examples for testing extraction workflows. |
|
|
|
|
|
## Dataset Structure |
|
|
|
|
|
Each example includes: |
|
|
- **PDF file**: Original document |
|
|
- **map_info.json**: Map extraction metadata |
|
|
- **direction.json**: Direction information |
|
|
- **GeoJSON files**: Polygon geometries |
|
|
- **Area JSON files**: Area definitions |
|
|
|
|
|
## File Organization |
|
|
|
|
|
``` |
|
|
files/ |
|
|
├── example1/ |
|
|
│ ├── document.pdf |
|
|
│ ├── map_info.json |
|
|
│ ├── direction.json |
|
|
│ ├── polygon1.geojson |
|
|
│ └── area1.json |
|
|
└── example2/ |
|
|
└── ... |
|
|
``` |
|
|
|
|
|
## Usage |
|
|
|
|
|
```python |
|
|
from datasets import load_dataset |
|
|
import json |
|
|
|
|
|
# Load dataset |
|
|
ds = load_dataset("alexdzm/extraction-examples") |
|
|
|
|
|
# Get file paths for first example |
|
|
example = ds['train'][0] |
|
|
pdf_path = example['pdf_path'] |
|
|
map_info_path = example['map_info_path'] |
|
|
|
|
|
# Files are accessible via the repo |
|
|
# Use hf_hub_download to get local paths: |
|
|
from huggingface_hub import hf_hub_download |
|
|
|
|
|
pdf_file = hf_hub_download(repo_id="alexdzm/extraction-examples", filename=pdf_path, repo_type="dataset") |
|
|
map_info_file = hf_hub_download(repo_id="alexdzm/extraction-examples", filename=map_info_path, repo_type="dataset") |
|
|
|
|
|
# Load JSON data |
|
|
with open(map_info_file) as f: |
|
|
map_info = json.load(f) |
|
|
``` |
|
|
|
|
|
## Examples |
|
|
|
|
|
- **barnet_monken**: Article 4 for Monken Hadley CA (Scale: 5000, Page: 7) |
|
|
- **camden_fitzjohns**: 67 Fitzjohns Avenue area (Scale: 1250, Page: 5) |
|
|
- **camden_hampstead**: 32-66 (even) & 72-90 (even) South Hill Park, NW3 (South Hill Park Estate Conservation Area) (Scale: None, Page: 6) |
|
|
- **camden_kentish**: 147 Kentish Town Road (Scale: 500, Page: 2) |
|
|
- **dover_margarets**: Article 4(1) Direction No.1 2007, Town and Country Planning (General Permitted Development) Order 1995 (Scale: 1250, Page: 3) |
|
|
- **dover_sandwich**: Town and Country Planning Direction No.3, 1979, General Development Order 1977 (Scale: 2500, Page: 6) |
|
|
- **dover_townsend**: Town and Country Planning Direction No. 2, 1974, Town and COuntry Planning General Development Order 1973 (Scale: 10560, Page: 4) |
|
|
- **gloucestershire_filton**: Land at Stoke Park and Cheswick ward East of Southmead Road (Scale: None, Page: 3) |
|
|
- **hampshire_avon**: ARTICLE 4 DIRECTION 97/2 (Scale: None, Page: 4) |
|
|
- **kensington_holland**: Article 4 - No 30 (Scale: None, Page: 4) |
|
|
- **kensington_rutland**: Article 4 - No 72 (Scale: None, Page: 4) |
|
|
- **newcastle_heaton**: Saint Gabriel's Estate, Heaton (Scale: None, Page: 3) |
|
|
- **newcastle_jesmond**: HW Jesmond & N Jesmond (Scale: None, Page: 3) |
|
|
- **newforest_park**: ARTICLE 4 DIRECTION NP NEW FOREST CAMPSITE (Scale: 190000, Page: 3) |
|
|
- **peterborough_barnack**: The Rectory Millstone Lane, Barnack (Scale: None, Page: 2) |
|
|
- **stalbans_cunningham**: Cunningham Avenue (Scale: None, Page: 1) |
|
|
- **wirral_caldy**: Caldy/Thurstaston (Scale: None, Page: 2) |
|
|
|