Upload folder using huggingface_hub
Browse files- README.md +18 -0
- docs/defextra_hydration.md +75 -0
README.md
CHANGED
|
@@ -55,6 +55,24 @@ uv run python scripts/hydrate_defextra.py \
|
|
| 55 |
|
| 56 |
- `data/defextra_legal.csv` / `data/defextra_legal.parquet`: DefExtra markers (no excerpts).
|
| 57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
## Scripts
|
| 59 |
|
| 60 |
- `scripts/hydrate_defextra.py`: hydrate DefExtra from PDFs + GROBID.
|
|
|
|
| 55 |
|
| 56 |
- `data/defextra_legal.csv` / `data/defextra_legal.parquet`: DefExtra markers (no excerpts).
|
| 57 |
|
| 58 |
+
## Hydrated columns
|
| 59 |
+
|
| 60 |
+
The hydrated output (e.g., `defextra_hydrated.csv`) matches the schema below.
|
| 61 |
+
Full legal marker columns are documented in `docs/defextra_hydration.md`.
|
| 62 |
+
|
| 63 |
+
| Column | Description |
|
| 64 |
+
| --- | --- |
|
| 65 |
+
| `paper_id` | Paper identifier (often a Semantic Scholar ID, DOI, or arXiv ID). |
|
| 66 |
+
| `paper_title` | Paper title. |
|
| 67 |
+
| `paper_doi` | DOI (if available). |
|
| 68 |
+
| `paper_arxiv` | arXiv ID or URL (if available). |
|
| 69 |
+
| **`concept`** | Term / concept being defined. |
|
| 70 |
+
| **`definition`** | Definition text (hydrated from PDFs). |
|
| 71 |
+
| **`context`** | Context excerpt (hydrated from PDFs). |
|
| 72 |
+
| **`definition_type`** | Definition type (e.g., explicit / implicit). |
|
| 73 |
+
| `source_file` | Source JSON filename used during curation. |
|
| 74 |
+
| **`is_out_of_domain`** | Boolean flag for out‑of‑domain papers. |
|
| 75 |
+
|
| 76 |
## Scripts
|
| 77 |
|
| 78 |
- `scripts/hydrate_defextra.py`: hydrate DefExtra from PDFs + GROBID.
|
docs/defextra_hydration.md
CHANGED
|
@@ -123,6 +123,81 @@ uv run python scripts/hydrate_defextra.py \
|
|
| 123 |
- `definition_end_punct`, `context_end_punct`:
|
| 124 |
trailing punctuation marker captured from the manual copy.
|
| 125 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
## Notes
|
| 127 |
|
| 128 |
- Small mismatches are expected due to PDF/GROBID text normalization.
|
|
|
|
| 123 |
- `definition_end_punct`, `context_end_punct`:
|
| 124 |
trailing punctuation marker captured from the manual copy.
|
| 125 |
|
| 126 |
+
## Legal CSV columns (full)
|
| 127 |
+
|
| 128 |
+
| Column | Description |
|
| 129 |
+
| --- | --- |
|
| 130 |
+
| `paper_id` | Paper identifier (often a Semantic Scholar ID, DOI, or arXiv ID). |
|
| 131 |
+
| `paper_title` | Paper title. |
|
| 132 |
+
| `paper_doi` | DOI (if available). |
|
| 133 |
+
| `paper_arxiv` | arXiv ID or URL (if available). |
|
| 134 |
+
| `concept` | Term / concept being defined. |
|
| 135 |
+
| `definition_type` | Definition type (e.g., explicit / implicit). |
|
| 136 |
+
| `source_file` | Source JSON filename used during curation. |
|
| 137 |
+
| `is_out_of_domain` | Boolean flag for out‑of‑domain papers. |
|
| 138 |
+
| `definition_preserve_linebreaks` | Whether line breaks should be preserved in the definition. |
|
| 139 |
+
| `context_preserve_linebreaks` | Whether line breaks should be preserved in the context. |
|
| 140 |
+
| `definition_preserve_hyphenation` | Whether hyphenation should be preserved in the definition. |
|
| 141 |
+
| `context_preserve_hyphenation` | Whether hyphenation should be preserved in the context. |
|
| 142 |
+
| `definition_has_bracket_citation` | Definition contains bracket‑style citations (e.g., `[12]`). |
|
| 143 |
+
| `definition_has_paren_citation` | Definition contains parenthetical citations (e.g., `(Smith, 2020)`). |
|
| 144 |
+
| `definition_has_letter_digit` | Definition contains letter–digit patterns (e.g., `bias4`). |
|
| 145 |
+
| `context_has_bracket_citation` | Context contains bracket‑style citations. |
|
| 146 |
+
| `context_has_paren_citation` | Context contains parenthetical citations. |
|
| 147 |
+
| `context_has_letter_digit` | Context contains letter–digit patterns. |
|
| 148 |
+
| `definition_end_punct` | Expected trailing punctuation for definition. |
|
| 149 |
+
| `context_end_punct` | Expected trailing punctuation for context. |
|
| 150 |
+
| `marker_version` | Marker format version. |
|
| 151 |
+
| `hash_version` | Hashing scheme version. |
|
| 152 |
+
| `definition_char_start` | Character start offset (TEI) for definition (if available). |
|
| 153 |
+
| `definition_char_end` | Character end offset (TEI) for definition (if available). |
|
| 154 |
+
| `definition_match` | Debug marker: reference string used to compute definition hashes. |
|
| 155 |
+
| `definition_hash64` | 64‑bit hash of definition token sequence. |
|
| 156 |
+
| `definition_sha256` | SHA‑256 hash of definition token sequence. |
|
| 157 |
+
| `definition_token_count` | Token count for definition span. |
|
| 158 |
+
| `definition_head_hash64` | Head‑anchor 64‑bit hash for definition. |
|
| 159 |
+
| `definition_head_sha256` | Head‑anchor SHA‑256 hash for definition. |
|
| 160 |
+
| `definition_head_token_count` | Head‑anchor token count for definition. |
|
| 161 |
+
| `definition_mid_hash64` | Mid‑anchor 64‑bit hash for definition. |
|
| 162 |
+
| `definition_mid_sha256` | Mid‑anchor SHA‑256 hash for definition. |
|
| 163 |
+
| `definition_mid_token_count` | Mid‑anchor token count for definition. |
|
| 164 |
+
| `definition_tail_hash64` | Tail‑anchor 64‑bit hash for definition. |
|
| 165 |
+
| `definition_tail_sha256` | Tail‑anchor SHA‑256 hash for definition. |
|
| 166 |
+
| `definition_tail_token_count` | Tail‑anchor token count for definition. |
|
| 167 |
+
| `definition_head_alt_hash64` | Alternate head‑anchor 64‑bit hash for definition. |
|
| 168 |
+
| `definition_head_alt_sha256` | Alternate head‑anchor SHA‑256 hash for definition. |
|
| 169 |
+
| `definition_head_alt_token_count` | Alternate head‑anchor token count for definition. |
|
| 170 |
+
| `definition_mid_alt_hash64` | Alternate mid‑anchor 64‑bit hash for definition. |
|
| 171 |
+
| `definition_mid_alt_sha256` | Alternate mid‑anchor SHA‑256 hash for definition. |
|
| 172 |
+
| `definition_mid_alt_token_count` | Alternate mid‑anchor token count for definition. |
|
| 173 |
+
| `definition_tail_alt_hash64` | Alternate tail‑anchor 64‑bit hash for definition. |
|
| 174 |
+
| `definition_tail_alt_sha256` | Alternate tail‑anchor SHA‑256 hash for definition. |
|
| 175 |
+
| `definition_tail_alt_token_count` | Alternate tail‑anchor token count for definition. |
|
| 176 |
+
| `context_char_start` | Character start offset (TEI) for context (if available). |
|
| 177 |
+
| `context_char_end` | Character end offset (TEI) for context (if available). |
|
| 178 |
+
| `context_match` | Debug marker: reference string used to compute context hashes. |
|
| 179 |
+
| `context_hash64` | 64‑bit hash of context token sequence. |
|
| 180 |
+
| `context_sha256` | SHA‑256 hash of context token sequence. |
|
| 181 |
+
| `context_token_count` | Token count for context span. |
|
| 182 |
+
| `context_head_hash64` | Head‑anchor 64‑bit hash for context. |
|
| 183 |
+
| `context_head_sha256` | Head‑anchor SHA‑256 hash for context. |
|
| 184 |
+
| `context_head_token_count` | Head‑anchor token count for context. |
|
| 185 |
+
| `context_mid_hash64` | Mid‑anchor 64‑bit hash for context. |
|
| 186 |
+
| `context_mid_sha256` | Mid‑anchor SHA‑256 hash for context. |
|
| 187 |
+
| `context_mid_token_count` | Mid‑anchor token count for context. |
|
| 188 |
+
| `context_tail_hash64` | Tail‑anchor 64‑bit hash for context. |
|
| 189 |
+
| `context_tail_sha256` | Tail‑anchor SHA‑256 hash for context. |
|
| 190 |
+
| `context_tail_token_count` | Tail‑anchor token count for context. |
|
| 191 |
+
| `context_head_alt_hash64` | Alternate head‑anchor 64‑bit hash for context. |
|
| 192 |
+
| `context_head_alt_sha256` | Alternate head‑anchor SHA‑256 hash for context. |
|
| 193 |
+
| `context_head_alt_token_count` | Alternate head‑anchor token count for context. |
|
| 194 |
+
| `context_mid_alt_hash64` | Alternate mid‑anchor 64‑bit hash for context. |
|
| 195 |
+
| `context_mid_alt_sha256` | Alternate mid‑anchor SHA‑256 hash for context. |
|
| 196 |
+
| `context_mid_alt_token_count` | Alternate mid‑anchor token count for context. |
|
| 197 |
+
| `context_tail_alt_hash64` | Alternate tail‑anchor 64‑bit hash for context. |
|
| 198 |
+
| `context_tail_alt_sha256` | Alternate tail‑anchor SHA‑256 hash for context. |
|
| 199 |
+
| `context_tail_alt_token_count` | Alternate tail‑anchor token count for context. |
|
| 200 |
+
|
| 201 |
## Notes
|
| 202 |
|
| 203 |
- Small mismatches are expected due to PDF/GROBID text normalization.
|