hheiden-roots commited on
Commit
ae21d2d
·
verified ·
1 Parent(s): 9e9d40b

Add dataset card with full schema documentation

Browse files
Files changed (1) hide show
  1. README.md +110 -0
README.md CHANGED
@@ -1,4 +1,18 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  dataset_info:
3
  features:
4
  - name: uid
@@ -36,3 +50,99 @@ configs:
36
  - split: validation
37
  path: data/validation-*
38
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ task_categories:
6
+ - question-answering
7
+ - table-question-answering
8
+ tags:
9
+ - financial
10
+ - numerical-reasoning
11
+ - multi-table
12
+ - hierarchical-tables
13
+ - earnings-reports
14
+ size_categories:
15
+ - 1K<n<10K
16
  dataset_info:
17
  features:
18
  - name: uid
 
50
  - split: validation
51
  path: data/validation-*
52
  ---
53
+
54
+ # MultiHiertt
55
+
56
+ A repackaging of the [MultiHiertt dataset](https://github.com/psunlpgroup/MultiHiertt) (Zhao et al., ACL 2022) for numerical reasoning over documents containing multiple hierarchical financial tables.
57
+
58
+ MultiHiertt is built on [FinTabNet](https://developer.ibm.com/exchanges/data/all/fintabnet/) (CDLA-Permissive-1.0), extracting 4,791 multi-page documents from S&P 500 annual reports (1999-2019). Each document contains 2-6 hierarchical HTML tables and surrounding text. Questions require reasoning across multiple tables and/or text passages, with answers derived via arithmetic programs or direct span selection.
59
+
60
+ ## Why this version
61
+
62
+ The existing HuggingFace repository ([yilunzhao/MultiHiertt](https://huggingface.co/datasets/yilunzhao/MultiHiertt)) bundles model checkpoints alongside the dataset files, totalling 7.66 GB, and the dataset viewer is broken due to an Arrow conversion error on the HTML table fields. This version packages only the annotation data (172 MB) in a clean parquet format with a documented schema.
63
+
64
+ ## Splits
65
+
66
+ | Split | Examples |
67
+ |---|---|
68
+ | train | 7,830 |
69
+ | validation | 1,044 |
70
+
71
+ The reference-free leaderboard test set (1,566 examples, `question` only) is intentionally excluded.
72
+
73
+ ## Schema
74
+
75
+ | Field | Type | Description |
76
+ |---|---|---|
77
+ | `uid` | string | Unique example ID (MD5 hash) |
78
+ | `paragraphs` | list[string] | Sentences from the document; table positions marked with `## Table N ##` placeholders |
79
+ | `tables` | list[string] | Raw HTML string for each table in the document |
80
+ | `table_description` | string | JSON-serialized dict mapping `"{table}-{row}-{col}"` keys to natural-language cell descriptions (e.g. `"Table 0 shows Revenue is $446."`) |
81
+ | `question` | string | The financial question |
82
+ | `answer` | string | Numeric answer (e.g. `"9805"`) or text span; coerced to string |
83
+ | `program` | string | Flat DSL reasoning program (e.g. `add(10881,8729), divide(#0,const_2)`); empty string for span-selection questions (~19% of train) |
84
+ | `text_evidence` | list[int] | Zero-indexed paragraph indices used as gold evidence |
85
+ | `table_evidence` | list[string] | Gold cell references in `"{table}-{row}-{col}"` format, matching `table_description` keys |
86
+
87
+ ### `table_description` format
88
+
89
+ Keys follow the pattern `"{table_idx}-{row}-{col}"` (zero-indexed table, one-indexed row and column). Values are auto-generated natural-language descriptions of the cell in context, produced by the authors' preprocessing script:
90
+
91
+ ```python
92
+ import json
93
+ td = json.loads(row["table_description"])
94
+ # {"0-2-1": "Table 0 shows Revenue of 2007 is $446.", "0-2-2": ...}
95
+ ```
96
+
97
+ ### Program format
98
+
99
+ Programs use the same DSL as [FinQA](https://huggingface.co/datasets/rootsautomation/FinQA): flat token sequences with `#N` back-references to prior step results and `const_*` predefined constants. Unlike FinQA, MultiHiertt does not include a `steps` decomposition or `program_re` nested form.
100
+
101
+ ## Usage
102
+
103
+ ```python
104
+ from datasets import load_dataset
105
+ import json
106
+
107
+ ds = load_dataset("rootsautomation/MultiHiertt")
108
+ ex = ds["train"][0]
109
+
110
+ print(ex["question"])
111
+ print(ex["answer"])
112
+ print(ex["program"]) # empty string if span-selection
113
+
114
+ # Reconstruct document with tables in position
115
+ for para in ex["paragraphs"]:
116
+ if para.startswith("## Table"):
117
+ idx = int(para.split()[2])
118
+ print(f"[TABLE {idx}]: {ex['tables'][idx][:80]}...")
119
+ else:
120
+ print(para)
121
+
122
+ # Access cell-level evidence
123
+ td = json.loads(ex["table_description"])
124
+ for cell_ref in ex["table_evidence"]:
125
+ print(f" {cell_ref}: {td.get(cell_ref, '(no description)')}")
126
+ ```
127
+
128
+ ## License
129
+
130
+ QA annotations and preprocessing code: [MIT](https://github.com/psunlpgroup/MultiHiertt/blob/main/LICENSE).
131
+
132
+ Underlying table data is sourced from FinTabNet, released under [CDLA-Permissive-1.0](https://cdla.dev/permissive-1-0/). The original annual reports are publicly available SEC filings from S&P 500 companies.
133
+
134
+ ## Citation
135
+
136
+ ```bibtex
137
+ @inproceedings{zhao-etal-2022-multihiertt,
138
+ title = "{M}ulti{H}iertt: Numerical Reasoning over Multi Hierarchical Tabular and Textual Data",
139
+ author = "Zhao, Yilun and Li, Yunxiang and Li, Chenying and Zhang, Rui",
140
+ booktitle = "Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
141
+ month = may,
142
+ year = "2022",
143
+ address = "Dublin, Ireland",
144
+ publisher = "Association for Computational Linguistics",
145
+ url = "https://aclanthology.org/2022.acl-long.454",
146
+ pages = "6588--6600",
147
+ }
148
+ ```