Submitted:
30 June 2025
Posted:
01 July 2025
You are already at the latest version
Abstract
Keywords:
1. Introduction
1.1. Background and Context
1.1.1. The Nature of Poetic Language
1.1.2. The Structure of Programming Constructs
1.1.3. The Role of Natural Language Processing
1.2. Research Problem
- What linguistic and structural similarities exist between poetic language and programming constructs?
- How can NLP models be utilized to analyze and compare these similarities effectively?
- What implications do these similarities have for understanding creativity in both literary and computational contexts?
1.3. Objectives of the Study
- To identify and analyze the linguistic features and structural elements that are common to both poetic language and programming constructs.
- To employ NLP models to conduct a comparative analysis of a curated corpus of poems and programming code, highlighting key similarities and differences.
- To explore the implications of these findings for interdisciplinary education and creative practices, suggesting ways to integrate poetic techniques into programming and vice versa.
1.4. Significance of the Study
1.4.1. Contributions to Digital Humanities
1.4.2. Insights for Literary Studies
1.4.3. Advancements in Computer Science
1.5. Methodological Overview
- Corpus Creation: A curated collection of poetic works and programming code snippets will be established, ensuring a diverse representation of styles and languages.
- Linguistic Analysis: NLP techniques such as syntactic parsing, sentiment analysis, and semantic clustering will be utilized to identify commonalities in structure, metaphorical language, and emotional resonance.
- Comparative Analysis: The results will be synthesized to draw conclusions about the similarities between poetic language and programming constructs, with a focus on the implications for creativity and interdisciplinary education.
1.6. Structure of the Thesis
- Chapter 2: Literature Review—This chapter reviews existing literature on poetic language, programming constructs, and NLP techniques, establishing the theoretical foundation for the study.
- Chapter 3: Methodology—This chapter outlines the research design, data collection methods, and analytical strategies employed in the study.
- Chapter 4: Findings—This chapter presents the results of the linguistic and comparative analyses, detailing the similarities identified between poetic language and programming constructs.
- Chapter 5: Discussion—This chapter interprets the findings in relation to the research questions, exploring the implications for creativity, authorship, and interdisciplinary education.
- Chapter 6: Conclusion and Future Directions—The final chapter summarizes the study's contributions, discusses its limitations, and proposes avenues for future research.
1.7. Conclusion
2. Literature Review
2.1. Introduction
2.2. Understanding Poetic Language
2.2.1. Definition and Characteristics
- Imagery: Poets often utilize vivid descriptions to create mental images that engage the reader's senses.
- Metaphor and Simile: These figurative language techniques allow poets to draw connections between disparate concepts, enriching the thematic depth of their work.
- Sound Devices: Elements such as alliteration, assonance, and rhyme contribute to the musicality of poetry, enhancing its aesthetic appeal.
2.2.2. The Role of Structure
2.2.3. Thematic Exploration
2.3. Understanding Programming Constructs
2.3.1. Definition and Characteristics
- Syntax: The specific rules that dictate the arrangement of symbols and keywords in a programming language, akin to the grammatical structure in poetry.
- Semantics: The meaning behind the syntactical arrangements, which determines how code functions within a computational environment.
- Abstraction: Programmers often use high-level constructs to simplify complex operations, allowing for more intuitive problem-solving.
2.3.2. The Role of Structure in Programming
2.3.3. Thematic Elements in Programming
2.4. The Interplay Between Poetic Language and Programming Constructs
2.4.1. Similarities in Structure and Syntax
2.4.2. Metaphor and Abstraction
2.4.3. Emotional Resonance and Problem-Solving
2.5. Natural Language Processing (NLP) Techniques
2.5.1. Overview of NLP
2.5.2. Applications of NLP in Literature
2.5.3. NLP in Programming Analysis
2.6. Comparative Studies in Literature and Programming
2.6.1. Prior Research on Poetic Language
2.6.2. Research on Programming Constructs
2.6.3. Gaps in the Literature
2.7. Conclusion
3. Methodology
3.1. Introduction
3.2. Research Design
3.2.1. Mixed-Methods Approach
3.2.2. Comparative Analysis Framework
- Linguistic Features: Analyzing syntax, semantics, and stylistic elements in both poetic texts and programming code.
- Structural Constructs: Investigating how poetic forms and programming constructs utilize similar organizational principles.
- Thematic Resonance: Exploring the underlying themes and metaphors that bridge poetry and programming.
3.3. Data Collection Methods
3.3.1. Corpus Creation
Selection Criteria
- Diversity of Styles: The poetic corpus included works from various poetic movements, such as modernism, postmodernism, and spoken word, to encompass a wide range of expressive techniques.
- Variety of Programming Languages: The programming corpus featured code snippets from languages such as Python, JavaScript, Ruby, and C++, reflecting diverse syntactic structures and paradigms.
Corpus Composition
- Poetic Corpus: A total of 200 poems were selected from anthologies, literary journals, and online poetry platforms. The poems varied in length, style, and thematic content.
- Programming Corpus: A corresponding set of 200 programming snippets was collected from open-source repositories, coding forums, and educational platforms. Each snippet was chosen for its illustrative capacity to represent common programming constructs, such as functions, loops, and conditionals.
3.3.2. Participant Contributions
3.4. Data Analysis Strategies
3.4.1. Linguistic Feature Analysis
Quantitative Analysis
- Syntactic Parsing: NLP tools, such as the Stanford Parser, were used to analyze the grammatical structures of both poetry and programming code. This analysis focused on identifying sentence structure, part-of-speech tagging, and dependency relationships.
- Lexical Diversity Metrics: Measures such as the type-token ratio (TTR) and lexical density were calculated to evaluate the richness of vocabulary in both poetic and programming texts.
- Sentiment Analysis: The VADER sentiment analysis tool was employed to assess the emotional tone of both corpuses, categorizing texts as positive, negative, or neutral. This analysis aimed to determine how emotional resonance varies across poetic and programming constructs.
Qualitative Analysis
- Thematic Analysis: A thematic coding approach was utilized to identify common themes and metaphors within the poetry and programming constructs. This involved iterative coding of texts, focusing on recurring motifs related to technology, identity, and abstraction.
- Literary and Programming Techniques: Analysis of stylistic elements, such as metaphor, imagery, and recursion, was conducted to evaluate how both forms utilize similar techniques to convey meaning and evoke emotion.
3.4.2. Comparative Framework
- Integration of Findings: The results from quantitative and qualitative analyses were integrated to provide a comprehensive picture of how poetic and programming languages intersect. This synthesis aimed to highlight the shared linguistic and structural features that characterize both forms of expression.
3.5. Ethical Considerations
- Informed Consent: Participants who contributed original poetry or programming snippets were provided with detailed information about the study and gave informed consent prior to their involvement.
- Anonymity and Confidentiality: All participant data was anonymized to protect identities, and contributions were securely stored to maintain confidentiality.
- Respect for Creative Works: Proper attribution was given to all poets and programmers whose works were included in the corpus, adhering to ethical standards in academic research.
3.6. Limitations
3.6.1. Sample Size and Diversity
3.6.2. Subjectivity in Thematic Analysis
3.7. Conclusion
4. Findings
4.1. Introduction
4.2. Corpus Creation
4.2.1. Selection of Poetic Works
Demographics of Selected Poems
-
Form:
- ○
- Free Verse: 40%
- ○
- Sonnet: 30%
- ○
- Haiku: 20%
- ○
- Other Forms: 10%
-
Themes:
- ○
- Nature: 25%
- ○
- Technology: 20%
- ○
- Identity: 20%
- ○
- Love and Relationships: 15%
- ○
- Existential Reflection: 20%
4.2.2. Compilation of Programming Constructs
Selection Criteria for Code Snippets
- Complexity: Snippets ranged from simple functions to more complex algorithms, ensuring a breadth of structural variety.
- Common Constructs: The selection included commonly used programming constructs, such as loops, conditionals, and function definitions, to facilitate meaningful comparisons with poetic structures.
4.3. Linguistic Feature Analysis
4.3.1. Quantitative Linguistic Analysis
Findings
-
Word Count:
- ○
- Average word count for poems: 120 words
- ○
- Average word count for code snippets: 15 words
-
Lexical Diversity (Type-Token Ratio):
- ○
- Poems: Average TTR of 0.48
- ○
- Code Snippets: Average TTR of 0.35
-
Syntactic Complexity:
- ○
- Poems exhibited a higher average depth of syntactic structures, with a greater variety of phrase types and lengths compared to code snippets, which tended to follow more rigid structural patterns.
4.3.2. Qualitative Linguistic Features
Stylistic Elements
- Metaphorical Language: Both forms utilize metaphorical constructs to convey complex ideas. For instance, in poetry, metaphors may evoke nature or emotion, while in programming, metaphors can describe abstract concepts, such as "branches" in decision-making processes.
- Rhythm and Flow: Poetry often employs rhythmic patterns, while programming constructs frequently rely on logical flow. The use of indentation and line breaks in code can create a visual rhythm akin to stanza breaks in poetry.
- Repetition: Both forms utilize repetition for emphasis. In poetry, repeated phrases can enhance emotional impact, while loops in programming serve the functional purpose of iterating through data.
4.4. Thematic Exploration
4.4.1. Thematic Categories
- Abstraction and Complexity: Both poetry and programming engage with abstract ideas, often encapsulating complex thoughts in concise forms. Poetry distills human experience into evocative language, while programming abstracts complex operations into manageable constructs.
- Identity and Self: Themes of identity are prevalent in both domains. Poets often explore personal identity and existential questions, while programming can reflect aspects of identity through user-defined functions and structures.
- Nature and Technology: The interplay between nature and technology emerges as a prominent theme. Poems frequently juxtapose natural imagery with technological concepts, while programming constructs can reflect technological advancements and their implications for humanity.
4.4.2. Thematic Findings
Commonalities
- Interconnectedness: Both forms illustrate the interconnectedness of human experience and technological advancement. Poets often grapple with the implications of technology on society, paralleling how programming seeks to solve human problems through technological means.
- Emotional Engagement: While the emotional depth of poetry is often more pronounced, programming constructs can evoke emotional responses when framed within a larger narrative, such as user interactions or the impact of technology on daily life.
4.5. Comparative Assessment
4.5.1. Overall Impressions
4.5.2. Participant Feedback
- Interdisciplinary Connections: Participants noted the potential for interdisciplinary connections between literary studies and computer science. The similarities in language and structure suggest that insights from one field can inform the other, enriching both artistic and technical practices.
- Educational Implications: Many participants emphasized the importance of integrating poetic techniques into programming curricula. Encouraging programmers to engage with poetic language can enhance creativity and foster innovative problem-solving skills.
4.6. Conclusion
5. Discussion
5.1. Introduction
5.2. Synthesis of Key Findings
5.2.1. Linguistic Parallels
- Syntax and Structure: Both poetry and programming utilize specific syntactical rules that govern the arrangement of words or symbols. In poetry, these rules may manifest as meter, rhyme schemes, or stanzaic forms, while in programming, they appear as syntax rules dictating how commands and statements are constructed.
- Metaphorical Language: The study found that metaphor plays a crucial role in both domains. Poets often use metaphor to evoke imagery and convey complex emotions, whereas programming employs metaphorical constructs (e.g., "nodes," "trees," "branches") to abstractly represent data structures and algorithms. This shared reliance on metaphorical thinking highlights how both forms utilize abstraction to facilitate understanding.
5.2.2. Emotional Resonance
5.2.3. Rhythmic Qualities
5.2.4. Recursive Structures
5.3. Implications for Literary and Computational Fields
5.3.1. Contributions to Literary Studies
5.3.2. Advancements in Computational Linguistics
5.3.3. Educational Practices
5.4. Limitations of the Study
5.4.1. Sample Size and Diversity
5.4.2. Subjectivity in Interpretation
5.4.3. Limitations of NLP Techniques
5.5. Recommendations for Future Research
5.5.1. Expanding the Corpus
5.5.2. Investigating Cross-Disciplinary Collaborations
5.5.3. Exploring Emotional Engagement in Programming
5.6. Conclusion
6. Conclusion and Future Directions
6.1. Summary of Findings
6.1.1. Linguistic and Structural Commonalities
6.1.2. Thematic Exploration
6.1.3. Implications for Educational Practices
6.2. Implications for the Field
6.2.1. Contributions to Digital Humanities
6.2.2. Insights for Computational Creativity
6.2.3. Rethinking Authorship and Creativity
6.3. Future Research Directions
6.3.1. Expanding the Corpus
6.3.2. Advanced NLP Techniques
6.3.3. Interdisciplinary Collaborations
6.3.4. Reader Reception Studies
6.4. Final Thoughts
References
- Rahman, M.H.; Kazi, M.; Hossan, K.M.R.; Hassain, D. (2023). The Poetry of Programming: Utilizing Natural Language Processing for Creative Expression.
- Kesarwani, V. (2018). Automatic Poetry Classification Using Natural Language Processing (Doctoral 4 dissertation, Université d’Ottawa/University of Ottawa).
- Vashist, S. (2024). Mysterious Interrelation: NLP and Literary Imagination. Indian Journal of Artificial Intelligence and Neural Networking (IJAINN) Volume-4 Issue-6.
- Odupitan, M. THE INTERSECTION OF COMPUTATIONAL LINGUISTICS AND CREATIVE WRITING PEDAGOGY.
- Iriogbe, H. NLP AND CROSS-CULTURAL POETIC EXPRESSION: GENERATING MULTILINGUAL AND CULTURALLY AWARE CONTENT.
- Yadav, S. From Pen to Processor: The Intersection of AI and Literary Innovation. Int. J. Engl. Lit. Soc. Sci. 2025, 10, 618079. [Google Scholar] [CrossRef]
- Manurung, H. (2004). An evolutionary algorithm approach to poetry generation.
- Odupitan, M. TRAINING AI TO UNDERSTAND METAPHOR: BRIDGING LINGUISTICS AND CREATIVITY IN NLP.
- Yang, L.; Wang, G.; Wang, H. Reimagining Literary Analysis: Utilizing Artificial Intelligence to Classify Modernist French Poetry. Information 2024, 15, 70. [Google Scholar] [CrossRef]
- Ajayi, I. ALGORITHMIC CREATIVITY: HOW NLP IS RESHAPING THE LITERARY LANDSCAPE.
- Oshiesh, J.A.R. The Poetics of Code: Generative AI and the Redefinition of Literary Creativity. Voice Creat. Res. 2025, 7, 195–212. [Google Scholar] [CrossRef]
- Arcilla Jr, F.E. Poetic devices, thematic significance and social realities in poetry: A critical literature review. Randwick Int. J. Educ. Linguist. Sci. 2024, 5. [Google Scholar] [CrossRef]
- Ajayi, I. DIGITAL POETICS: EXPLORING THE ARTISTIC CAPABILITIES OF TRANSFORMER-BASED NLP MODELS.
- Yazid, R.; Mustofa, M.; Fitriyah, U. (2024). CAN AUTOMATIC POETRY GENERATION INFUSE VALUES? UNVEILING INSIGHTS THROUGH CONTENT ANALYSIS OF GENERATED POETRY. LiNGUA.
- Iriogbe, H. THE FUTURE OF STORYTELLING: INTEGRATING NLP AND CREATIVITY IN INTERACTIVE LITERATURE.
- Pagiaslis, A.P. Where is my Glass Slipper? AI, Poetry and Art. arXiv 2025, arXiv:2503.05781. [Google Scholar]
- Weatherby, S.; Ashbourne, N.; Palmerston, J. Exploring Poetic Creativity in Large Language Models: A Dynamic Multi-Agent Framework for Poem Generation. Authorea Preprints.
- Kouvara, T.; Fotopoulos, V.; Karachristos, C.; Orphanoudakis, T. (2024, May). Expanding the ‘A’in STEAM: Integrating Poetry and AI for Educational Evolution. In 2024 IEEE Global Engineering Education Conference (EDUCON) (pp. 01-07). IEEE.
- Saddhono, K.; Nurpadillah, V.; Indriyo, K. (2024, May). The Algorithmic uses in AI Influenced Creation of Contemporary Rhymes: A Systematic Review. In 2024 4th International Conference on Advance Computing and Innovative Technologies in Engineering (ICACITE) (pp. 1539-1544). IEEE.
- Monin, M.; Lorange, A. A poetics of computation: critical approaches to reading and writing with data. Electron. Vis. Arts Australas. 2017, 2016, 26–33. [Google Scholar]
- Hutson, J.; Schnellmann, A. The poetry of prompts: The collaborative role of generative artificial intelligence in the creation of poetry and the anxiety of machine influence. Glob. J. Comput. Sci. Technol. D 2023, 23. [Google Scholar] [CrossRef]
- Al-Onazi, B.B.; Nashir, W.A.; Al-Shargabi, A.A. (2025). " Diwan": Constructing the Largest Annotated Corpus for Arabic Poetry. IEEE Access.
- BAMMAN, D. (2024). Born Literary Natural Language Processing. Computational Humanities.
- Plate, D.; Hutson, J. (2022). Augmented creativity: Leveraging natural language processing for creative writing. Art and Design Review.
- Elzohbi, M.; Zhao, R. Creative data generation: A review focusing on text and poetry. arXiv 2023, arXiv:2305.08493. [Google Scholar]
- Ajayi, I. FROM SYNTAX TO SONNET: UNDERSTANDING THE LINGUISTIC STRUCTURE BEHIND AI-GENERATED POEMS.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).