错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Idiomatizing Python Source Code Using Different Recurrent Architectures

  • Balázs Szalontai,
  • Tamás Márton,
  • Ákos Kukucska,
  • Balázs Pintér,
  • Tibor Gregorics

摘要

Recurrent encoder-decoder architectures have been shown to be capable of solving a wide range of sequence-to-sequence problems, such as translating text, generating summary and transforming source code. In this paper, we investigate the capabilities of recurrent encoder-decoder architectures for refactoring nonidiomatic Python code. We propose multiple possible improvements to the base recurrent architecture and investigate their impact on model performance. In order to also examine the effect that such modifications might have on each other, we train 72 different encoder-decoder architectures on the task of Python code idiomatizing. The best performing architectures are thoroughly evaluated on a real-world dataset, containing programs that were written by students. This procedure necessitates extensive manual evaluation by independent annotators. The results show that the proposed improvements can greatly increase the F1-score of the method compared to the base approach.