# wiki_table_questions

<br />

- **Description**:

The dataset contains pairs table-question, and the respective answer. The
questions require multi-step reasoning and various data operations such as
comparison, aggregation, and arithmetic computation. The tables were randomly
selected among Wikipedia tables with at least 8 rows and 5 columns.

(As per the documentation usage notes)

- Dev: Mean accuracy over three (not five) splits of the training data. In
  other words, train on 'split-{1,2,3}-train' and test on 'split-{1,2,3}-dev',
  respectively, then average the accuracy.

- Test: Train on 'train' and test on 'test'.

- **Additional Documentation** :
  [Explore on Papers With Code](https://paperswithcode.com/dataset/wikitablequestions)

- **Homepage** :
  <https://ppasupat.github.io/WikiTableQuestions/#usage-notes>

- **Source code** :
  [`tfds.structured.wiki_table_questions.WikiTableQuestions`](https://github.com/tensorflow/datasets/tree/master/tensorflow_datasets/structured/wiki_table_questions/wiki_table_questions.py)

- **Versions**:

  - **`1.0.0`** (default): Initial release.
- **Download size** : `65.36 MiB`

- **Dataset size** : `237.24 MiB`

- **Auto-cached**
  ([documentation](https://www.tensorflow.org/datasets/performances#auto-caching)):
  Yes

- **Splits**:

| Split | Examples |
|---|---|
| `'split-1-dev'` | 2,810 |
| `'split-1-train'` | 11,321 |
| `'split-2-dev'` | 2,838 |
| `'split-2-train'` | 11,312 |
| `'split-3-dev'` | 2,838 |
| `'split-3-train'` | 11,311 |
| `'test'` | 4,344 |
| `'train'` | 14,149 |

- **Feature structure**:

    FeaturesDict({
        'input_text': FeaturesDict({
            'context': string,
            'table': Sequence({
                'column_header': string,
                'content': string,
                'row_number': int16,
            }),
        }),
        'target_text': string,
    })

- **Feature documentation**:

| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
|   | FeaturesDict |   |   |   |
| input_text | FeaturesDict |   |   |   |
| input_text/context | Tensor |   | string |   |
| input_text/table | Sequence |   |   |   |
| input_text/table/column_header | Tensor |   | string |   |
| input_text/table/content | Tensor |   | string |   |
| input_text/table/row_number | Tensor |   | int16 |   |
| target_text | Tensor |   | string |   |

- **Supervised keys** (See
  [`as_supervised` doc](https://www.tensorflow.org/datasets/api_docs/python/tfds/load#args)):
  `('input_text', 'target_text')`

- **Figure**
  ([tfds.show_examples](https://www.tensorflow.org/datasets/api_docs/python/tfds/visualization/show_examples)):
  Not supported.

- **Examples**
  ([tfds.as_dataframe](https://www.tensorflow.org/datasets/api_docs/python/tfds/as_dataframe)):

<button id="displaydataframe">Display examples...</button>

- **Citation**:

    @inproceedings{pasupat-liang-2015-compositional,
        title = "Compositional Semantic Parsing on Semi-Structured Tables",
        author = "Pasupat, Panupong  and
          Liang, Percy",
        booktitle = "Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)",
        month = jul,
        year = "2015",
        address = "Beijing, China",
        publisher = "Association for Computational Linguistics",
        url = "https://www.aclweb.org/anthology/P15-1142",
        doi = "10.3115/v1/P15-1142",
        pages = "1470--1480",
    }