Journal of Robotics, Networking and Artificial Life

Volume 6, Issue 1, June 2019, Pages 23 - 26

A Framework for Haiku Generation from a Narrative

Authors
Takuya Ito, Takashi Ogata*
Faculty of Software and Information Science, Iwate Prefectural University, Sugo 152-52, Takizawa, Iwate, Japan
*Corresponding author. Email: t-ogata@iwate-pu.ac.jp
Corresponding Author
Takashi Ogata
Received 9 October 2017, Accepted 15 December 2017, Available Online 25 June 2019.
DOI
10.2991/jrnal.k.190531.005How to use a DOI?
Keywords
Artificial intelligence; narrative generation; haiku; haiku-like sentence; haiku generation
Abstract

The primary goal of the authors’ research related to the generation of narratives and haikus is to complete a mutual transformation mechanism between a narrative and a haiku. In this work, the authors propose a framework for transforming a narrative into haiku. The paper shows a basic method of generating haiku from a fragmented narrative by selecting, arranging, and modifying the elements in the narrative. The authors have been developing an Integrated Narrative Generation System (INGS) that automatically generates narratives. The authors aim to introduce the developed haiku-relating mechanism into the INGS in the future.

Copyright
© 2019 The Authors. Published by Atlantis Press SARL.
Open Access
This is an open access article distributed under the CC BY-NC 4.0 license (http://creativecommons.org/licenses/by-nc/4.0/).

1. INTRODUCTION

A haiku is the shortest form of poetry in the world and expresses a scene or feeling using only seventeen morae. The seventeen morae are composed of three parts with five morae, seven morae, and five morae.

The primary goal of this study, which is related to the generation of narratives and haikus, is to create a mutual transformation mechanism between a narrative and a haiku [1]. Previously, the authors had developed an Integrated Narrative Generation System (INGS) [2], and the concept of mutual transformation is based on this background. INGS automatically generates narratives. This system produces a cyclical generation of stories or expressions. The authors have previously presented a method for generating a narrative from a haiku [3]. By analyzing the relationships between a haiku and the interpreted sentences of a haiku, these relationships can be used to obtain new interpreted sentences. We approach haiku generation from two aspects. One is a quantitative method, and the other is a method that uses the structure of a narrative.

In previous studies, the authors have presented the following quantitative methods for haiku generation: a method using the transition patterns of word categories (part of speech) in haikus [4], a method based on the appearance frequency and co-occurrence of concepts and words in haikus [5], and a method using deep learning for the transition patterns of words and characters in haikus [6]. Yoneda et al. [7] proposed a method using deep learning.

On the other hand, we not only try to generate haiku with a large amount of data, but also try to generate haiku by manipulating the structure of a narrative. Nitta [8] proposed a method for generating haiku from the structure of a narrative. This method establishes a meta-sentence and core sentences about the narrative.

This study aims not to express the structure of a narrative with only one haiku, but to express the entire story with multiple haiku (such as a haiku collection). To this end, this paper proposes a method to generate one haiku from the elements of a narrative.

2. A HAIKU GENERATION FRAMEWORK FROM A NARRATIVE

In this paper, a sentence composed of three phrases (five morae, seven morae, five morae) is defined as a haiku. Since this definition is a minimum condition, the generated sentence can be expressed as haiku-like sentence. For example, it is possible to generate sentences that are more suitable for haiku by adding kigos (words describing seasons). However, some haikus do not have kigos. Therefore, we define haiku as the number of mora and a haiku-like sentence as a haiku.

Haiku generation using a story generates haiku from the events contained in a story, with the user specifying an arbitrary element. We assume that selecting an element corresponds to selecting a feature of the story. When generating multiple haikus from a story, the way of expressing the story changes depending on the type of elements to be selected and the order of selection (this treats haiku generation as a kind of narrative discourse [9]).

The method proposed here selects four types of elements from the story, including the selected elements, by selecting the type of central element. Then, under certain constraints, the selected elements are rearranged forming a haiku.

To generate a haiku from a narrative, the authors focus on the factors of “selection,” “arrangement,” and “modification” of the elements of a narrative. The proposed system consists of three modules (the system was developed by “Common Lisp”) as follows:

  • “Arrangement” module: Constraint-based determination of word arrangement structure.

  • “Selection” module: Selection of the word to arrange.

  • “Modification” module: Adjustment of mora number by kireji (kireji likes punctuation words.).

3. GENERATION PROCESSES OF A HAIKU FROM A NARRATIVE

In the following algorithm, step (i) corresponds to the “arrangement” of narrative information. Steps (ii) and (iii) correspond to the “selection.” Step (iv) corresponds to “modification.”

  1. (i)

    Selecting a format for a haiku. For generating a haiku according to various methods, the system preliminarily prepares several formats and selects one of the formats that suits the purpose.

  2. (ii)

    Extracting one or more sentences in a narrative, which is the input information in this system, according to the condition of the selected method. These conditions are shown in the examples in the next section.

  3. (iii)

    Extracting one or more elements from the sentences extracted in (ii) and substituting the extracted elements in the sentence format selected in (i).

  4. (iv)

    Adjusting the above information according to the standard haiku form of three parts of five, seven, and five morae. If necessary, the system adds one or more kirejis to the selected elements in the haiku to be generated. (Kireji is a category of words used to regulate the sounds of a haiku and especially indicates emotional emphasis in the psychological aspect of linguistic rhetoric.)

4. GENERATED EXAMPLES

4.1. Example of an Input

The authors present the following three types of methods of haiku generation from a narrative using the above general framework. The story shown in Figure 1 was used as the input narrative for all the methods. The sentence shown in Figure 1 uses natural language, but in reality, it takes a conceptual structure as the input. For example, the first event in Figure 1 has a case structure similar to that in Figure 2. The system determines the target element according to the case structure.

Figure 1

An input narrative.

Figure 2

The case structure in Figure 1.

Next, we show an example of generation with action as selection element.

4.2. A Haiku that Summarizes a Character’s Action

This method is expected to generate a haiku that expresses an overview or summary of a character’s action in the narrative. The system selects two sentences in the narrative that includes a character as a designated agent to generate a haiku using the elements in the selected sentences.

  1. (i)

    Selecting a format of haiku: In this example, the system selects a format, “S V1 + O1 V2.” In this format, S means a designated character (or agent) in the narrative. V1 corresponds to a verb in the selected first sentence and O1 is the object of V1. V2 corresponds to a verb in the second sentence that was selected.

  2. (ii)

    Extracting some sentences: For example, according to a character, “wolf,” “The wolf attacks sheep in a stock farm.” and “The wolf escapes.” are extracted.

  3. (iii)

    Extracting some elements: A character or agent “the wolf,” which is included in the sentences selected in (ii), is substituted with S in the format selected in (i). Then, a verb, “attacks,” which was extracted from the first sentence selected in (ii), is substituted with V1. Furthermore, “sheep” is substituted with O1 and “escapes” is substituted with V2. At last, “狼 (the wolf), 襲う (attacks), 羊を (sheep), 逃げる (escapes)” are acquired.

  4. (iv)

    Adjusting morae number: For “狼 (Ōkami)” that has four morae, a mora kireji, “や (ya),” is added. Similarly, “襲う羊 (Osou hitsuji)” that has six morae is extended with a mora kireji, “や (ya).” Further, as “逃げる (Nigeru)” has three morae, two morae kireji, “かな (kana),” is added. Finally, the following haiku is created.

Ōkami ya/Osou Hitsuji ya/Nigeru kana

狼や 襲う羊や 逃げるかな

[The Wolf/Attacks Sheep/(Who) Escapes.]

4.3. Other Patterns of Selecting Element

In the next method, the authors expect to generate a haiku that describes an event in a narrative. This method extracts a sentence that has the character in agent case. Further, it selects the sentence before or after and generates a haiku using the elements of the selected sentences. For example, system generates the following haiku.

Ōkami ya/Alain Naguru ya/Nigeru kana

狼や アラン殴るや 逃げるかな

[The Wolf/(Who is) Hit by Alain/Escapes.]

In the above example, the system selects a format, “S1 S2 + V1 V2.” S1 is a designated character (or agent) in the narrative. S2 is a character who appears in a sentence before or after the sentence containing S1, and V1 is a verb showing the action of S2. V2 is a verb that shows S1’s action.

More, other pattern enables to generate a haiku that focuses on a location in a narrative.

Chichi Komaru/Alain Arau ya/Kaoku kana

父困る アラン洗うや 家屋かな

[A Father is Embarrassed/Alain Washes/at His House.]

The system selects a format, “S1 + V1 S2 + V2 L.” S1 corresponds to a character (or agent) in the first sentence selected and V1 is a verb that shows S1’s action. S2 is a character in the second sentence and V2 is a verb that shows the action by S2. L is a word representing a location or place.

5. FUTURE WORKS

Our short-term plan is to evaluate the generated haiku or the processes according to specific goals. These goals are related to “what in a narrative must be represented through a haiku?” Through the above-mentioned concepts, the generated haiku expresses the features of the narrative.

As described in Section 1, one of the macro goals is to design and implement a mutual transformation mechanism between the narrative and haiku. Figure 3 shows an overview of this process.

Figure 3

Overall process of mutual transformation between narrative and haiku.

Moreover, assuming that a haiku can function as a kind of catch phrase to express the essence and theme of the story, it can be thought of as a kind of discourse technique in narrative generation.

Furthermore, with regard to the advertising generation systems that the authors have been developing [10], such a circulative mechanism could contribute to the implementation of a new advertising method in which both long narrative explanations and short haiku-like representations can be mutually generated for a brand.

6. CONCLUSION

The authors presented a framework to generate a haiku in which one or more designated elements are extracted from a narrative used as the input and these elements are arranged and modified according to the haiku form. Three types of methods were shown according to the framework in this paper. Future work will include various topics, including evaluating the generated haiku, completing the development of a mutual transformation mechanism between narrative and haiku, and applying the results to various applications such as advertising narrative generation.

CONFLICTS OF INTEREST

There is no conflicts of interest.

Authors Introduction

Mr. Takuya Ito

He is currently pursuing his Bachelor from Faculty of Software and Information Science of Iwate Prefectural University. He is interested in narrative generation, haiku and folktale. He is a member of The Japan Society for Artificial Intelligence, Japan Cognitive Science Society, and The Association for Natural Language Processing.

Dr. Takashi Ogata

He received his PhD in the University of Tokyo in 1995. He has industrial experience since 1983 at software development companies. He is Professor of the Faculty of Software and Information Science at Iwate Prefectural University since 2005.

His major research interests include artificial intelligence, cognitive science, natural language processing, narratology and literary theories, an interdisciplinary approach to the development of narrative generation systems based on AI and narratology, and the application to narrative creation and business.

REFERENCES

[1]T Ito and T Ogata, On haiku/narrative generation, in Proceedings of the 56th Special Interest Group on Language Sense Processing Engineering (Morioka, Japan, 2017), pp. 35-37.
[3]T Itou, T Arai, and T Ogata, Narrative generation from the semantic networks of a haiku, in Proceedings of the 31st Annual Conference of the Japanese Society for Artificial Intelligence (Nagoya, Japan, 2017). 1D3-OS-29b-1in2.
[4]T Ito and T Ogata, Analysis of transition of part of speech in haikus: toward using in haiku generation, in Proceedings of the 34th Annual Meeting of the Japanese Cognitive Science Society (Kanazawa, Japan, 2017), pp. 1175-1181.
[5]T Itou and T Ogata, Haiku generation using appearance frequency and co-occurrence of concepts and words, in Proceedings of the 11th International Conference on Cognitive Science (Taipei, Taiwan, 2017). Presentation Number: 121.03. Abstract Number: 0066, http://iccs2017.conf.tw/site/order/1121/SessionDetail.aspx?snid=831&sid=1121&lang=en&keywords=0066
[6]K Igarashi, T Ito, and T Ogata, Haiku generation using deep learning based on words and characters, in Proceedings of the 56th Special Interest Group on Language Sense Processing Engineering (Morioka, Japan, 2017), pp. 33-34.
[7]K Yoneda, S Yokoyama, M Yamashita, and H Kawamura, Development of automatic haiku generator using LSTM, in Proceedings of the 32nd Annual Conference of the Japanese Society for Artificial Intelligence (Kanazawa, Japan, 2019). 1B2-OS-11b–01.
[8]Y Nitta, Interpretation and generation of haiku by regular expression, IEICE Tech. Rep., Vol. 115, 2015, pp. 31-36.
[9]G Genette, Discours du récit, Essai de méthode, Figures III, Seuil, Paris, Française, 1972, Narrative discourse: an essay in method, Cornell University Press, Ithaca, NY, USA, 1980.
Journal
Journal of Robotics, Networking and Artificial Life
Volume-Issue
6 - 1
Pages
23 - 26
Publication Date
2019/06/25
ISSN (Online)
2352-6386
ISSN (Print)
2405-9021
DOI
10.2991/jrnal.k.190531.005How to use a DOI?
Copyright
© 2019 The Authors. Published by Atlantis Press SARL.
Open Access
This is an open access article distributed under the CC BY-NC 4.0 license (http://creativecommons.org/licenses/by-nc/4.0/).

Cite this article

TY  - JOUR
AU  - Takuya Ito
AU  - Takashi Ogata
PY  - 2019
DA  - 2019/06/25
TI  - A Framework for Haiku Generation from a Narrative
JO  - Journal of Robotics, Networking and Artificial Life
SP  - 23
EP  - 26
VL  - 6
IS  - 1
SN  - 2352-6386
UR  - https://doi.org/10.2991/jrnal.k.190531.005
DO  - 10.2991/jrnal.k.190531.005
ID  - Ito2019
ER  -