Studying the Difference Between Natural and Programming Language Corpora
Not on the map. Why?
Abstract (arXiv)
Code corpora, as observed in large software systems, are now known to be far more repetitive and predictable than natural language corpora. But why? Does the difference simply arise from the syntactic limitations of programming languages? Or does it arise from the differences in authoring decisions made by the writers of these natural and programming language texts? We conjecture that the differences are not entirely due to syntax, but also from the fact that reading and writing code is un-natural for humans, and requires substantial mental effort; so, people prefer to write code in ways that are familiar to both reader and writer. To support this argument, we present results from two sets of studies: 1) a first set aimed at attenuating the effects of syntax, and 2) a second, aimed at measuring repetitiveness of text written in other settings (e.g. second language, technical/specialized jargon), which are also effortful to write. We find find that this repetition in source code is not entirely the result of grammar constraints, and thus some repetition must result from human choice. While the evidence we find of similar repetitive behavior in technical and learner corpora does not conclusively show that such language is used by humans to mitigate difficulty, it is consistent with that theory.
Key facts. Cited by 13 papers in the map (data through 7 Oct 2026). First posted on arXiv 6 Jun 2018.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 2; 2022: 2; 2023: 2; 2024: 3; 2025: 1; 2026: 3.
13 papers.
Sort:
By area:
- 2023Outline, Then Details: Syntactically Guided Coarse-To-Fine Code Generationcited by 27
- 2021Learning to Complete Code with Sketchescited by 23
- 2021Memorization and Generalization in Neural Code Intelligence Modelscited by 17
- 2022An Exploratory Study on Code Attention in BERTcited by 12
- 2024Studying LLM Performance on Closed- and Open-source Datacited by 11
- 2024A Critical Study of What Code-LLMs (Do Not) Learncited by 4
- 2025Scaling Laws for Code: A More Data-Hungry Regimecited by 3
- 2024Statistical Patterns in the Equations of Physics and the Emergence of a Meta-Law of Naturecited by 2
- 2022LAMNER: Code Comment Generation Using Character Language Model and Named Entity Recognitioncited by 1
- 2023Redundancy and Concept Analysis for Code-trained Language Modelscited by 1
- 2026AnCoder: Anchored Code Generation via Discrete Diffusion Modelscited by 1
- 2026Position: Natural Language Should Not Fully Replace Formal Languagescited by 1
1 more
- 2026Uncertainty Quantification for LLM-based Code Generationcited by 0
- 2026Uncertainty Quantification for LLM-based Code Generation12 May 2026
- 2026Position: Natural Language Should Not Fully Replace Formal Languages10 May 2026
- 2026AnCoder: Anchored Code Generation via Discrete Diffusion Models5 Feb 2026
- 2025Scaling Laws for Code: A More Data-Hungry Regime9 Oct 2025
- 2024Statistical Patterns in the Equations of Physics and the Emergence of a Meta-Law of Nature12 Aug 2024
- 2024A Critical Study of What Code-LLMs (Do Not) Learn17 Jun 2024
- 2024Studying LLM Performance on Closed- and Open-source Data23 Feb 2024
- 2023Redundancy and Concept Analysis for Code-trained Language Models1 May 2023
- 2023Outline, Then Details: Syntactically Guided Coarse-To-Fine Code Generation28 Apr 2023
- 2022An Exploratory Study on Code Attention in BERT5 Apr 2022
- 2022LAMNER: Code Comment Generation Using Character Language Model and Named Entity Recognition5 Apr 2022
- 2021Learning to Complete Code with Sketches18 Jun 2021
1 more
- 2023Outline, Then Details: Syntactically Guided Coarse-To-Fine Code Generationcited by 27
- 2021Learning to Complete Code with Sketchescited by 23
- 2021Memorization and Generalization in Neural Code Intelligence Modelscited by 17
- 2022An Exploratory Study on Code Attention in BERTcited by 12
- 2024Studying LLM Performance on Closed- and Open-source Datacited by 11
- 2024A Critical Study of What Code-LLMs (Do Not) Learncited by 4
- 2025Scaling Laws for Code: A More Data-Hungry Regimecited by 3
- 2024Statistical Patterns in the Equations of Physics and the Emergence of a Meta-Law of Naturecited by 2
- 2022LAMNER: Code Comment Generation Using Character Language Model and Named Entity Recognitioncited by 1
- 2023Redundancy and Concept Analysis for Code-trained Language Modelscited by 1
- 2026Position: Natural Language Should Not Fully Replace Formal Languagescited by 1
- 2026Uncertainty Quantification for LLM-based Code Generationcited by 0
- 2026Uncertainty Quantification for LLM-based Code Generation12 May 2026
- 2026Position: Natural Language Should Not Fully Replace Formal Languages10 May 2026
- 2025Scaling Laws for Code: A More Data-Hungry Regime9 Oct 2025
- 2024Statistical Patterns in the Equations of Physics and the Emergence of a Meta-Law of Nature12 Aug 2024
- 2024A Critical Study of What Code-LLMs (Do Not) Learn17 Jun 2024
- 2024Studying LLM Performance on Closed- and Open-source Data23 Feb 2024
- 2023Redundancy and Concept Analysis for Code-trained Language Models1 May 2023
- 2023Outline, Then Details: Syntactically Guided Coarse-To-Fine Code Generation28 Apr 2023
- 2022An Exploratory Study on Code Attention in BERT5 Apr 2022
- 2022LAMNER: Code Comment Generation Using Character Language Model and Named Entity Recognition5 Apr 2022
- 2021Learning to Complete Code with Sketches18 Jun 2021
- 2021Memorization and Generalization in Neural Code Intelligence Models16 Jun 2021