【お知らせ】プログラミング記事の投稿はQiitaに移行しました。

AI で『神曲』の画像生成

Claude でダンテ『神曲』地獄篇の Canto I と II を要約して、Bing Image Creator で画像生成しました。

The narrator lost in a dark forest encountering a leopard, a lion, and a she-wolf
Bing Image Creatorで作成。Powered by DALL-E.

2023 年 5 月 28 日~『神曲』勉強会開催中!

lingua.connpass.com

ダンテ『神曲』シリーズの記事です。

第 1 部
第 2 部

  1. AI で『神曲』の古代ギリシア語訳を分析
  2. AI で『神曲』の画像生成 ← この記事
  3. AI で『神曲』をフレーズ分解
  4. AI で『神曲』ノートン訳を行分割
  5. AI で『神曲』を翻訳して比較

目次

Claude

Claude は要約を得意とするチャット AI です。詳細は以下の記事を参照してください。

出典

Claude には Longfellow による英訳を読み込ませました。

www.gutenberg.org

Canto I

Claude で要約します。

This is a translation of Dante's Divine Comedy Inferno Canto 1. Please summarize it.

Here is a summary of the excerpt from Dante's Inferno Canto 1:

The narrator finds himself lost in a dark forest and encounters a leopard, a lion, and a she-wolf that impede his progress. He then meets the spirit of the Roman poet Virgil, who says he has been sent to guide the narrator on a journey through the afterlife. Virgil explains that the she-wolf represents greed and avarice, and that someday a prophesied hero will come who will defeat the she-wolf. Virgil agrees to guide the narrator through Hell and Purgatory, but says he cannot enter Heaven because he was a pagan. The narrator begs Virgil to lead him on this journey so he can see Hell and Purgatory and hopefully make his way to Heaven. Virgil agrees and they set off together.

DeepL による日本語訳(一部修正)

語り手は暗い森に迷い込み、ヒョウ、ライオン、雌オオカミに出会って行く手を阻まれる。そしてローマの詩人ウェルギリウスの霊に出会う。ウェルギリウスは語り手を死後の世界の旅に導くために遣わされたと言う。ウェルギリウスは、雌狼は貪欲と欲望の象徴であり、いつか雌狼を倒す予言された英雄が現れると説明する。ウェルギリウスは語り手を地獄と煉獄に案内することに同意するが、自分は異教徒なので天国には入れないと言う。語り手はウェルギリウスに、地獄と煉獄を見て、できれば天国に行けるように、この旅に案内してほしいと懇願する。ウェルギリウスは承諾し、二人は一緒に旅に出る。

Bing AI に英語の要約を添えてプロンプトを考えるように指示します。

This is a summary of Dante's Divine Comedy Inferno Canto 1. I would like you to consider image generation prompts based on this.

I'll try to create images based on the summary of Dante's Divine Comedy Inferno Canto 1. Here are the prompts I considered:

  1. The narrator lost in a dark forest encountering a leopard, a lion, and a she-wolf.
  2. The narrator meeting the spirit of the Roman poet Virgil in the dark forest.
  3. Virgil guiding the narrator through Hell and Purgatory.

Please wait a moment while I generate these images.

一度に 3 つのプロンプトでの画像生成が始まりました。生成された画像です。

The narrator lost in a dark forest encountering a leopard, a lion, and a she-wolf

The narrator meeting the spirit of the Roman poet Virgil in the dark forest

Virgil guiding the narrator through Hell and Purgatory

Canto II

Claude で要約します。

This is a translation of Dante's Divine Comedy Inferno Canto 2. Please summarize it.

Here is a summary of Inferno Canto 2 from Dante's Divine Comedy:

The narrator is hesitant about embarking on the journey through the afterlife, feeling unworthy compared to legendary heroes like Aeneas and St. Paul who undertook similar journeys. Virgil assures him that he was sent by Beatrice, a woman the narrator loved in life, who is now in Heaven and wants Virgil to guide him on this journey. Virgil says Beatrice sent him because she is concerned about the narrator being lost and frightened.

Virgil explains that Beatrice spoke to the saint Lucia about helping the narrator, who then told Rachel, and the three of them petitioned God to allow Virgil to come to the narrator's aid. Virgil says he is not afraid to go through Hell because he is a spirit and cannot be harmed by the flames. With this encouragement, the narrator agrees to continue, feeling renewed commitment and courage to undertake the journey through the Inferno with Virgil as his guide.

DeepL による日本語訳(一部修正)

語り手は、同じような旅をしたアエネアスや聖パウロのような伝説上の英雄たちに比べてふさわしくないと感じ、死後の世界の旅に出ることをためらっている。ウェルギリウスは、語り手が生前愛した女性ベアトリーチェの使いであり、彼女は今天国にいて、ウェルギリウスにこの旅を案内してほしいと望んでいるのだと断言する。ウェルギリウスは、語り手が道に迷って怯えているのを心配してベアトリーチェが彼を遣わしたと言う。

ウェルギリウスは、ベアトリーチェが聖女ルチーアに語り手を助けることを話し、ルチーアがラケルに話し、3人で神に願い、ウェルギリウスが語り手を助けに来ることを許可したと説明する。ウェルギリウスは、自分は霊であり、炎に傷つけられることはないから、地獄を通ることは怖くないと言う。この励ましを受け、語り手はウェルギリウスを案内人として地獄の旅を続ける決意と勇気を新たにし、旅を続けることに同意する。

Bing AI に英語の要約を添えてプロンプトを考えるように指示します。

This is a summary of Dante's Divine Comedy Inferno Canto 2. I would like you to consider image generation prompts based on this.

I'll try to create images based on the summary of Dante's Divine Comedy Inferno Canto 2. Here are the prompts I considered:

  1. The narrator feeling unworthy compared to legendary heroes like Aeneas and St. Paul.
  2. Virgil assuring the narrator that he was sent by Beatrice.
  3. Beatrice, Lucia, and Rachel petitioning God to allow Virgil to come to the narrator's aid.
  4. The narrator feeling renewed commitment and courage to undertake the journey through the Inferno with Virgil as his guide.

Please wait a moment while I generate these images.

一度に 4 つのプロンプトでの画像生成が始まりました。生成された画像です。(3 はブロック)

The narrator feeling unworthy compared to legendary heroes like Aeneas and St. Paul

Virgil assuring the narrator that he was sent by Beatrice

Beatrice, Lucia, and Rachel petitioning God to allow Virgil to come to the narrator's aid.

以下のメッセージが出てブロックされました。

「この時点でブロックされる可能性のある単語がいくつかあるようです。安全なコンテンツでも誤って自動的にブロックされることがあります。content policy を確認して、プロンプトを改善する方法を確認してください。」

コンテンツポリシーには明記されていませんが、"God" が宗教関連ということで NG ワードになっていると思われます。

The narrator feeling renewed commitment and courage to undertake the journey through the Inferno with Virgil as his guide

Canto III 以降

以下の記事を参照してください。

感想

Claude で要約して、Bing AI で更に要約してプロンプトを作成しているような流れです。この手法なら誰でも簡単に挿絵が作れそうです。

画像はとても雰囲気が出ています。プロンプトに書いたことがすべて盛り込まれるとは限りませんが、複数枚生成される中から選択すれば良いでしょう。

Bing AI にプロンプトを考えるように依頼しているので、NG ワードも避けるような工夫があると嬉しいです。

関連記事

同様の手法を最初に試みた記事です。