第5話 GPT-2が芭蕉の俳句を理解できるかやってみた

GPT-2が日本固有の文化である俳句をどう解釈するか、試しにやってみた。

例題に使ったのは芭蕉の句『古池や蛙飛び込む水の音』。

キーワードは英語訳の『The ancient pond. A frog leaps in. The sound of the water.』

生成された文章は以下の通り

『The ancient pond. A frog leaps in. The sound of the water.


"Oh, I'm sorry," said the frog. "I'm afraid there's no escape."


Then he turned and swam away.


"A frog!" I said, surprised.


"Oh, yes, he's an old one," said the Frog.


"How old?" I cried.


"About a hundred years."


I was silent. I was ashamed. I was afraid. I was afraid of the frog.


I don't believe that any frog knows that he's an old frog. I don't believe that any frog can say what he feels. I don't believe that any frog can say what he thinks or feels. I don't believe that any frog can tell that he's an old frog or any frog』

googleで翻訳した日本語訳

『古代の池。 カエルが飛び込む。水の音。


「ああ、ごめんなさい」とカエルは言った。 「逃げ場がないのではないか」


それから彼は振り向いて泳いだ。


"カエル!" 驚いたと言った。


「ああ、そうだ、彼は年寄りだ」とカエルは言った。


"何歳?" 私は泣いた。


「約百年。」


私は黙っていました。 私は恥じていました。 私は恐れていました。 カエルが怖かった。


私はカエルが彼が古いカエルであることを知っているとは思わない。 どんなカエルも彼が感じることを言うことができるとは思いません。 どんなカエルも彼が考えていることや感じていることを言うことができるとは思いません。 カエルが古いカエルやカエルだとわかるとは思わない』


やっぱりと言うか、外国製の人工知能には日本のわび、さびの文化は難解らしい。

芭蕉の他の句『静けさや岩にしみ入る蝉の声』もやってみた

キーワード『What stillness! The voices of the cicadas penetrate the rocks.』

生成された文章

『What stillness! The voices of the cicadas penetrate the rocks. The wind rises and the cold grows colder. The sound of water falls, and then the silence. The wind rises again, and this time the cold continues. "You're still." I say to her, "Are you sure?" She is quiet. "I thought maybe you were sleeping." She doesn't answer me. I go down to the cave, and in a single moment, everything is still. "You must be cold." The voice is quiet. "You can move now." I say. "That's right. We are going to leave. Let's go." And then we are gone.


I go to the next cave. In it, a beautiful woman named Elsie lives with the other Cucullaea, or "Cucullaeans." The woman wears a dress that hangs down to her knees, and she always carries a bag on her back, full of seeds and other things. The Cucullaea live』

googleの翻訳による日本語訳

『なんと静けさ! セミの声が岩を貫通します。 風が強くなり、寒さがさらに寒くなります。 水の音が落ち、それから沈黙。 風が再び上がり、今度は寒さが続きます。 "君はまだ。" 私は彼女に「本当によろしいですか」と言います。 彼女は静かです。 「たぶんあなたは寝ていると思った。」 彼女は私に答えない。 私は洞窟に行き、一瞬ですべてはまだです。 「あなたは寒くなければなりません。」 声は静かです。 「今すぐ移動できます。」 私は言う。 「そうです。私たちは去ります。行きましょう。」 そして、私たちはいなくなりました。


次の洞窟に行きます。 その中で、エルシーという名前の美しい女性が他のククルレア、または「ククルレア人」と一緒に住んでいます。 女性は膝に垂れ下がったドレスを着ており、種子やその他のものでいっぱいのバッグを背中に常に持っています。 ククレアライブ』


芭蕉の句で有名な『秋深し 隣は何を する人ぞ』も試してみた

キーワードは『Deep autumn; My neighbor, How does he live?』

生成された文章は以下の通り

『Deep autumn; My neighbor, How does he live? How is he dressed, in the morning, in the evening?—


But in this case, we could use the adjective 'almond-y' to describe the colors of the leaves and flowers.


And for those who prefer their metaphors to be concrete, there is the word 'orange'.


(You can even see my little orange trees on the way home from school.)


Now, of course there are many more possible combinations. For example, one could think of 'green' instead of 'almond', and 'white' instead of 'orange'… but we won't go there.


This is because the word 'orange' is too simple. It can't really encompass the wide range of colors that are available in nature.


So in order to avoid confusion, it is good practice to be explicit when you're talking about the range of colors that you like.


This can be done by writing』


googleの翻訳による日本語訳

『深い秋; 私の隣人、彼はどのように生きていますか? 彼は朝、夕方、どのように服を着ていますか?—


しかし、この場合、形容詞「アーモンド-y」を使用して、葉と花の色を記述することができます。


そして、彼らの比phorが具体的であることを好む人々のために、「オレンジ」という言葉があります。


(学校から帰る途中で私の小さなオレンジの木を見ることができます。)


現在、もちろんより多くの可能な組み合わせがあります。 たとえば、「アーモンド」の代わりに「緑」、「オレンジ」の代わりに「白」を考えることができますが、私たちはそこに行きません。


これは、「オレンジ」という言葉が単純すぎるためです。 自然界で利用できる幅広い色を実際に網羅することはできません。


そのため、混乱を避けるために、好きな色の範囲について話すときは明確にすることをお勧めします。


これは、次のように書くことで実行できます』


芭蕉の句は人工知能には難解すぎたようだ。

最近では俳句を書く人工知能プログラムは出来ているが俳句を理解する人工知能の実現はまだ当分先のようだ。

  • Twitterで共有
  • Facebookで共有
  • はてなブックマークでブックマーク

作者を応援しよう!

ハートをクリックで、簡単に応援の気持ちを伝えられます。(ログインが必要です)

応援したユーザー

応援すると応援コメントも書けます

新規登録で充実の読書を

マイページ
読書の状況から作品を自動で分類して簡単に管理できる
小説の未読話数がひと目でわかり前回の続きから読める
フォローしたユーザーの活動を追える
通知
小説の更新や作者の新作の情報を受け取れる
閲覧履歴
以前読んだ小説が一覧で見つけやすい
新規ユーザー登録無料

アカウントをお持ちの方はログイン

カクヨムで可能な読書体験をくわしく知る