arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2104.04706cs.SEcs.LGcs.PL
收藏

ManyTypes4Py:一个基于机器学习的类型推断的Python基准数据集

ManyTypes4Py: A Benchmark Python Dataset for Machine Learning-based Type Inference

Delft University of Technology(代尔夫特理工大学)

Amir M. Mir, Evaldas Latoskinas, Georgios Gousios

摘要:

在本文中,我们介绍了ManyTypes4Py,这是一个用于基于机器学习(ML)的类型推断的大型Python数据集。该数据集总共包含5,382个Python项目,其类型注释超过869K。删除了重复的源代码文件,以消除重复偏差的负面影响。为了方便ML模型的训练和评估,数据集通过文件分为训练集、验证集和测试集。为了从抽象语法树(AST)中提取类型信息,开发了一个轻量级的静态分析器管道,并与数据集一起使用。使用此管道,分析收集的Python项目,并将AST分析的结果存储在JSON格式的文件中。ManyTypes4Py数据集在zenodo上共享,其工具在GitHub上公开提供。

英文摘要:

In this paper, we present ManyTypes4Py, a large Python dataset for machine learning (ML)-based type inference. The dataset contains a total of 5,382 Python projects with more than 869K type annotations. Duplicate source code files were removed to eliminate the negative effect of the duplication bias. To facilitate training and evaluation of ML models, the dataset was split into training, validation and test sets by files. To extract type information from abstract syntax trees (ASTs), a lightweight static analyzer pipeline is developed and accompanied with the dataset. Using this pipeline, the collected Python projects were analyzed and the results of the AST analysis were stored in JSON-formatted files. The ManyTypes4Py dataset is shared on zenodo and its tools are publicly available on GitHub.

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

↑