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 : 소스 코드 파일과 각 줄은 하나의 Java 메소드를 나타냅니다. ast.json : Java 메소드의 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 파일). 예측 : 생성 된 주석 파일. 각 라인은 하나의 샘플을 나타냅니다.