CSpider
收藏资源简介:
CSpider数据集是Text-to-SQL数据集的中文版本,由研究人员从原始的英文Spider数据集翻译而来。为了追求多样性,表达相似含义的句子被翻译成不同的中文表达方式,以保持丰富性。具体来说,数据库的表名和列名仍然保持英文原样,只有某些人名和地名进行了本地化处理。
The CSpider dataset is the Chinese version of the Text-to-SQL dataset, translated by researchers from the original English Spider dataset. To ensure diversity, sentences with similar meanings are translated into different Chinese expressions to maintain richness. Specifically, the names of database tables and columns are kept in English, with only certain names of individuals and places localized.
CSpider 数据集概述
基本信息
- 名称:CSpider
- 类型:大规模中文数据集
- 用途:复杂跨领域语义解析和文本到SQL任务(自然语言关系数据库接口)
- 发布年份:2019年
- 相关论文:A Pilot Study for Chinese SQL Semantic Parsing
数据集特点
- 语言:中文
- 规模:大规模
- 复杂性:复杂跨领域
- 来源:基于英文数据集Spider翻译而来
数据内容
- 训练数据:
train.json - 开发数据:
dev.json - 测试数据:未公开(需通过任务网站提交)
- 数据库:包含多个数据库文件
- 词嵌入:提供字符级和词级嵌入文件
下载链接
- 完整数据集:Google Drive 或 百度网盘(提取码:cgh1)
- 论文数据集:Google Drive
任务网站
引用信息
bibtex @inproceedings{min2019pilot, title={A Pilot Study for Chinese SQL Semantic Parsing}, author={Min, Qingkai and Shi, Yuefeng and Zhang, Yue}, booktitle={Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)}, pages={3643--3649}, year={2019} }
基线模型
- 环境要求:
- Python 2.7
- Pytorch 0.2.0 GPU
- 依赖安装:
pip install -r requirements.txt - 数据准备:
- 下载数据、嵌入和数据库
- 可选下载预训练Glove嵌入
- 训练:使用
train_all.sh脚本 - 测试:使用
test_gen.sh脚本生成SQL查询 - 评估:使用
evaluation.sh脚本评估生成的SQL查询
致谢
- 基于Spider数据集
- 实现基于SyntaxSQLNet




