Computational Creativity for Automatic Poetry Generation in Bengali
Total Page:16
File Type:pdf, Size:1020Kb
Poetic Machine: Computational Creativity for Automatic Poetry Generation in Bengali Amitava Das Björn Gambäck Department of Computer Science and Engineering Department of Computer and Information Science University of North Texas Norwegian University of Science and Technology Denton, Texas, USA Trondheim, Norway [email protected] [email protected] Abstract efforts until now have concentrated on the understand- ing of natural phenomena. During the latest two The paper reports an initial study on computa- decades, we have witnessed a huge rise of research at- tional poetry generation for Bengali. Bengali is a morpho-syntactically rich language and partially tention towards affect understanding, that is, the sec- phonemic. The poetry generation task has been ond level of cognition. However, there have so far defined as a follow-up rhythmic sequence gener- been pretty few attempts towards making machines ation based on user input. The design process truly creative. The paradigm of computational cre- involves rhythm understanding from the given in- ativity is actually still in infancy, and most of those put and follow-up rhyme generation by leveraging efforts that have been carried out have concentrated syllable/phonetic mapping and natural language on music or art. Still, computer systems have al- generation techniques. ready made some novel and creative contributions in A syllabification engine based on grapheme-to- the fields of mathematical number theory (Colton 2005; phoneme mapping has been developed in order Colton, Bundy, and Walsh 2000) and in chess opening to understand the given input rhyme. A Support theory (Kaufman 2012). Vector Machine-based classifier then predicts the follow-up syllable/phonetic pattern for the gener- In this paper, in contrast, we look at computational ation and candidate words are chosen automat- linguistic creativity, and in particular poetry genera- ically, based on the syllable pattern. The final tion. Computational linguistic creativity has only in rhythmic poetical follow-up sentence is generated the last few years received more wide-spread interest through n-gram matching with weight-based ag- by language technology researchers. A book on linguis- gregation. The quality of the automatically gener- tics creativity was recently written by Veale (2012), and ated rhymes has been evaluated according to three in particular the research group at Helsinki University criteria: poeticness, grammaticality, and mean- is very active in this domain (Toivanen et al. 2012; ingfulness. Gross et al. 2012; Toivanen, Toivonen, and Valitutti 2013; Toivanen, Järvisalo, and Toivonen 2013). Some Introduction other interesting research attempts have also been made Cognitive abilities can be divided into three broad cate- (Levy 2001; Colton, Goodwin, and Veale 2012, e.g.,), gories: intelligence, aesthetics, and creativity. Suppose but the approaches still vary widely. someone has read a sonnet by Shakespeare and is asked The field of automatic poetry generation was pio- the following questions: neered by Bailey (1974), although Funkhouser (2009) quotes work going back to the 1950s. These systems • Do you understand the meaning of this sonnet? were written by actual poets who were keen to explore If the reader says yes, s/he has used her/his intel- the potential of using computers in writing poetry and ligence together with knowledge of the English lan- were not fully autonomous. Thereafter, Gervás and his guage and world knowledge to understand it. colleagues were the first to discuss sophisticated ap- • Do you like this sonnet? proaches to automatic poetry generation (Gervás 2000; Whatever is answer, the reader is using a subjective 2001a; 2001b; 2002a; 2002b; Díaz-Agudo, Gervás, and model of liking — and this is what is called aesthetic González-Calero 2002; Gervás et al. 2007). Gervás’ appreciation or sentiment. work established the possibility of automatic poetry generation and has in the last decade been followed by • Can you add two more lines to this sonnet? a moderate number of attempts at linguistics creativity So the reader has to write some poetry — and has to and in particular at automatic poetry generation. use her/his creative ability to do it. The system developed by Manurung (2004) uses a Artificial Intelligence is a now six-to-seven decades grammar-driven formulation to generate metrically con- matured research field. The majority of the research strained poetry out of a given topic. In addition to the scientific novelty, the work defined the funda- Rabindranath Tagore (1861–1941) was the pioneer who mental evaluation criteria of automatic poetry gen- founded the firm basis of modern Bengali poetry. eration: meaningfulness, grammaticality, and poet- icness. A complete poetry generation system must Bengali Orthography and Syllable Patterns generate texts that adhere to all these three prop- Bengali, just as all Modern Indo-Aryan languages be- erties. An alternative approach to evaluation would ing derived from Sanskrit, is partially phonemic. That be to adopt the criteria specified by Ritchie (2007; is, its pronunciation style depends not only on ortho- 2001) for assessing the novelty and quality of creative graphic information, but also on Part-of-Speech (POS) systems in general based on their output. information and semantics. Partially phonemic lan- All these previous efforts were inspiration points for guages use writing systems that are in between strictly the present work, but as we are unable to conclude what phonemic and non-phonemic. Bengali — and many method performs best, we decided to propose a new ar- other modern Indo-Aryan languages — still uses San- chitecture by following the rules and practices of Ben- skrit orthography, although the sounds and the pronun- gali poems and writings. There is no previous similar ciation rules have changed to varying degrees. work in Bengali, nor on other Indian languages, except The modern Bengali script contains the characters attempts at automatic analysis and generation of San- (known as akṣara) for seven vowels (/i/ /u/, /e/, /o/, skrit Vedas (Mishra 2010) and at automatic Tamil lyric /æ/, /O/, /a/), four semi-vowels, (/j/, /w/, /e̯/, /o̯/), generation (Ramakrishnan A, Kuppan, and Devi 2009; and thirty consonants. Many diphthongs are possible, Ramakrishnan A and Devi 2010). although they must always contain one semi-vowel, but The basic strategy adopted here is not to try to make only two of the diphthongs are represented directly in the system create poetry on its own, but rather in col- the script (i.e., have their own akṣara: /oi/and /ou/). laboration with the user. And not a complete poem, but All vowels can be nasalized (written as /ā/, etc.) and rather one poetry line at a time. The user enters a line vowel deletion (e.g., schwa deletion) is common, partic- of poetry and the system generates a matching, rhyming ularly in word medial and final positions. line. This task then in turn involves two subtasks: A phonetic group of Bengali consonants is called a rhyme understanding and rhyme generation. Rhyme borgo (বগ). As we shall see below, these groups are understanding entails parsing the input line to under- particularly important in poetic rhymes. There are stand its poetic structure. Rhyme generation is based five basic borgos in Bengali and four separate pronun- on the usage of a Bengali syllabification engine and a ciation groups, as shown in Table 1, where each con- Support Vector Machine (SVM) based classifier for pre- sonant is displayed together with its pronunciation in dicting the structure of the output sentence and candi- the International Phonetic Alphabet (IPA). Many con- date word generation, combined with bigram pruning sonant sounds can be either unaspirated or aspirated and weighted aggregation for the selection of the actual (e.g., /ú/vs /úh/). The first five borgos are named ac- words to be used in the generated rhyming line. cording to their first character. In each borgo, the first The rest of the paper is laid out as follows: To give consonant takes the least stress when pronounced and an understanding of the background, we first discuss the last takes the highest stress. The first member is the Bengali language as such and the different rhythms thus called less-stressed (alpo-prāṇ: অ াণ), the second and metres that are used in Bengali poems. Thereafter to forth members are called high-stressed (mahā-prāṇ: the discussion turns to the chosen methods for poetry মহাাণ), and the fifth and last is a nasal (nāsik: নািসক). line understanding and generation, starting by giving Following the classification of Sarkar (1986), Bengali details of a corpus of poems collected for rhyme under- has 16 canonical syllable patterns, but CV (consonant- standing, and then in turn describing the rhyme un- vowel) syllables constitute 54% of the whole language derstanding and the rhyme generation tasks, and their (Dan 1992). Patterns such as CVC, V, VC, VV, CVV, respective subparts. Finally, an evaluation of the po- CCV, and CCVC are also reasonably frequent. For etry generation model is given, in terms of the three more detailed recent overviews of Bengali phonetics, we dimensions poeticness, grammaticality, and meaning- refer the reader to, for example, Sircar and Nag (2014), fulness. Barman (2011) or Kar (2009), and just take the exam- ples below of Bengali orthography — originally devised Bengali and Bengali Poetry by Chatterji (1926) — to illustrate how it has deviated Bengali (ethnonym: Bangla) is the seventh largest (in from the strictly phonemic orthography of Sanskrit. terms of speakers) language worldwide. It originates • Consonant clusters are often pronounced as gem- from Sanskrit and belongs to the modern Indo-Aryan inates irrespective of the second consonant. Thus: language family. Bengali is the second largest language bAkya /bakko/, bakSha /bO/kkho, bismaYa /biSSOê/. in India and the national language of Bangladesh. Ben- gali poetry has a vibrant history since the 10th cen- • Single grapheme for multiple phonemes: The tury and the modern Bengali poetry inherited its basic vowel [e] is pronounced as either /e/or /æ/.