gsakkas / seq2parse

Seq2Parse: Error Correcting Parsing using a Transformer Classifier
8 stars 1 forks source link

A few questions about ERule dataset and repair procedure #1

Open breandan opened 1 year ago

breandan commented 1 year ago

Hi @gsakkas, I hope you are doing well. I am not sure if you recall, but we met briefly after your talk in New Zealand last December. I am working on reproducing the results on the 15k ERule and HumanEval dataset and had a few questions about the abstract sequences used in section 7.1-7.4 of the paper. Any suggestions or advice you could provide would be greatly appreciated.

Stmts_Or_Newlines is _NAME_ == _NAME_ _NEWLINE_ _NEWLINE_ _ENDMARKER_ <||> Err_Literals -> H Literals <++> InsertErr -> is <||> 1 <||> 33.0 <||> popular

I understand tok_chgs is Err_Literals -> H Literals <++> InsertErr -> is which refers to [105, 323], but it is not yet clear to me how tokns are altered in the ground truth fix. Does the suffix after _ENDMARKER_ identify a unique abstract sequence fix?

It is also possible I am mistaken or misunderstanding an important detail. If so, any clarification would be welcome. Thank you!

cc: @jin-guo @xujiesi

breandan commented 1 year ago

Hi George, just a quick update in case you were working on the anonymized dataset. I was able to partially reproduce the seq2parse results on an alternate dataset from Wong et al. (2019), however the source code predictions are a little tricky to compare due to the aforementioned issue with mapping abstract sequences back to character sequences. Although I wasn't sure sure how to obtain the Precision@{10,20,50} over concrete source code, I was able to run the seq2parse.py script and based on a Top-1 analysis of ~400 broken/fixed pairs from the StackOverflow dataset containing <3 abstract token edits, roughly ~86% of the Seq2Parse repairs were syntactically valid, ~35% matched the abstract tokens from the human fixes, and ~0.5% matched the human fixes on a character level. Are those numbers drastically out of line with what we should expect? Also FYI, the web demo now seems to be unavailable. Thank you again.

gsakkas commented 1 year ago

Hi @breandan,

Sorry for the late reply, it's being quite busy. Of course I remember our talk back in December and nice to hear from you again!

Let me know if you have any more questions.