Automatic Poetry Generation Using CHR Masters (original) (raw)
Abstract
Poetry is one of the most interesting and complex natural language generation (NLG) systems, because a text needs to simultaneously satisfy three properties, to be considered a poem; namely poeticness (poetic structure), grammaticality (grammatical structure and syntax) and meaningfulness (semantic content). In this thesis, we discuss the development and implementation of an autonomous system, capable of generating unique yet meaningful poetry, that harnesses the advantages of Constraint Handling Rules (CHR). This is realized through the implementation of a reasoner, which generates poems, that satisfy poeticness, grammaticality and meaningfulness, based on a customized lexicon. In the proposed system, a poem is generated by incrementally selecting its words, through a step-wise pruning of the lexicon by the reasoner. This is done based on the constraints, that represent poeticness, grammaticality and meaningfulness. The developed approach proves, that CHR can be used to develop a h...
Figures (10)
Figure 2.1: The phoneme set used by the CMU Dictionary
‘igure 4.1: The pruning steps of the selection process of each word in the poem An overview of the whole system architecture will be given, before going into t etry generation components in more detail. In the introduced approach, the whc em is regarded as an empty grid, where the reasoner replaces each grid element with ord. A poem is generated by filling the grid, one element at a time. Each final word lected from its set of candidate words, which is initially the whole lexicon. The selecti ocess of each word can be regarded as a step-wise pruning of the whole lexicon by t asoner, based on various constraints, as shown in Figure 4.1. The first constraint » taken into consideration is the word type, where the POS-tag pruner selects only t ords matching the current required word type, from the lexicon. The required wo pes are all stored in a grammar pattern list, that contains the POS-tag of all the wor at should appear in the poem, in the correct order. All the important informatic ntained in the grammar list, is extracted from the lexicon, as it is explicitly designed ovide all the necessary grammatical details. The generation of the lexicon and gramm t will be discussed in more detail, later. After achieving a list of all the words, th
Key takeaways
AI
- The system utilizes Constraint Handling Rules (CHR) for autonomous poetry generation satisfying poeticness, grammaticality, and meaningfulness.
- Unique lexicon design enables diverse semantic and syntactic structures without reliance on existing corpora.
- The proposed approach generates poems incrementally, improving coherence and structural integrity during word selection.
- Evaluation metrics show generated poetry is comparable to human-written works, with 60% of readers preferring it over famous poets' poems.
- Future work includes enhancing semantic networks and automation of lexicon generation for improved poetic quality.
Loading Preview
Sorry, preview is currently unavailable. You can download the paper by clicking the button above.
References (38)
- Alan Beale. Unofficial alternate 12dicts package (alt12dicts). 2014. URL http://aspell. sourceforge.net/wl/.
- Georg Boenn, Martin Brain, Marina De Vos, and John Fitch. Automatic music compo- sition using answer set programming. CoRR, 2010.
- Donna M. Campbell. Poetry terms: Brief definitions. 2014. URL http://public.wsu. edu/~campbelld/amlit/poeterms.htm.
- Henning Christiansen. CHR grammars. CoRR, cs.CL/0408027, 2004. URL http:// arxiv.org/abs/cs.CL/0408027.
- Simon Colton, Jacob Goodwin, and Tony Veale. Full face poetry generation. In Proceed- ings of the Third International Conference on Computational Creativity, pages 95-102, 2012.
- Belén Díaz-Agudo, Pablo Gervás, Pedro Antonio González-Calero, S Craw, and A Preece. Poetry generation in colibri. In Proceedings of the 6th European Conference on Case Based Reasoning, Aberdeen, Scotland, 2002. URL http://nil.fdi.ucm.es/sites/ default/files/DiazetalECCBR2002.pdf. Agirrezabal et al. Pos-tag based poetry generation with wordnet. 2013. Poetry Foundation. Learning lab. 2014. URL http://www.poetryfoundation.org/ learning/.
- Thom Frühwirth. Theory and practice of constraint handling rules. The Journal of Logic Programming, 37(1-3):95-138, 1998.
- Michael Gelfond and Vladimir Lifschitz. The stable model semantics for logic program- ming. In ICLP/SLP, volume 88, pages 1070-1080, 1988.
- Pablo Gervás. Wasp: Evaluation of different strategies for the automatic generation of spanish verse. In Symposium on Creative & Cultural Aspects and Applications of AI & Cognitive Science, University of Birmingham, England, 2000 2000a. URL http: //nil.fdi.ucm.es/sites/default/files/GervasAISB2000.pdf.
- Pablo Gervás. An expert system for the composition of formal spanish poetry. JOURNAL OF KNOWLEDGE-BASED SYSTEMS, 14:200-1, 2000b.
- Pablo Gervás. Exploring quantitative evaluations of the creativity of automatic poets. In Proc. of the 2nd Workshop on Creative Systems, Approaches to Creativity in Artificial Intelligence and Cognitive Science, the 15th European Conf. on Artificial Intelligence (ECAI 2002), 2002.
- Pablo Gervás. Computational modelling of poetry generation. In Artificial Intelligence and Poetry Symposium, AISB Convention 2013, University of Exeter, United Kingdom, 2013.
- Pablo Gervás, Dep Sistemas, and Informaticos Programacion. Automatic generation of poetry using a cbr approach. In In CAEPIA -TTIA 01 Actas Volumen I. CAEPIA, 2001.
- Jerry R. Hobbs. Metaphor, metaphor schemata, and selective inferencing. Technical Report 204, AI Center, SRI International, 333 Ravenswood Ave., Menlo Park, CA 94025, Dec 1979.
- Ray Kurzweil. Ray kurzweil's cybernetic poet. 2001. URL http://www. kurzweilcyberart.com/poetry.
- S.R. LEVIN. Linguistic Structures in Poetry. 1962. URL http://books.google.com. eg/books?id=3ddAb1_x6aoC.
- Robert P Levy. A computational model of poetic creativity with neural network as measure of adaptive fitness. In Proceedings of the ICCBR-01 Workshop on Creative Systems. Citeseer, 2001.
- Bonacia Ltd. Young writers. 2014. URL https://www.youngwriters.co.uk/index.
- Hisar Manurung. An evolutionary algorithm approach to poetry generation. 2004.
- Hisar Manurung, Graeme Ritchie, and Henry Thompson. A flexible integrated archi- tecture for generating poetic texts. Technical report, The University of Edinburgh, 2000a.
- Hisar Maruli Manurung. Chart generation of rhythmpatterned text. In Proc. of the First International Workshop on Literature in Cognition and Computers, 1999.
- Hisar Maruli Manurung, Graeme Ritchie, and Henry Thompson. Towards a computa- tional model of poetry generation. In In Proceedings of AISB Symposium on Creative and Cultural Aspects and Applications of AI and Cognitive Science, pages 79-86, 2000b.
- Ruli Manurung, Graeme Ritchie, and Henry Thompson. Using genetic algorithms to create meaningful poetic text. J. Exp. Theor. Artif. Intell., 24(1):43-64, 2012.
- Zbigniew Michalewicz. Genetic Algorithms + Data Structures = Evolution Programs (2Nd, Extended Ed.). Springer-Verlag New York, Inc., New York, NY, USA, 1994.
- Ilkka Niemelä. Logic programs with stable model semantics as a constraint programming paradigm. Annals of Mathematics and Artificial Intelligence, 25(3-4):241-273, 1999.
- H Oliveira. Automatic generation of poetry: an overview. Universidade de Coimbra, 2009.
- Hugo Gonçalo Oliveira, F Amilcar Cardoso, and Francisco C Pereira. Exploring different strategies for the automatic generation of song lyrics with tra-la-lyrics. In Proceedings of 13th Portuguese Conference on Artificial Intelligence, EPIA, pages 57-68, 2007a.
- Hugo Gonçalo Oliveira, F Amılcar Cardoso, and Francisco Câmara Pereira. Tra-la-lyrics: An approach to generate text based on rhythm. In Proceedings of 4th International Joint Workshop on Computational Creativity, pages 47-55, 2007b.
- Thomson Reuters. Open callais. 2014. URL http://www.opencalais.com/.
- Lussonnal P Rubaud J and Braffort P. Alamo: Atelier de littérature assisté par la math- ématique et les ordinateurs. 2000. URL http://indy.culture.fr/alamo/rialt/ pagaccalam.html.
- Patrik Simons, Ilkka Niemelä, and Timo Soininen. Extending and implementing the stable model semantics. Artificial Intelligence, 138(1):181-234, 2002.
- Jon Sneyers and Danny De Schreye. Apopcaleaps: Automatic music generation with chrism. In 11th International Society for Music Information Retrieval Conference (IS- MIR 2010), Utrecht, The Netherlands (August 2010) Submitted, 2010.
- Jukka M Toivanen, Matti Järvisalo, and Hannu Toivonen. Harnessing constraint program- ming for poetry composition. In Proceedings of the Fourth International Conference on Computational Creativity, page 160, 2013.
- Jukka Toivanen et al. Corpus-based generation of content and form in poetry. In Pro- ceedings of the Third International Conference on Computational Creativity, 2012.
- Carnegie Mellon University. The cmu pronouncing dictionary. 2014. URL http://www. speech.cs.cmu.edu/cgi-bin/cmudict.
- Princeton University. About wordnet. 2010. URL http://wordnet.princeton.edu.
- Sarah Witzig. Accessing wordnet from prolog. Artificial Intelligence Center, The Univer- sity of Georgia, 2003. URL http://www.ai.uga.edu.
- M Tsan Wong and A Hon Wai Chun. Automatic haiku generation using vsm. In Proceed- ing of 7th WSEAS International Conference on Applied Computer & Applied Compu- tational Science. World Scientific and Engineering Academy and Society, 2008.