Table of Contents
Fetching ...

StRuCom: A Novel Dataset of Structured Code Comments in Russian

Maria Dziuba, Valentin Malykh

TL;DR

StRuCom tackles the scarcity of Russian structured code comments by delivering a large, curated dataset of 153K Russian docstring-style pairs across five languages and five documentation formats. The authors implement a filtration pipeline to enforce structure, augment data with synthetic comments via large-language models, and demonstrate that finetuning Qwen2.5-Coder models using LoRA yields statistically significant gains in semantic quality (BERTScore) and, in some cases, surface-level fluency (chrf++) over baselines. They validate the approach with rigorous evaluation against Russian-adapted metrics and show the practical viability of adapting model-assisted documentation for Russian-speaking developers. This work provides a valuable resource and a replicable methodology for expanding structured code documentation in non-English languages, with potential extensions to additional languages and stricter quality controls.

Abstract

Structured code comments in docstring format are essential for code comprehension and maintenance, but existing machine learning models for their generation perform poorly for Russian compared to English. To bridge this gap, we present StRuCom - the first large-scale dataset (153K examples) specifically designed for Russian code documentation. Unlike machine-translated English datasets that distort terminology (e.g., technical loanwords vs. literal translations) and docstring structures, StRuCom combines human-written comments from Russian GitHub repositories with synthetically generated ones, ensuring compliance with Python, Java, JavaScript, C#, and Go standards through automated validation. Fine-tuning Qwen2.5-Coder models (0.5B-7B) on StRuCom shows statistically significant improvements of chrf++ and BERTScore over baseline models.

StRuCom: A Novel Dataset of Structured Code Comments in Russian

TL;DR

StRuCom tackles the scarcity of Russian structured code comments by delivering a large, curated dataset of 153K Russian docstring-style pairs across five languages and five documentation formats. The authors implement a filtration pipeline to enforce structure, augment data with synthetic comments via large-language models, and demonstrate that finetuning Qwen2.5-Coder models using LoRA yields statistically significant gains in semantic quality (BERTScore) and, in some cases, surface-level fluency (chrf++) over baselines. They validate the approach with rigorous evaluation against Russian-adapted metrics and show the practical viability of adapting model-assisted documentation for Russian-speaking developers. This work provides a valuable resource and a replicable methodology for expanding structured code documentation in non-English languages, with potential extensions to additional languages and stricter quality controls.

Abstract

Structured code comments in docstring format are essential for code comprehension and maintenance, but existing machine learning models for their generation perform poorly for Russian compared to English. To bridge this gap, we present StRuCom - the first large-scale dataset (153K examples) specifically designed for Russian code documentation. Unlike machine-translated English datasets that distort terminology (e.g., technical loanwords vs. literal translations) and docstring structures, StRuCom combines human-written comments from Russian GitHub repositories with synthetically generated ones, ensuring compliance with Python, Java, JavaScript, C#, and Go standards through automated validation. Fine-tuning Qwen2.5-Coder models (0.5B-7B) on StRuCom shows statistically significant improvements of chrf++ and BERTScore over baseline models.
Paper Structure (20 sections, 6 figures, 6 tables)

This paper contains 20 sections, 6 figures, 6 tables.

Figures (6)

  • Figure 1: Python Google docstring style
  • Figure 2: JavaDoc comment style
  • Figure 3: C# XML comment style
  • Figure 4: JSDOC comment style
  • Figure 5: GoDoc comment style
  • ...and 1 more figures