Journal of Robotics, Networking and Artificial Life
Vol. 6(1); June (2019), pp. 23–26
DOI: https://doi.org/10.2991/jrnal.k.190531.005; ISSN 2405-9021; eISSN 2352-6386
https://www.atlantis-press.com/journals/jrnal

Research Article

A Framework for Haiku Generation from a Narrative
Takuya Ito, Takashi Ogata*
Faculty of Software and Information Science, Iwate Prefectural University, Sugo 152-52, Takizawa, Iwate, Japan

ARTICLE INFOABSTRACT

Article History

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 intohaiku. The paper shows a basic method of generating haiku from a fragmented narrative by selecting, arranging, and modifying theelements in the narrative. The authors have been developing an Integrated Narrative Generation System (INGS) that automaticallygenerates narratives. The authors aim to introduce the developed haiku-relating mechanism into the INGS in the future.

Received 09 October 2017
Accepted 15 December 2017
Keywords
Artificial intelligencenarrative generation
haiku
haiku-like sentence
haiku generation© 2019 The Authors. Published by Atlantis Press SARL.
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 ascene or feeling using only seventeen morae. The seventeen morae
are composed of three parts with five morae, seven morae, andfive morae.
The primary goal of this study, which is related to the generation ofnarratives 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 froma haiku [3]. By analyzing the relationships between a haiku and theinterpreted sentences of a haiku, these relationships can be used toobtain new interpreted sentences. We approach haiku generationfrom two aspects. One is a quantitative method, and the other is amethod 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) inhaikus [4], a method based on the appearance frequency andco-occurrence of concepts and words in haikus [5], and amethod using deep learning for the transition patterns of words
and characters in haikus [6]. Yoneda et al. [7] proposed a method
using deep learning.

haiku from the structure of a narrative. This method establishes ameta-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 (suchas a haiku collection). To this end, this paper proposes a method togenerate one haiku from the elements of a narrative.

2. A HAIKU GENERATION FRAMEWORKFROM A NARRATIVEIn 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 (wordsdescribing 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 ofelements to be selected and the order of selection (this treats haiku
generation as a kind of narrative discourse [9]).

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 thestructure of a narrative. Nitta [8] proposed a method for generating

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

Corresponding author. Email: t-ogata@iwate-pu.ac.jp

To generate a haiku from a narrative, the authors focus on thefactors of “selection,” “arrangement,” and “modification” of the*

24T. Ito and T. Ogata / Journal of Robotics, Networking and Artificial Life 6(1) 23–26

elements of a narrative. The proposed system consists of threemodules (the system was developed by “Common Lisp”) as follows:•• “Arrangement” module: Constraint-based determination ofword 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 HAIKUFROM A NARRATIVEIn 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.”(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 thepurpose.
(ii)	Extracting one or more sentences in a narrative, which is theinput information in this system, according to the conditionof the selected method. These conditions are shown in theexamples in the next section.
(iii)	Extracting one or more elements from the sentences extractedin (ii) and substituting the extracted elements in the sentence
format selected in (i).
(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 toregulate the sounds of a haiku and especially indicates emotional
emphasis in the psychological aspect of linguistic rhetoric.)

4. GENERATED EXAMPLES

父が家屋で狼に困る．[A father is distressed by a wolf inhis house.]
息子のアランが家屋で父を励ます．
[His son, Alain encourages his father in his house.]
父が「アランが外出する」ことを禁止する．
[The father forbids Alain from going out.]
アランが家屋で泥を洗う．[Alain washes off mud inhis house.]
アランが牧場で衣服を乾かす．[Alain dries clothes in astock farm.]
狼が牧場で羊を襲う．[The wolf attacks sheep in a stock farm.]
アランが狼を待ち構える．[Alain waits for the wolf.]
アランが狼を襲う．[Alain attacks the wolf.]
アランが狼を殴る．[Alain hits the wolf.]
狼が逃げる．[The wolf escapes.]
アランが狼を逃がす．[Alain misses the wolf.]
父がアランを称える．[The father praises Alain.]
Figure 1 | An input narrative.

(event 困る1[distress] (ID 1) (type action)(agent age%父#1[father])(counter-agent age%狼#1[wolf])(location loc%家屋#1[house]))Figure 2 | The case structure in Figure 1.

selects two sentences in the narrative that includes a character as
a designated agent to generate a haiku using the elements in theselected sentences.
(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 toa 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.

4.1. Example of an Input(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.

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 forall the methods. The sentence shown in Figure 1 uses natural language, but in reality, it takes a conceptual structure as the input. Forexample, the first event in Figure 1 has a case structure similar tothat in Figure 2. The system determines the target element according to the case structure.

(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 selectedin (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.

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

(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.

4.2. A Haiku that Summarizesa 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Ōkami ya/Osou Hitsuji ya/Nigeru kana
狼や 襲う羊や 逃げるかな[The Wolf/Attacks Sheep/(Who) Escapes.]T. Ito and T. Ogata / Journal of Robotics, Networking and Artificial Life 6(1) 23–26

25

4.3. Other Patterns of Selecting Element

6. CONCLUSION

In the next method, the authors expect to generate a haiku that
describes an event in a narrative. This method extracts a sentence thathas 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.

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 shownaccording 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.

Ō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 thatshows S1’s action.
More, other pattern enables to generate a haiku that focuses on alocation 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 toa 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 andV2 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 “whatin a narrative must be represented through a haiku?” Through theabove-mentioned concepts, the generated haiku expresses the features of the narrative.
As described in Section 1, one of the macro goals is to design andimplement a mutual transformation mechanism between the narrative and haiku. Figure 3 shows an overview of this process.
Moreover, assuming that a haiku can function as a kind of catchphrase to express the essence and theme of the story, it can bethought of as a kind of discourse technique in narrative generation.
Furthermore, with regard to the advertising generation systems thatthe authors have been developing [10], such a circulative ­mechanism
could contribute to the implementation of a new a­ dvertising method
in which both long narrative explanations and short ­haiku-like­representations can be mutually generated for a brand.

Figure 3 | Overall process of mutual transformation between narrativeand haiku.

CONFLICTS OF INTEREST
There is no conflicts of interest.

REFERENCES[1] T. Ito, T. Ogata, On haiku/narrative generation, Proceedings of
the 56th Special Interest Group on Language Sense Processing
Engineering, Morioka, Japan, 2017, pp. 35–37.
[2] T. Ogata, A computational, cognitive, and narratological approachto narrative generation, in: T. Ogata, T. Akimoto, (Eds.), PostNarratology through Computational and Cognitive Approaches,
IGI Global, PA, USA, 2019, pp. 1–84.
[3] T. Itou, T. Arai, T. Ogata, Narrative generation from the semantic
networks of a haiku, Proceedings of the 31st Annual Conferenceof the Japanese Society for Artificial Intelligence, Nagoya, Japan,
2017, 1D3-OS-29b-1in2.
[4] T. Ito, T. Ogata, Analysis of transition of part of speech in haikus:
toward using in haiku generation, Proceedings of the 34th Annual
Meeting of the Japanese Cognitive Science Society, Kanazawa,
Japan, 2017, pp. 1175–1181.
[5] T. Itou, T. Ogata, Haiku generation using appearance frequency
and co-occurrence of concepts and words, Proceedings of the 11thInternational 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, T. Ogata, Haiku generation using deep learning
based on words and characters, 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, H. Kawamura,
Development of automatic haiku generator using LSTM,
Proceedings of the 32nd Annual Conference of the JapaneseSociety for Artificial Intelligence, Kanazawa, Japan, 2019,
1B2-OS-11b–01.
[8] Y. Nitta, Interpretation and generation of haiku by regular expression, IEICE Tech. Rep. 115 (2015), 31–36.
[9] G. Genette, Discours du récit, Essai de méthode, Figures III,Seuil, Paris, Française, 1972. (Narrative discourse: an essay inmethod (J.E. Lewin, Trans., 1980), Cornell University Press,Ithaca, NY, USA.).
[10] Y. Zhang, J. Ono, T. Ogata, Single event and scenario generation
based on advertising rhetorical techniques using the conceptual
dictionary in narrative generation system, 2012 IEEE FourthInternational Conference on Digital Game and Intelligent Toy
Enhanced Learning, IEEE, Takamatsu, Japan, 2012, pp. 162–164.

T. Ito and T. Ogata / Journal of Robotics, Networking and Artificial Life 6(1) 23–26

26Authors Introduction
Mr. Takuya Ito

Dr. Takashi Ogata
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, andThe Association for Natural Language
Processing.

He received his PhD in the University ofTokyo in 1995. He has industrial experience since 1983 at software development companies. He is Professor of theFaculty 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.