Papers › The impact of lexical and grammatical processing on generating code from natural language

The impact of lexical and grammatical processing on generating code from natural language

28 Feb 2022Findings (ACL) 2022 5arXiv:2202.13972archive 2025-07-28

Nathanaël Beau, Benoît Crabbé

Considering the seq2seq architecture of TranX for natural language to code translation, we identify four key components of importance: grammatical constraints, lexical preprocessing, input representations, and copy mechanisms. To study the impact of these components, we use a state-of-the-art architecture that relies on BERT encoder and a grammar-based decoder for which a formalization is provided. The paper highlights the importance of the lexical substitution component in the current natural language to code systems.

PaperPDFConference PDFCode

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

Code

gitlab.com/codegenfact/BertranX officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Code GenerationCode TranslationDecoderTranslation

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Code Generation CoNaLa TranX + BERT w/mined BLEU 34.2 #4 of 14 Archive leaderboard report
Code Generation CoNaLa TranX + BERT w/mined Exact Match Accuracy 5.8 #4 of 14 Archive leaderboard report
Code Generation Django TranX + BERT w/mined Accuracy 81.03 #2 of 11 Archive leaderboard report
Code Generation Django TranX + BERT w/mined BLEU Score 79.86 #2 of 11 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

AdamAttentionAttention DropoutBERTDense ConnectionsDropoutLSTMLayer NormalizationLinear LayerLinear Warmup With Linear DecayMulti-Head AttentionResidual ConnectionSeq2SeqSigmoid ActivationSoftmaxTanh ActivationWeight DecayWordPiece

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections