Open mylyes opened 1 year ago
https://github.com/microsoft/CodeXGLUE/blob/e252e54a74dd55b1294e2379b213b1541dfefaf5/Code-Code/code-to-code-trans/evaluator/CodeBLEU/weighted_ngram_match.py#L283
parameter ‘reference‘ is a type of list(list(str),dict(str)), but not list(str), so i think this line should be 'ref_lens = (len(reference[0]) for reference in references)'
The type of references is list(list(str)), like said in the docstring.
I review the code and debug it ,the reference is type of list(list(str), dict(str)) indeed, I hope you can review it pls, ty
https://github.com/microsoft/CodeXGLUE/blob/e252e54a74dd55b1294e2379b213b1541dfefaf5/Code-Code/code-to-code-trans/evaluator/CodeBLEU/weighted_ngram_match.py#L283
parameter ‘reference‘ is a type of list(list(str),dict(str)), but not list(str), so i think this line should be 'ref_lens = (len(reference[0]) for reference in references)'