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文件)。預測:生成的評論文件。每行代表一個樣本。