Student team: Anish Kishor Savla, Chih-Kai Ting, Karl Shen Munson, and Serenity Wade
Project Mentors: Kiran Kate, IBM Research, Dr. Kavitha Srinivas, IBM Research
Style is a significant component of natural language text, able to change the tone of text while keeping the underlying information the same. Even though programming languages have strict rules on their grammaticality, they also have style. Code can be written with the same functionality but using different language features. However, style in programming languages is difficult to quantify, and thus as part of this work, we define style attributes, specifically for Python. To build a definition of style, we utilized hierarchical clustering to capture a style definition without needing to specify transformations. In addition to defining style, we explore the capability of a pre-trained code language model to capture information about code style.
Probing of Language Models for Code: Exploring Code Style Transfer with Neural Networks (PDF )