EMSE DeepCom
1.0.0
EMSE-Deepcom的源代码和数据集
命令: python3 __main__.py config.yaml --train -v
项目信息在文件projects.txt中列出。每行代表一个项目,其中包括github用户名和由“ _”连接的项目名称
命令: python3 get_ast.py source.code ast.json
source.code.code:源代码文件和每行代表一个Java方法。 AST.JSON:Java方法的AST文件,每行代表一个AST:
例如:
public boolean doesNotHaveIds (){
return getIds () == null || getIds (). getIds (). isEmpty ();
}
[
{"id": 0, "type": "MethodDeclaration", "children": [1, 2], "value": "doesNotHaveIds"},
{"id": 1, "type": "BasicType", "value": "boolean"},
{"id": 2, "type": "ReturnStatement", "children": [3], "value": "return"},
{"id": 3, "type": "BinaryOperation", "children": [4, 7]},
{"id": 4, "type": "BinaryOperation", "children": [5, 6]},
{"id": 5, "type": "MethodInvocation", "value": "getIds"},
{"id": 6, "type": "Literal", "value": "null"},
{"id": 7, "type": "MethodInvocation", "children": [8, 9], "value": "getIds"},
{"id": 8, "type": "MethodInvocation", "value": "."},
{"id": 9, "type": "MethodInvocation", "value": "."}
]
由于LFS的限制,可以从Google Drive下载数据集
评估脚本在文件脚本中列出。
命令: python3 evaluation.py reference predictions
命令: perl multi-bleu.perl reference < predictions
命令: java -Xmx2G -jar meteor-1.5.jar predictions reference -l en -norm
参考:地面真相文件(我们的数据集中的test.token.nl文件)。预测:生成的评论文件。每行代表一个样本。