arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2306.15604cs.CLcs.SE
收藏

使用神经机器翻译构建多语言代码搜索数据集

Constructing Multilingual Code Search Dataset Using Neural Machine Translation

The University of Tokyo(东京大学);Microsoft Research Asia(微软亚洲研究院)

Ryo Sekizawa, Nan Duan, Shuai Lu, Hitomi Yanaka

AI总结:

本研究使用神经机器翻译模型构建了包含四种自然语言和四种编程语言的多语言代码搜索数据集,实验表明数据规模比翻译质量对模型性能的影响更大。

摘要:

代码搜索是一项寻找与给定自然语言查询在语义上匹配的编程代码的任务。尽管该任务的一些现有数据集在编程语言方面是多语言的,但其查询数据仅为英文。在本研究中,我们使用神经机器翻译模型创建了一个包含四种自然语言和四种编程语言的多语言代码搜索数据集。使用我们的数据集,我们预训练并微调了基于 Transformer 的模型,然后在多个代码搜索测试集上对其进行评估。我们的结果表明,使用所有自然语言和编程语言数据预训练的模型在大多数情况下表现最佳。通过将回译数据过滤应用于我们的数据集,我们证明了翻译质量在一定程度上影响模型性能,但数据规模的影响更大。

英文摘要:

Code search is a task to find programming codes that semantically match the given natural language queries. Even though some of the existing datasets for this task are multilingual on the programming language side, their query data are only in English. In this research, we create a multilingual code search dataset in four natural and four programming languages using a neural machine translation model. Using our dataset, we pre-train and fine-tune the Transformer-based models and then evaluate them on multiple code search test sets. Our results show that the model pre-trained with all natural and programming language data has performed best in most cases. By applying back-translation data filtering to our dataset, we demonstrate that the translation quality affects the model's performance to a certain extent, but the data size matters more.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑