microsoft / CodeXGLUE

CodeXGLUE
MIT License
1.56k stars 366 forks source link

this line is wrong #172

Open mylyes opened 1 year ago

mylyes commented 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)'

celbree commented 1 year ago

The type of references is list(list(str)), like said in the docstring.

mylyes commented 1 year ago

image image image

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