构建跨语言查询数据集,用轻量规则解析器实现SPARQL到Cypher精准转换。
Spider4SSC & S2CLite: A text-to-multi-query-language dataset using lightweight ontology-agnostic SPARQL to Cypher parser
- 纯规则引擎无依赖,直接将SPARQL转为Cypher,不需图数据或外部工具。
- 在Spider4SPARQL上解析准确率达77.8%,比顶尖方法高33.6个百分点。
- 生成含4525问的统一多语言查询数据集,适合多模型对比研究。
本文提出Spider4SSC数据集与S2CLite解析工具。S2CLite是轻量级、无本体依赖的解析器,可将SPARQL查询转化为Cypher查询,支持原地与大规模转换。其采用纯规则机制(受传统编译器启发),无需RDF图或外部工具。在BSBM42和Spider4SPARQL数据集上的实验表明,S2CLite将解析错误显著降低,在Spider4SPARQL上总解析准确率达77.8%,远超当前最优方法S2CTrans的44.2%。在两解析器共处理的查询子集上,执行准确率达96.6%,优于S2CTrans 7.3%。进一步使用S2CLite将Spider4SPARQL转为Cypher,构建了包含4525个独特问题的Spider4SSC数据集,每题对应2581组等价的SQL、SPARQL和Cypher查询。S2CLite已开源(github.com/vejvarm/S2CLite),Spider4SSC数据集亦可下载。
原文摘要 · Abstract (English)
We present Spider4SSC dataset and S2CLite parsing tool. S2CLite is a lightweight, ontology-agnostic parser that translates SPARQL queries into Cypher queries, enabling both in-situ and large-scale SPARQL to Cypher translation. Unlike existing solutions, S2CLite is purely rule-based (inspired by traditional programming language compilers) and operates without requiring an RDF graph or external tools. Experiments conducted on the BSBM42 and Spider4SPARQL datasets show that S2CLite significantly reduces query parsing errors, achieving a total parsing accuracy of 77.8% on Spider4SPARQL compared to 44.2% by the state-of-the-art S2CTrans. Furthermore, S2CLite achieved a 96.6\% execution accuracy on the intersecting subset of queries parsed by both parsers, outperforming S2CTrans by 7.3%. We further use S2CLite to parse Spider4SPARQL queries to Cypher and generate Spider4SSC, a unified Text-to-Query language (SQL, SPARQL, Cypher) dataset with 4525 unique questions and 3 equivalent sets of 2581 matching queries (SQL, SPARQL and Cypher). We open-source S2CLite for further development on GitHub (github.com/vejvarm/S2CLite) and provide the clean Spider4SSC dataset for download.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。