wasiahmad / PLBART

Official code of our work, Unified Pre-training for Program Understanding and Generation [NAACL 2021].
https://arxiv.org/abs/2103.06333
MIT License
186 stars 35 forks source link

Can PLBART work on single statement? #31

Closed kimgimkigi closed 2 years ago

kimgimkigi commented 2 years ago

Hi, Thanks for sharing the items.

I have a simple question. In the dataset, most of the data input is a single method declaration paragraph.

But If the input data is single statements, PLBART still works well?

for example, in code-to-code tasks(translate java code to python code), If we input System.out.println("hello world"); then PLBART could translate it to print("hello world") ?

I'm asking this because I want to use PLBART encoder as statement embedding model.

Thanks!

wasiahmad commented 2 years ago

PLBART needs training to be able to do such statement-level translation. You may consider the dataset from https://github.com/wasiahmad/AVATAR to train PLBART and evaluate on such statements.