File size: 3,545 Bytes
6e14fe5
29ec917
6e14fe5
 
eab9784
 
6e14fe5
eab9784
 
 
 
09b176d
eab9784
6e14fe5
29ec917
eab9784
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4ee5d65
 
 
 
 
 
 
 
eab9784
4ee5d65
 
 
 
 
 
 
 
eab9784
4ee5d65
 
 
 
 
 
 
 
eab9784
4ee5d65
 
 
 
 
 
 
 
eab9784
4ee5d65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
eab9784
 
4ee5d65
eab9784
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6e14fe5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
---
license: apache-2.0
task_categories:
- feature-extraction
language:
- en
- ar
configs:
- config_name: default
  data_files:
  - split: train
    path: table_extract.csv
tags:
- finance
---

# Table Extract Dataset
This dataset is designed to evaluate the ability of large language models (LLMs) to extract tables from text. It provides a collection of text snippets containing tables and their corresponding structured representations in JSON format.
## Source
The dataset is based on the [Table Fact Dataset](https://github.com/wenhuchen/Table-Fact-Checking/tree/master?tab=readme-ov-file), also known as TabFact, which contains 16,573 tables extracted from Wikipedia.

## Schema:
Each data point in the dataset consists of two elements:
  * context: A string containing the text snippet with the embedded table.
  * answer: A JSON object representing the extracted table structure.
The JSON object follows this format:
{
  "column_1": { "row_id": "val1", "row_id": "val2", ... },
  "column_2": { "row_id": "val1", "row_id": "val2", ... },
  ...
}
Each key in the JSON object represents a column header, and the corresponding value is another object containing key-value pairs for each row in that column.

## Examples:
### Example 1:
#### Context:
![example1](example1.png)
#### Answer:
```json
{
  "date": {
    "0": "1st",
    "1": "3rd",
    "2": "4th",
    "3": "11th",
    "4": "17th",
    "5": "24th",
    "6": "25th"
  },
  "opponent": {
    "0": "bracknell bees",
    "1": "slough jets",
    "2": "slough jets",
    "3": "wightlink raiders",
    "4": "romford raiders",
    "5": "swindon wildcats",
    "6": "swindon wildcats"
  },
  "venue": {
    "0": "home",
    "1": "away",
    "2": "home",
    "3": "home",
    "4": "home",
    "5": "away",
    "6": "home"
  },
  "result": {
    "0": "won 4 - 1",
    "1": "won 7 - 3",
    "2": "lost 5 - 3",
    "3": "won 7 - 2",
    "4": "lost 3 - 4",
    "5": "lost 2 - 4",
    "6": "won 8 - 2"
  },
  "attendance": {
    "0": 1753,
    "1": 751,
    "2": 1421,
    "3": 1552,
    "4": 1535,
    "5": 902,
    "6": 2124
  },
  "competition": {
    "0": "league",
    "1": "league",
    "2": "league",
    "3": "league",
    "4": "league",
    "5": "league",
    "6": "league"
  },
  "man of the match": {
    "0": "martin bouz",
    "1": "joe watkins",
    "2": "nick cross",
    "3": "neil liddiard",
    "4": "stuart potts",
    "5": "lukas smital",
    "6": "vaclav zavoral"
  }
}

```

### Example 2:
#### Context:
![example2](example2.png)
#### Answer:
```json
{
  "country": {
    "exonym": {
      "0": "iceland",
      "1": "indonesia",
      "2": "iran",
      "3": "iraq",
      "4": "ireland",
      "5": "isle of man"
    },
    "endonym": {
      "0": "ísland",
      "1": "indonesia",
      "2": "īrān ایران",
      "3": "al - 'iraq العراق îraq",
      "4": "éire ireland",
      "5": "isle of man ellan vannin"
    }
  },
  "capital": {
    "exonym": {
      "0": "reykjavík",
      "1": "jakarta",
      "2": "tehran",
      "3": "baghdad",
      "4": "dublin",
      "5": "douglas"
    },
    "endonym": {
      "0": "reykjavík",
      "1": "jakarta",
      "2": "tehrān تهران",
      "3": "baghdad بغداد bexda",
      "4": "baile átha cliath dublin",
      "5": "douglas doolish"
    }
  },
  "official or native language(s) (alphabet/script)": {
    "0": "icelandic",
    "1": "bahasa indonesia",
    "2": "persian ( arabic script )",
    "3": "arabic ( arabic script ) kurdish",
    "4": "irish english",
    "5": "english manx"
  }
}
```