mmiakashs commited on
Commit
26824e4
·
verified ·
1 Parent(s): cdae514

Update layout docs for assets/ restructure

Browse files
Files changed (1) hide show
  1. README.md +14 -12
README.md CHANGED
@@ -132,15 +132,16 @@ for sample in ds:
132
 
133
  ```
134
  amazon/ConfBench/
135
- └── {doc_id}/
136
- ── original.pdf # Original clean PDF
137
- ├── gt.json # Ground truth annotations
138
- ├── metadata.json # Pipeline manifest
139
- ├── default/
140
- │ └── default_noisy.pdf
141
- ── archetype3/
142
- │ └── archetype3_noisy.pdf
143
- └── ... (16 more pipelines)
 
144
  ```
145
 
146
  ### Ground Truth Schema (`gt.json`)
@@ -252,16 +253,17 @@ import json
252
  from pathlib import Path
253
 
254
  local_dir = Path(snapshot_download(repo_id="amazon/ConfBench", repo_type="dataset"))
 
255
 
256
- doc_ids = [p.name for p in local_dir.iterdir() if p.is_dir()]
257
 
258
  # Load ground truth for a single document
259
  def load_gt(doc_id):
260
- return json.loads((local_dir / doc_id / "gt.json").read_text())
261
 
262
  # List noisy PDFs for a document
263
  def list_pipelines(doc_id):
264
- meta = json.loads((local_dir / doc_id / "metadata.json").read_text())
265
  return meta["pipelines"]
266
  ```
267
 
 
132
 
133
  ```
134
  amazon/ConfBench/
135
+ └── assets/
136
+ ── {doc_id}/
137
+ ├── original.pdf # Original clean PDF
138
+ ├── gt.json # Ground truth annotations
139
+ ├── metadata.json # Pipeline manifest
140
+ ── default/
141
+ │ └── default_noisy.pdf
142
+ ── archetype3/
143
+ └── archetype3_noisy.pdf
144
+ └── ... (16 more pipelines)
145
  ```
146
 
147
  ### Ground Truth Schema (`gt.json`)
 
253
  from pathlib import Path
254
 
255
  local_dir = Path(snapshot_download(repo_id="amazon/ConfBench", repo_type="dataset"))
256
+ assets_dir = local_dir / "assets"
257
 
258
+ doc_ids = [p.name for p in assets_dir.iterdir() if p.is_dir()]
259
 
260
  # Load ground truth for a single document
261
  def load_gt(doc_id):
262
+ return json.loads((assets_dir / doc_id / "gt.json").read_text())
263
 
264
  # List noisy PDFs for a document
265
  def list_pipelines(doc_id):
266
+ meta = json.loads((assets_dir / doc_id / "metadata.json").read_text())
267
  return meta["pipelines"]
268
  ```
269