File size: 3,486 Bytes
6e14fe5
29ec917
6e14fe5
 
eab9784
 
6e14fe5
eab9784
 
 
 
09b176d
eab9784
6e14fe5
29ec917
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
---
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
{
  "aircraft": {
    "0": "robinson r - 22",
    "1": "bell 206b3 jetranger",
    "2": "ch - 47d chinook",
    "3": "mil mi - 26",
    "4": "ch - 53e super stallion"
  },
  "description": {
    "0": "light utility helicopter",
    "1": "turboshaft utility helicopter",
    "2": "tandem rotor helicopter",
    "3": "heavy - lift helicopter",
    "4": "heavy - lift helicopter"
  },
  "max gross weight": {
    "0": "1370 lb (635 kg)",
    "1": "3200 lb (1451 kg)",
    "2": "50000 lb (22680 kg)",
    "3": "123500 lb (56000 kg)",
    "4": "73500 lb (33300 kg)"
  },
  "total disk area": {
    "0": "497 ft square (46.2 m square)",
    "1": "872 ft square (81.1 m square)",
    "2": "5655 ft square (526 m square)",
    "3": "8495 ft square (789 m square)",
    "4": "4900 ft square (460 m square)"
  },
  "max disk loading": {
    "0": "2.6 lb / ft square (14 kg / m square)",
    "1": "3.7 lb / ft square (18 kg / m square)",
    "2": "8.8 lb / ft square (43 kg / m square)",
    "3": "14.5 lb / ft square (71 kg / m square)",
    "4": "15 lb / ft square (72 kg / m square)"
  }
}
```

### 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"
  }
}
```