five

Salesforce/wikisql

收藏
Hugging Face2024-01-18 更新2024-06-15 收录
下载链接:
https://hf-mirror.com/datasets/Salesforce/wikisql
下载链接
链接失效反馈
官方服务:
资源简介:
--- annotations_creators: - crowdsourced language: - en language_creators: - found - machine-generated license: - unknown multilinguality: - monolingual pretty_name: WikiSQL size_categories: - 10K<n<100K source_datasets: - original task_categories: - text2text-generation task_ids: [] paperswithcode_id: wikisql tags: - text-to-sql dataset_info: features: - name: phase dtype: int32 - name: question dtype: string - name: table struct: - name: header sequence: string - name: page_title dtype: string - name: page_id dtype: string - name: types sequence: string - name: id dtype: string - name: section_title dtype: string - name: caption dtype: string - name: rows sequence: sequence: string - name: name dtype: string - name: sql struct: - name: human_readable dtype: string - name: sel dtype: int32 - name: agg dtype: int32 - name: conds sequence: - name: column_index dtype: int32 - name: operator_index dtype: int32 - name: condition dtype: string splits: - name: test num_bytes: 32234761 num_examples: 15878 - name: validation num_bytes: 15159314 num_examples: 8421 - name: train num_bytes: 107345917 num_examples: 56355 download_size: 26164664 dataset_size: 154739992 --- # Dataset Card for "wikisql" ## Table of Contents - [Dataset Description](#dataset-description) - [Dataset Summary](#dataset-summary) - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards) - [Languages](#languages) - [Dataset Structure](#dataset-structure) - [Data Instances](#data-instances) - [Data Fields](#data-fields) - [Data Splits](#data-splits) - [Dataset Creation](#dataset-creation) - [Curation Rationale](#curation-rationale) - [Source Data](#source-data) - [Annotations](#annotations) - [Personal and Sensitive Information](#personal-and-sensitive-information) - [Considerations for Using the Data](#considerations-for-using-the-data) - [Social Impact of Dataset](#social-impact-of-dataset) - [Discussion of Biases](#discussion-of-biases) - [Other Known Limitations](#other-known-limitations) - [Additional Information](#additional-information) - [Dataset Curators](#dataset-curators) - [Licensing Information](#licensing-information) - [Citation Information](#citation-information) - [Contributions](#contributions) ## Dataset Description - **Repository:** https://github.com/salesforce/WikiSQL - **Paper:** [Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learning](https://arxiv.org/abs/1709.00103) - **Point of Contact:** [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards) - **Size of downloaded dataset files:** 26.16 MB - **Size of the generated dataset:** 154.74 MB - **Total amount of disk used:** 180.90 MB ### Dataset Summary A large crowd-sourced dataset for developing natural language interfaces for relational databases. WikiSQL is a dataset of 80654 hand-annotated examples of questions and SQL queries distributed across 24241 tables from Wikipedia. ### Supported Tasks and Leaderboards [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards) ### Languages [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards) ## Dataset Structure ### Data Instances #### default - **Size of downloaded dataset files:** 26.16 MB - **Size of the generated dataset:** 154.74 MB - **Total amount of disk used:** 180.90 MB An example of 'validation' looks as follows. ``` This example was too long and was cropped: { "phase": 1, "question": "How would you answer a second test question?", "sql": { "agg": 0, "conds": { "column_index": [2], "condition": ["Some Entity"], "operator_index": [0] }, "human_readable": "SELECT Header1 FROM table WHERE Another Header = Some Entity", "sel": 0 }, "table": "{\"caption\": \"L\", \"header\": [\"Header1\", \"Header 2\", \"Another Header\"], \"id\": \"1-10015132-9\", \"name\": \"table_10015132_11\", \"page_i..." } ``` ### Data Fields The data fields are the same among all splits. #### default - `phase`: a `int32` feature. - `question`: a `string` feature. - `header`: a `list` of `string` features. - `page_title`: a `string` feature. - `page_id`: a `string` feature. - `types`: a `list` of `string` features. - `id`: a `string` feature. - `section_title`: a `string` feature. - `caption`: a `string` feature. - `rows`: a dictionary feature containing: - `feature`: a `string` feature. - `name`: a `string` feature. - `human_readable`: a `string` feature. - `sel`: a `int32` feature. - `agg`: a `int32` feature. - `conds`: a dictionary feature containing: - `column_index`: a `int32` feature. - `operator_index`: a `int32` feature. - `condition`: a `string` feature. ### Data Splits | name |train|validation|test | |-------|----:|---------:|----:| |default|56355| 8421|15878| ## Dataset Creation ### Curation Rationale [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards) ### Source Data #### Initial Data Collection and Normalization [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards) #### Who are the source language producers? [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards) ### Annotations #### Annotation process [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards) #### Who are the annotators? [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards) ### Personal and Sensitive Information [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards) ## Considerations for Using the Data ### Social Impact of Dataset [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards) ### Discussion of Biases [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards) ### Other Known Limitations [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards) ## Additional Information ### Dataset Curators [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards) ### Licensing Information [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards) ### Citation Information ``` @article{zhongSeq2SQL2017, author = {Victor Zhong and Caiming Xiong and Richard Socher}, title = {Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learning}, journal = {CoRR}, volume = {abs/1709.00103}, year = {2017} } ``` ### Contributions Thanks to [@lewtun](https://github.com/lewtun), [@ghomasHudson](https://github.com/ghomasHudson), [@thomwolf](https://github.com/thomwolf) for adding this dataset.
提供机构:
Salesforce
原始信息汇总

数据集卡片概述

数据集描述

数据集摘要

WikiSQL 是一个包含 80654 个手工标注的示例数据集,用于开发自然语言接口以与关系数据库交互。该数据集包含来自 Wikipedia 的 24241 个表格,分布在各种问题和 SQL 查询中。

支持的任务和排行榜

更多信息需补充

语言

数据集主要包含英语内容。

数据集结构

数据实例

默认

  • 下载的数据集文件大小: 26.16 MB
  • 生成的数据集大小: 154.74 MB
  • 总磁盘使用量: 180.90 MB

一个 validation 数据实例的示例如下:

json { "phase": 1, "question": "How would you answer a second test question?", "sql": { "agg": 0, "conds": { "column_index": [2], "condition": ["Some Entity"], "operator_index": [0] }, "human_readable": "SELECT Header1 FROM table WHERE Another Header = Some Entity", "sel": 0 }, "table": "{"caption": "L", "header": ["Header1", "Header 2", "Another Header"], "id": "1-10015132-9", "name": "table_10015132_11", "page_i..." }

数据字段

所有分割的数据字段相同。

默认

  • phase: 一个 int32 特征。
  • question: 一个 string 特征。
  • header: 一个 liststring 特征。
  • page_title: 一个 string 特征。
  • page_id: 一个 string 特征。
  • types: 一个 liststring 特征。
  • id: 一个 string 特征。
  • section_title: 一个 string 特征。
  • caption: 一个 string 特征。
  • rows: 一个字典特征,包含:
    • feature: 一个 string 特征。
  • name: 一个 string 特征。
  • human_readable: 一个 string 特征。
  • sel: 一个 int32 特征。
  • agg: 一个 int32 特征。
  • conds: 一个字典特征,包含:
    • column_index: 一个 int32 特征。
    • operator_index: 一个 int32 特征。
    • condition: 一个 string 特征。

数据分割

名称 训练集 验证集 测试集
默认 56355 8421 15878

数据集创建

策划理由

更多信息需补充

源数据

初始数据收集和规范化

更多信息需补充

源语言生产者是谁?

更多信息需补充

标注

标注过程

更多信息需补充

标注者是谁?

更多信息需补充

个人和敏感信息

更多信息需补充

使用数据的注意事项

数据集的社会影响

更多信息需补充

偏见的讨论

更多信息需补充

其他已知限制

更多信息需补充

附加信息

数据集策展人

更多信息需补充

许可信息

更多信息需补充

引用信息

bibtex @article{zhongSeq2SQL2017, author = {Victor Zhong and Caiming Xiong and Richard Socher}, title = {Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learning}, journal = {CoRR}, volume = {abs/1709.00103}, year = {2017} }

贡献

感谢 @lewtun, @ghomasHudson, @thomwolf 添加此数据集。

搜集汇总
数据集介绍
main_image_url
构建方式
WikiSQL是一个大规模众包数据集,旨在为关系型数据库的自然语言接口研究提供支撑。该数据集基于维基百科中24,241张真实表格构建,通过众包方式收集了80,654组人工标注的自然语言问题与对应SQL查询对。每个样本包含一个自然语言问题、一张结构化表格以及对应的SQL语句,其中SQL语句以结构化形式记录,包括选择的列索引、聚合操作类型以及条件子句。数据被划分为训练集(56,355条)、验证集(8,421条)和测试集(15,878条),确保了模型评估的可靠性。
特点
WikiSQL数据集的核心特点在于其真实世界表格的多样性和标注的精细度。表格涵盖多种主题,每张表格包含标题、行、列类型等丰富元信息。自然语言问题与SQL查询的对应关系由人工精确标注,SQL语句以机器可解析的结构化字段(如sel、agg、conds)和人类可读的字符串形式同时呈现。这种双重表示既便于模型训练,也支持直观理解。数据集规模适中,样本量在10万以内,为文本到SQL任务提供了标准化基准。
使用方法
该数据集主要用于文本到SQL生成任务的模型训练与评估。使用时,可通过HuggingFace Datasets库直接加载,默认提供train、validation和test三个子集。每个样本包含question字段(自然语言问题)、table字段(包含header、rows等表格结构信息)以及sql字段(包含human_readable字符串和结构化字段)。研究者可基于question和table生成SQL,并与标准SQL对比计算执行准确率或逻辑形式准确率。数据集支持多种模型架构,包括序列到序列模型和基于注意力机制的编码器-解码器框架。
背景与挑战
背景概述
WikiSQL数据集由Salesforce研究院的Victor Zhong、Caiming Xiong与Richard Socher于2017年提出,旨在弥合自然语言与结构化查询语言之间的鸿沟,推动文本到SQL解析任务的发展。该数据集包含80,654条人工标注的问答对,覆盖24,241张源自Wikipedia的表格,其核心研究问题聚焦于如何让机器理解自然语言问题并生成精确的SQL查询语句。作为该领域的里程碑式资源,WikiSQL不仅为Seq2SQL等强化学习模型提供了训练与评估的基准,还促进了跨领域自然语言接口的探索,对智能数据库交互、语义解析及人机对话系统产生了深远影响。
当前挑战
WikiSQL所解决的领域挑战在于自然语言到SQL的语义映射复杂性,包括处理问题中隐含的聚合操作、条件筛选及多表关联逻辑,同时要求模型具备对表格结构(如列名、数据类型)的鲁棒理解能力。在构建过程中,挑战主要体现在三个方面:一是需从Wikipedia海量表格中筛选结构清晰、信息丰富的子集,确保覆盖多样化的查询模式;二是依赖众包标注者将自然语言问题与SQL查询对齐,需设计严格的标注协议以降低歧义和错误;三是平衡数据规模与标注质量,在56,355条训练样本中维持查询类型分布的均衡性,避免模型偏向常见模式。
常用场景
经典使用场景
WikiSQL数据集是自然语言接口与关系数据库交互领域的里程碑式资源。该数据集囊括了逾八万条人工标注的样本,涵盖来自维基百科的逾两万四千张表格,每一条样本均由自然语言问句及其对应的SQL查询语句构成。其经典使用场景聚焦于训练和评估文本到SQL(Text-to-SQL)解析模型,使模型能够理解人类以自然语言表达的查询意图,并精准地将其转化为结构化的数据库查询语言。这一过程不仅考验模型对复杂表格结构的语义理解能力,还要求其具备在多样化数据模式下的泛化能力,从而成为衡量序列生成与语义解析技术进步的基准测试平台。
衍生相关工作
WikiSQL数据集衍生了一系列具有深远影响的经典工作。其中,Salesforce团队提出的Seq2SQL模型开创性地将强化学习引入SQL生成任务,为后续研究奠定了方法论基础。此外,基于该数据集,研究者们进一步探索了更具挑战性的多表查询场景,催生了Spider与WikiTableQuestions等大规模基准数据集。在模型架构方面,相关工作如SQLNet利用列注意力机制降低了输出空间复杂度,而TypeSQL则通过融入知识图谱信息增强模型对数值与实体类型的敏感度。这些衍生工作不仅在学术评测榜单上屡获突破,还推动了预训练语言模型(如T5、BART)在结构化查询生成领域的应用,持续拓展着自然语言与数据库交互的技术边界。
数据集最近研究
最新研究方向
WikiSQL作为自然语言接口与关系数据库交互的基石性数据集,持续引领着文本到SQL解析领域的前沿探索。当前研究热点聚焦于利用大规模预训练语言模型(如T5、Codex)提升跨领域泛化能力,通过引入表模式感知的编码机制解决复杂嵌套查询与多表关联问题。同时,该数据集在推动弱监督学习与强化学习融合的序列生成任务中扮演关键角色,相关成果已延伸至多轮对话式查询、表格事实验证等新兴方向。其众包标注的80,654条问答对与24,241张维基百科表格构成的丰富场景,为评估模型在开放域下的语义鲁棒性提供了重要基准,深刻影响着智能数据分析与低代码开发工具的演进路径。
以上内容由遇见数据集搜集并总结生成
二维码
社区交流群
二维码
科研交流群
商业服务