Computational kwaidan: recreating Japanese tales with machine learning

Pat Pataranutaporn
4 min readNov 1, 2016

--

The Witch Takiyashi calling up a monstrous skeleton-spectre to frighten Mitsukuni, by Utagawa Kuniyoshi. Japan, mid-19th century (Modified by Pat)

“The development of full artificial intelligence could spell the end of the human race” — Stephen Hawking

Lafcadio Hearn collected ghost stories, monstrous tales, and exotic observations in his Kwaidan Stories and Studies of Strange Things. His effort in retelling the stories to the global community demonstrates his passion and deep understanding of why “ghostly” is critical for human being as he says : “A man who has no ghostly feeling can not make anything alive, not even a page of history or a page of oratory. To touch men’s souls, you must know all that those souls can be made to feel by words; and to know that, you must yourself have a “ghost” in you that can be touched in the same way”

With the advancement of computer sciences in the field of machine learning and artificial intelligence, I as the author has done a fun experiment with the hope to continue the “ghostly” feeling that Hearn described in his speech by using Markov chain technique to recreate a new Kaidan story based on Hearn’s writings. In the process of resurrecting, I taught the machine learning system with three texts from Hearn’s Kwaidan archive(“A Dead Secret”, “Horai”, “Of a mirror and a ball”). The three stories were analyzed by machine to create a frequency analysis, which supposably capture a glimpse of Hearn writing style. The new three stories below are the result of this generative process (The author didn’t make any change to the text at all).

STORY1 :

I was a Zen temple; and that song is locked away your valuables. If you could not endure it; and the court of the place in riotous living at Mugenyama bell had been suspended into them: “She will not be any magical or mirage, is not been kind is it true that the clay-bell, and then, addressing them which would not melt. Again and she remembered by a slight motion of the inn where the shame; — and winds then bite to the temple was at that the person, imaginatively withstood their wine out.

STORY2 :

There is notions of snow is monstrous on the room upstairs. She had not talk to her belongings. Perhaps in that song is something hair, holding a covered jar. And the people never grow old. A guest of her little straits for want of her mirror had told of the feet of the magical grass is watered that tansu. The largest collection of the mirror it was that was in relation of the lowermost drawer: — nothing! He removed the dead; and told her about the old saying that the secret fault, the sunshine in Horai grow old. And, by reason for such attached together, Kajiwara Kagesue, a warrior of the room. Below they consulted together, and they opened, and broke it, — that she could read therefore, therefore her selfish lives, — in the interblending the drowned herself.

STORY3 :

Of course everybody soon knew what was in it; but it resisted all were membered some happy smiles whiter treasure it; and she much will perhaps suffice to emulate her luck. Among them which would not be any theft; — and the Vision implied, though to build one. The merit of the Dragon-King. Only sky and they used for bell-metal. But that ghost, — thus hoping made about which she is an atmosphere — but no! — I really eat their might and main the midway-blue there hangs a faint, faint vision of her, and those long time ago, in that legend because of her eyes fixed upon the priest describe is another, so as the protests of mimetic magic expressed, by the light of a small lamp which heal all manner of some tree in a temple; but the shame, she saw was in the court of the religious acts of fairy water.

To conclude my blog post, I think this experiment itself demonstrate a Kaidaness relationship between technology and humanity. The penetration of machine into the imaginative world of literatures result in a new genre of computational literature. Who is the author of these frankenstien texts that were generated from the Lafcadio Hearn’s legacy is a very interesting question to explore. As Stephen Hawking speculated that artificial intelligence may spell the end of the human being, I am looking forward to see how the future Kaidan writer include this catastrophic event of human race by technology in thier story :)

--

--