第2話 GPT-2に「吾輩は猫である。名前はまだ無い。」の続きを書かせる

夏目漱石の名作「吾輩は猫である」の続きをGTP-2に書かせるとどうなるのか試しにやってみた。

GPT-2は日本語にはまだ対応していないとのことだがまずは日本語でやってみる事にする

GTP-2に『吾輩は猫である。名前はまだ無い。』のキーワードで生成させた文章は以下の通り。


『ただ同人足が続けている。


人が、人のそれに持っていた。


人では、何を誘惑ず毎日も言った。



人がはらった。


人では、何を誘惑ず毎日も言った。


人がにしてもいるので、その話をつけていたのである。


もして、幸せの話を見た者としてもらう。』


まったく意味不明だ。日本語ではなくて英語で試してみた。

『I am a cat. As yet I have no name.』をキーワードに生成させるとかなり上手な文章だ

『I am the first and only cat to have ever been allowed to be in a zoo. That was in 1960, and we've been here since. When we arrived, we were given the choice of being housed with lions, leopards or jaguars. When the leopards came, the zoo kept us in cages with them, and I loved that. We'd go to the leopard cage to watch them, then go back to the lions to watch the leopards. After a while, the zoo director told me I could get in with the jaguars.


That's when I had my first cat, but it was already too late. There were other cats. Some were quite tame. I spent years with the leopards. Then, one day, a』

googleで日本語に翻訳

『私は、動物園にいることが許された最初で唯一の猫です。 それは1960年で、それ以来私たちはここにいます。 到着すると、ライオン、ヒョウ、またはジャガーを飼うという選択肢が与えられました。 ヒョウが来たとき、動物園は私たちを一緒にケージに入れてくれました。私はそれが大好きでした。 ヒョウのケージに行ってそれらを観察し、ライオンに戻ってヒョウを観察します。 しばらくして、動物園のディレクターは私にジャガーと仲良くできると言った。


私が最初の猫を飼ったのはその時ですが、もう手遅れでした。 他の猫がいました。 いくつかはかなり飼いならされました。 私は何年もヒョウと過ごしました。 その後、ある日、』

他にも同じキーワードを使って生成してみた。

確かに毎回生成される文章は違う。

『I am a man. I am a dog. I am a person. And all things are possible, according to the power of the spirit, which moves all things, even the smallest. It can be known by those who have the Spirit, because it is the Spirit who makes it all possible, and it is in the Spirit that He can make all things possible. The Spirit is the gift of God, and the gifts of the Spirit are wisdom and understanding and counsel and understanding. They are the children of the Spirit, and of His children. The Spirit guides the whole body. There is nothing the Spirit cannot do. There is nothing in the world that the Spirit cannot perform. All things are possible to him who has the Spirit. The Spirit gives life to the flesh. When the Spirit is present』

『私は男です。 私は犬です。 私は人です。 そして、すべてのものを動かす精神の力に応じて、すべてのものが可能です。 それはすべてを可能にするのはスピリットであり、彼がすべてのことを可能にするのはスピリットの中にあるからです。 御霊は神の賜物であり、御霊の賜物は知恵と理解であり、助言と理解です。 彼らは御霊の子であり、その子の子です。 スピリットは全身を導きます。 霊にできないことは何もありません。 聖霊が実行できないことは、世界には何もありません。 霊を持つ彼にはすべてのことが可能です。 霊は肉に命を与えます。 霊がいるとき』


試しにキーワードを少し長くしてみた

『I am a cat. As yet I have no name. I’ve no idea where I was born.』とキーワードを設定

生成された結果

『I’m only a little one.



I had always known that I had a strange shape but I wasn’t sure that I knew why. I had never experienced being different. I don’t know why I am like this. I don’t know why’ I am born with a body like this. It's not my fault that I'm different.


The feeling of being different is always there though, so it makes sense that it would come to dominate my entire life. I have never known another way of being. I am a cat. As such I am a creature of instinct. It feels natural to me. I have never felt anything else.


I have never wanted anything more. My first love, a little kitten named Pipp』


『私はほんの少しです。



私はいつも変な形をしていることを知っていましたが、その理由がわからなかったのです。 違うことを経験したことはありませんでした。 なぜこんな感じなのか分かりません。 なぜこんな体で生まれたのか分からない 私が違うのは私のせいではありません。


違いがあるという感覚は常にそこにあるので、私の人生全体を支配するようになることは理にかなっています。 私は別の存在方法を知らなかった。 吾輩は猫である。 そのため、私は本能の生き物です。 それは私にとって自然なことです。 私は他に何も感じたことがありません。


私はこれ以上何も望んでいません。 私の最初の愛、ピップという名前の小さな子

猫』


キーワードをもう少し長くしてみた

『I am a cat. As yet I have no name. I’ve no idea where I was born. All I

remember is that I was miaowing in a dampish dark place when, for first

time, I saw a human being.』


『 I was a kitten, living in a litter of seven. We

were all rescued from a dirty, wet place by the same woman.

The woman had been feeding us all. The woman was so kind that she

even helped us get out of the house.

She would pick us up, and carry us away, and put us back in our

shelter. She never seemed to be afraid of us, but rather, so happy

that she could help. She brought us to an area, where a small patch of land

beneath the forest was safe to play on.

After a little while,』

googleの翻訳による日本語訳

『私は子猫で、7匹のごみに住んでいた。 私達

全員が同じ女性によって汚れた湿った場所から救出されました。

女性は私たち全員に食事を与えていました。 女性はとても親切だったので

家から出るのを助けてくれました。

彼女は私たちを迎えに行き、私たちを連れ去り、私たちを避難所に戻しました。 彼女は決して私たちを恐れているように見えなかったが、むしろ、とても幸せ

彼女が助けることができること。 彼女は私たちを小さな土地のある場所に連れて行ってくれました

森の下ではプレーしても安全でした。

しばらくして』


確かにもっともらしい文章は生成するが文学からは程遠い。

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

作者を応援しよう!

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

応援したユーザー

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

新規登録で充実の読書を

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

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

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