Datasets:

Languages:
English
ArXiv:
License:
bitwise31337 commited on
Commit
fd7e968
·
verified ·
1 Parent(s): 8374c5c

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -67,7 +67,8 @@ uv run python scripts/hydrate_defextra.py \
67
 
68
  - [`docs/defextra_hydration.md`](docs/defextra_hydration.md) (technical details, CLI flags, markers).
69
  - [`docs/get_pdfs.md`](docs/get_pdfs.md) (how to find PDFs).
70
- - [`docs/mismatch_examples.md`](docs/mismatch_examples.md) (real examples of mismatch types and fixes).
 
71
  - See [`docs/defextra_hydration.md`](docs/defextra_hydration.md) for technical details and [`docs/get_pdfs.md`](docs/get_pdfs.md) for PDF sources.
72
 
73
  ## Expected minor mismatches
 
67
 
68
  - [`docs/defextra_hydration.md`](docs/defextra_hydration.md) (technical details, CLI flags, markers).
69
  - [`docs/get_pdfs.md`](docs/get_pdfs.md) (how to find PDFs).
70
+ - [`docs/mismatch_examples.md`](docs/mismatch_examples.md) (mismatch types with short excerpts).
71
+ - [`docs/defextra_legal_diff.md`](docs/defextra_legal_diff.md) (source vs HF legal CSV diff).
72
  - See [`docs/defextra_hydration.md`](docs/defextra_hydration.md) for technical details and [`docs/get_pdfs.md`](docs/get_pdfs.md) for PDF sources.
73
 
74
  ## Expected minor mismatches
docs/defextra_hydration.md CHANGED
@@ -128,4 +128,4 @@ uv run python scripts/hydrate_defextra.py \
128
  - Small mismatches are expected due to PDF/GROBID text normalization.
129
  - Missing exact TEI spans do **not** block hydration; hash/anchor markers are used as fallback.
130
  - Exact TEI spans are validated against stored hashes; if they do not match, citation‑stripped hash/anchor matching is used instead.
131
- - See [`docs/mismatch_examples.md`](mismatch_examples.md) for concrete examples and fixes.
 
128
  - Small mismatches are expected due to PDF/GROBID text normalization.
129
  - Missing exact TEI spans do **not** block hydration; hash/anchor markers are used as fallback.
130
  - Exact TEI spans are validated against stored hashes; if they do not match, citation‑stripped hash/anchor matching is used instead.
131
+ - See [`docs/mismatch_examples.md`](mismatch_examples.md) for concrete mismatch types with short excerpts.
docs/mismatch_examples.md CHANGED
@@ -1,90 +1,68 @@
1
  # Mismatch classes (hydration vs reference)
2
 
3
- This page summarizes common difference types seen in the latest hydrated run.
4
- Examples are **short fragments** with surrounding text removed.
5
-
6
- - Total differences: 144
7
- - wording_change: 74
8
- - punctuation_only: 50
9
- - casing: 8
10
- - hyphenation: 5
11
- - digit_letter_spacing: 3
12
- - truncation: 2
13
- - citation_spacing: 1
14
- - header_or_boilerplate: 1
15
-
16
- ---
17
- ## Wording / lexical differences
18
 
19
- Small wording changes (e.g., singular/plural) or tokenization artifacts.
 
 
 
 
 
 
 
 
20
 
21
  | Paper | Concept | Field | Reference (fragment) | Hydrated (fragment) |
22
  | --- | --- | --- | --- | --- |
23
- | 016f7a076ac272db106fbcea056752c7307f676a | specification error | context | …Conducted mainly in the late 1970s and 1980s, wave 3 of researchwitnessed yet another round o… | …Conducted mainly in the late 1970 s and 1980 s, wave 3 of research witnessed yet another round… |
24
- | 0209e602acaeab882fee84e244caf574cf345ef9 | ratio bias/numerosity bias | context | …ault. In the classic ratio bias task derived from Piaget and Inhelder (1951/1975), participants are offered a prize if th… | …ault. In the classic ratio bias task derived from Piaget andInhelder (1951/1975), participants are offered a prize if th… |
25
- | 033b21cf1c6d3bdae587e673452b994443bf3546 | narrative | context | …he bare minimum Simply put, narrative isthe representation of a… | …bare minimum Simply put, narrative is the representation of … |
26
 
27
  ## Punctuation-only differences
28
 
29
- Only punctuation differs (e.g., comma, quote style).
30
-
31
  | Paper | Concept | Field | Reference (fragment) | Hydrated (fragment) |
32
  | --- | --- | --- | --- | --- |
33
- | 0f7eda998bbce003745ff2fdbcaa1d9a8119368b | echo chamber | context | …ces of news, then we impose on ourselves a narrowed and selfreinforcing epistemic filter, which leaves out contrary view… | …ces of news, then we impose on ourselves a narrowed and self-reinforcing epistemic filter, which leaves out contrary view… |
34
- | 17734113f254a64b3bae312713edba3b1e34fb56 | Post-truth Era | context | …Indeed, today we live in what some have called a “post-truth” era, which is characterized by digital disinform… | …Indeed, today we live in what some have called a "post-truth" era, which is characterized by digital disinform… |
35
- | 1901.00596v4 | network embedding | definition | …ional vector representation of a node which preserves a node’s topological information… | …ional vector representation of a node which preserves a node's topological information… |
36
 
37
  ## Casing differences
38
 
39
- Same text except for upper/lower case.
40
-
41
  | Paper | Concept | Field | Reference (fragment) | Hydrated (fragment) |
42
  | --- | --- | --- | --- | --- |
43
- | 033b21cf1c6d3bdae587e673452b994443bf3546 | narrative | definition | …The representation of an event or a series of events.… | the representation of an event or a series of events.… |
44
- | 05bfced33d92944b7a0672490c371342d28ee076 | observational bias | definition | …Observed data differs systematically from the unobserved data… | …observed data differs systematically from the unobserved data… |
45
- | 1538c4777271ae6abb542801dac01423f4d566ad | publication bias | definition | …Significant results are more likely to be published while non… | …significant results are more likely to be published while non… |
46
 
47
  ## Hyphenation / line-break joins
48
 
49
- Hyphenation caused by line breaks is joined differently.
50
-
51
  | Paper | Concept | Field | Reference (fragment) | Hydrated (fragment) |
52
  | --- | --- | --- | --- | --- |
53
- | 3584741 | computational narrative representations | context | …cused review, we will focus exclusively on event-based narra- tive representations. Thus, we define computational narrativ… | …cused review, we will focus exclusively on event-based narrative representations. Thus, we define computational narrativ… |
54
- | 3584741 | metro maps method | context | …ro maps [98, 99] are an extension of the Connect the Dots ap- proach that represents more than a single storyline using a … | …ro maps [98, 99] are an extension of the Connect the Dots approach that represents more than a single storyline using a … |
55
- | 3584741 | open source intelligence (OSINT) | context | …]. Although OSINT data sources leverage more than just tradi- tional news articles [38], OSINT could still benefit from ne… | …]. Although OSINT data sources leverage more than just traditional news articles [38], OSINT could still benefit from ne… |
56
 
57
  ## Letter–digit spacing
58
 
59
- Spacing between digits/letters differs (`bias4` vs `bias 4`).
60
-
61
  | Paper | Concept | Field | Reference (fragment) | Hydrated (fragment) |
62
  | --- | --- | --- | --- | --- |
63
- | 0090023afc66cd2741568599057f4e82b566137c | omitted variable bias | context | …Omitted Variable Bias. Omitted variable bias4 occurs when one or more important variables are left out o… | …Omitted Variable Bias. Omitted variable bias 4 occurs when one or more important variables are left out o… |
64
- | 016f7a076ac272db106fbcea056752c7307f676a | selection bias | context | …cts of race on sentencing. Conducted mainly in the late 1970s and 1980s, wave 3 of research witnessed yet another round … | …cts of race on sentencing. Conducted mainly in the late 1970 s and 1980 s, wave 3 of research witnessed yet another round… |
65
- | 235c4f33d5bfc81bfa09a2458fcc0e42ef4454dc | propaganda | context | …It published workbooks and held seminars in the early 1930s aimed at promoting the ideal of "self-determination," rega… | …It published workbooks and held seminars in the early 1930 s aimed at promoting the ideal of "self-determination," rega… |
66
 
67
  ## Truncation (missing tail)
68
 
69
- Hydrated text is missing the end of the reference span.
70
-
71
  | Paper | Concept | Field | Reference (fragment) | Hydrated (fragment) |
72
  | --- | --- | --- | --- | --- |
73
- | 016f7a076ac272db106fbcea056752c7307f676a | specification error | definition | the omission of explanatory variable | the omission of explanatory variables |
74
- | 0d23df558a30492946059c017343a431dc3dc172 | inter-media agenda-setting | definition | …ed theory to explain how content transfers between news medi | …ed theory to explain how content transfers between news media |
75
-
76
- ## Citation spacing/formatting differences
77
-
78
- Citation formatting differs (e.g., `[155, 164]` vs `[155,164]`).
79
-
80
- | Paper | Concept | Field | Reference (fragment) | Hydrated (fragment) |
81
- | --- | --- | --- | --- | --- |
82
- | frai-06-1225093 | Explainability | context | …ndent, and AI embraces a wide variety of tasks (Miller, 2019a). We treat explainability as a specialization of interpret… | …ndent, and AI embraces a wide variety of tasks (Miller, 2019 a). We treat explainability as a specialization of interpret… |
83
-
84
- ## Header/boilerplate inserted
85
 
86
- Hydrated text includes header/boilerplate not in reference.
87
 
88
  | Paper | Concept | Field | Reference (fragment) | Hydrated (fragment) |
89
  | --- | --- | --- | --- | --- |
90
- | https://arxiv.org/abs/2312.16148 | spin bias | context | …ndencies between words and phrases must be considered [110]. Spin Bias describes a form of bias introduced either by lea… | …ndencies between words and phrases must be considered [110]. Manuscript submitted to ACM The Media Bias Taxonomy Spin Bias describes a form of bias introduced either by lea… |
 
1
  # Mismatch classes (hydration vs reference)
2
 
3
+ This page shows **short excerpts** around observed differences between the hydrated output
4
+ and the reference dataset (`defextra_hf_tablefix.csv`).
5
+ Excerpts are intentionally tiny and only highlight the mismatch itself.
6
+
7
+ Observed classes (examples shown below):
 
 
 
 
 
 
 
 
 
 
8
 
9
+ - wording: 3 example(s)
10
+ - punctuation: 3 example(s)
11
+ - casing: 3 example(s)
12
+ - hyphenation: 3 example(s)
13
+ - digit_spacing: 3 example(s)
14
+ - truncation: 2 example(s)
15
+ - header: 1 example(s)
16
+
17
+ ## Wording / lexical differences
18
 
19
  | Paper | Concept | Field | Reference (fragment) | Hydrated (fragment) |
20
  | --- | --- | --- | --- | --- |
21
+ | 057bd5a3a6b652dfd1419128aae578478f5891b0 | stereotypes | definition | Negative beliefs and attitudes assigned … | negative beliefs and attitudes assigned … |
22
+ | 09c660d438e8b372f3e77504c069255b85c00256 | centrality | definition | …nging a high-level feature has a greaterimpact on the meaning of an object than … | …nging a high-level feature has a greater impact on the meaning of an object than… |
23
+ | 09c660d438e8b372f3e77504c069255b85c00256 | psychological distance | definition | a subjective experience that something i… | expect a relatively high sensitivity to … |
24
 
25
  ## Punctuation-only differences
26
 
 
 
27
  | Paper | Concept | Field | Reference (fragment) | Hydrated (fragment) |
28
  | --- | --- | --- | --- | --- |
29
+ | 033b21cf1c6d3bdae587e673452b994443bf3546 | narrative | definition | The representation of an event or a seri… | the representation of an event or a seri… |
30
+ | 03c4bb2121b3dd2b5302d37c81e84092a501bc91 | platformed racism | definition | …ordances, business models and policies-- and the specific cultures of use associ… | …ordances, business models and policies--and the specific cultures of use associa… |
31
+ | 2106.16117v1 | long-term energy security | definition | …mic developments and environmental needs | …mic developments and environmental needs' |
32
 
33
  ## Casing differences
34
 
 
 
35
  | Paper | Concept | Field | Reference (fragment) | Hydrated (fragment) |
36
  | --- | --- | --- | --- | --- |
37
+ | 05bfced33d92944b7a0672490c371342d28ee076 | observational bias | definition | Observed data differs systematically fro… | observed data differs systematically fro… |
38
+ | 1538c4777271ae6abb542801dac01423f4d566ad | publication bias | definition | Significant results are more likely to b… | significant results are more likely to b… |
39
+ | 24589ef86242ff182e7bae495b94e7c11931f20c | anxious semiotics | definition | Sense of uncertainty and concern over po… | sense of uncertainty and concern over po… |
40
 
41
  ## Hyphenation / line-break joins
42
 
 
 
43
  | Paper | Concept | Field | Reference (fragment) | Hydrated (fragment) |
44
  | --- | --- | --- | --- | --- |
45
+ | 3457607 | AI Fairness 360 | definition | …kit developed by IBM to help moving fair- ness research algorithms into an indus… | …kit developed by IBM to help moving fairness research algorithms into an industr… |
46
+ | 1901.00596v4 | Directed Graph | context | …rected from one node to another. An undi- rected graph is considered as a specia… | …rected from one node to another. An undirected graph is considered as a special … |
47
+ | 1901.00596v4 | GNNs | context | …graph-related tasks in an end-to-end man- ner. Many GNNs explicitly extract high… | …graph-related tasks in an end-to-end manner. Many GNNs explicitly extract high-l… |
48
 
49
  ## Letter–digit spacing
50
 
 
 
51
  | Paper | Concept | Field | Reference (fragment) | Hydrated (fragment) |
52
  | --- | --- | --- | --- | --- |
53
+ | 0090023afc66cd2741568599057f4e82b566137c | omitted variable bias | context | …ted Variable Bias. Omitted variable bias4 occurs when one or more important vari… | …ted Variable Bias. Omitted variable bias 4 occurs when one or more important var… |
54
+ | 016f7a076ac272db106fbcea056752c7307f676a | selection bias | context | …ncing. Conducted mainly in the late 1970s and 1980s, wave 3 of research witnesse… | …ncing. Conducted mainly in the late 1970 s and 1980 s, wave 3 of research witnes… |
55
+ | 1901.00596v4 | VC dimension | context | …the VC dimension of a GNN* [15] is O(p 4n 2 ) if it uses the sigmoid or tangent … | …the VC dimension of a GNN* [15] is O(p 4 n 2) if it uses the sigmoid or tangent … |
56
 
57
  ## Truncation (missing tail)
58
 
 
 
59
  | Paper | Concept | Field | Reference (fragment) | Hydrated (fragment) |
60
  | --- | --- | --- | --- | --- |
61
+ | 016f7a076ac272db106fbcea056752c7307f676a | specification error | definition | the omission of explanatory variable | the omission of explanatory variables |
62
+ | 0d23df558a30492946059c017343a431dc3dc172 | inter-media agenda-setting | definition | … how content transfers between news medi | … how content transfers between news media |
 
 
 
 
 
 
 
 
 
 
63
 
64
+ ## Header / boilerplate inserted
65
 
66
  | Paper | Concept | Field | Reference (fragment) | Hydrated (fragment) |
67
  | --- | --- | --- | --- | --- |
68
+ | https://arxiv.org/abs/2312.16148 | spin bias | context | …ds and phrases must be considered [110]. Spin Bias describes a form of bias intr… | …ds and phrases must be considered [110]. Manuscript submitted to ACM The Media B… |
pyproject.toml CHANGED
@@ -2,14 +2,14 @@
2
  name = "defextra-dataset"
3
  version = "0.1.0"
4
  description = "DefExtra hydration utilities (legal release)"
5
- requires-python = ">=3.10"
6
  dependencies = [
7
- "grobid-client-python>=0.0.9",
8
- "lxml>=4.9",
9
- "pdfplumber>=0.10",
10
- "pdfminer.six>=20221105",
11
- "PyPDF2>=3.0",
12
- "pyarrow>=14.0",
13
  ]
14
 
15
  [tool.uv]
 
2
  name = "defextra-dataset"
3
  version = "0.1.0"
4
  description = "DefExtra hydration utilities (legal release)"
5
+ requires-python = ">=3.12,<3.13"
6
  dependencies = [
7
+ "grobid-client-python>=0.1.2",
8
+ "lxml>=6.0.2",
9
+ "pdfplumber>=0.11.9",
10
+ "pdfminer.six>=20251230",
11
+ "PyPDF2>=3.0.1",
12
+ "pyarrow>=22.0.0",
13
  ]
14
 
15
  [tool.uv]
scripts/hydrate_defextra.py CHANGED
@@ -1047,36 +1047,6 @@ def main() -> None:
1047
  )
1048
  ctx_strip_brackets, ctx_strip_parens = _strip_flags(row, "context")
1049
 
1050
- if not definition and pdf_token_index:
1051
- span = _find_pdf_hash_span(row, pdf_token_index, "definition")
1052
- if span:
1053
- definition = _extract_with_trailing_punct(
1054
- pdf_token_index.doc_text,
1055
- span[0],
1056
- span[1],
1057
- )
1058
- hydrated_from_pdf += 1
1059
- if not definition:
1060
- stripped_index = _get_stripped_index(
1061
- pdf_token_cache_stripped,
1062
- pdf_path,
1063
- pdf_token_index.doc_text,
1064
- def_strip_brackets,
1065
- def_strip_parens,
1066
- )
1067
- if stripped_index is not None:
1068
- span = _find_pdf_hash_span(
1069
- row,
1070
- stripped_index,
1071
- "definition",
1072
- )
1073
- if span:
1074
- definition = _extract_with_trailing_punct(
1075
- stripped_index.doc_text,
1076
- span[0],
1077
- span[1],
1078
- )
1079
- hydrated_from_pdf += 1
1080
  if not definition and tei_token_index:
1081
  spec = _select_hash_specs(row, "definition")
1082
  if spec:
@@ -1239,32 +1209,31 @@ def main() -> None:
1239
  )
1240
  if _span_matches_hash(row, candidate, "definition"):
1241
  definition = candidate
1242
-
1243
- if not context and pdf_token_index:
1244
- span = _find_pdf_hash_span(row, pdf_token_index, "context")
1245
  if span:
1246
- context = _extract_with_trailing_punct(
1247
  pdf_token_index.doc_text,
1248
  span[0],
1249
  span[1],
1250
  )
1251
  hydrated_from_pdf += 1
1252
- if not context:
1253
  stripped_index = _get_stripped_index(
1254
  pdf_token_cache_stripped,
1255
  pdf_path,
1256
  pdf_token_index.doc_text,
1257
- ctx_strip_brackets,
1258
- ctx_strip_parens,
1259
  )
1260
  if stripped_index is not None:
1261
  span = _find_pdf_hash_span(
1262
  row,
1263
  stripped_index,
1264
- "context",
1265
  )
1266
  if span:
1267
- context = _extract_with_trailing_punct(
1268
  stripped_index.doc_text,
1269
  span[0],
1270
  span[1],
@@ -1433,6 +1402,36 @@ def main() -> None:
1433
  )
1434
  if _span_matches_hash(row, candidate, "context"):
1435
  context = candidate
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1436
 
1437
  if not definition and pdf_path is not None and pdf_token_index:
1438
  spec = _select_hash_specs(row, "definition")
 
1047
  )
1048
  ctx_strip_brackets, ctx_strip_parens = _strip_flags(row, "context")
1049
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1050
  if not definition and tei_token_index:
1051
  spec = _select_hash_specs(row, "definition")
1052
  if spec:
 
1209
  )
1210
  if _span_matches_hash(row, candidate, "definition"):
1211
  definition = candidate
1212
+ if not definition and pdf_token_index:
1213
+ span = _find_pdf_hash_span(row, pdf_token_index, "definition")
 
1214
  if span:
1215
+ definition = _extract_with_trailing_punct(
1216
  pdf_token_index.doc_text,
1217
  span[0],
1218
  span[1],
1219
  )
1220
  hydrated_from_pdf += 1
1221
+ if not definition:
1222
  stripped_index = _get_stripped_index(
1223
  pdf_token_cache_stripped,
1224
  pdf_path,
1225
  pdf_token_index.doc_text,
1226
+ def_strip_brackets,
1227
+ def_strip_parens,
1228
  )
1229
  if stripped_index is not None:
1230
  span = _find_pdf_hash_span(
1231
  row,
1232
  stripped_index,
1233
+ "definition",
1234
  )
1235
  if span:
1236
+ definition = _extract_with_trailing_punct(
1237
  stripped_index.doc_text,
1238
  span[0],
1239
  span[1],
 
1402
  )
1403
  if _span_matches_hash(row, candidate, "context"):
1404
  context = candidate
1405
+ if not context and pdf_token_index:
1406
+ span = _find_pdf_hash_span(row, pdf_token_index, "context")
1407
+ if span:
1408
+ context = _extract_with_trailing_punct(
1409
+ pdf_token_index.doc_text,
1410
+ span[0],
1411
+ span[1],
1412
+ )
1413
+ hydrated_from_pdf += 1
1414
+ if not context:
1415
+ stripped_index = _get_stripped_index(
1416
+ pdf_token_cache_stripped,
1417
+ pdf_path,
1418
+ pdf_token_index.doc_text,
1419
+ ctx_strip_brackets,
1420
+ ctx_strip_parens,
1421
+ )
1422
+ if stripped_index is not None:
1423
+ span = _find_pdf_hash_span(
1424
+ row,
1425
+ stripped_index,
1426
+ "context",
1427
+ )
1428
+ if span:
1429
+ context = _extract_with_trailing_punct(
1430
+ stripped_index.doc_text,
1431
+ span[0],
1432
+ span[1],
1433
+ )
1434
+ hydrated_from_pdf += 1
1435
 
1436
  if not definition and pdf_path is not None and pdf_token_index:
1437
  spec = _select_hash_specs(row, "definition")
uv.lock CHANGED
The diff for this file is too large to render. See raw diff