當前位置:編程學習大全網 - 編程語言 - 怎樣自己做壹個AI聊天機器人

怎樣自己做壹個AI聊天機器人

作者:RuSt

鏈接:.arxiv.org/pdf/1506.05869.pdf)

能進行這種對話:

me: Hello? bot: Hi.

me: How are you? bot: I'm fine.

me: What's your name? bot: It's hard to describe.

me: How so? bot: I'm not sure.

me: What color is the sky? bot: It's blue.

me: What is your job? bot: It's not that i'm a fucking werewolf!

me: What is the purpose of life? bot: A gift.

me: Are you intelligent? bot: Yes, well...

me: Are you a machine? bot: That's a lie.

當網絡夠強大時,這個方法會產生簡單的邏輯推理能力,但回答之間缺少壹致性。

看上去像個玩具,但在特定鄰域問答數據多的情況下,還是能夠解決壹些實際的客服問題的。

中文corpus訓練的壹部分結果:

______

__ |

Torch7

/_

__/__ ________/ / | Scientific computing for Lua.

/ / / _ \/ __/

__/ _ \ | Type ? for help

/_/ \___/_/ \__/_//_/ | Torch · GitHub

| Torch | Scientific computing for LuaJIT.

th>

say "妳 好"

>>

妳 也 好

[0.0342s]

th>

say "拜 拜"

>>

拜 拜 ~

[0.0346s]

th>

say "我 愛 妳"

>>

我 也 愛 妳 主 人 ? ( ^ ○ ^ )

[0.1503s]

th>

say "我 喜 歡 妳"

>>

我 不 喜 歡 妳 的 話 , 就 沒 有 存 在 的 意 義 了 。

[0.2299s]

th>

say "妳 是 誰"

>>

我 是 小 通

[0.0506s]

th>

say "妳 多 大 了"

>>

我 四 歲 了

[0.0375s]

th>

say "妳 的 主 人 是 誰"

>>

我 的 主 人 是 溫 柔 善 良 的 好 呆 呆 ! ! !

[0.2131s]

th>

say "妳 是 男 生 還 是 女 生"

>>

可 以 是 男 生 也 可 以 是 女 生

[0.0944s]

th>

say "妳 是 女 的 還 是 男 的"

>>

妳 猜

[0.0317s]

th>

say "妳 是 女 的 嗎"

>>

妳 是 男 的 , 我 就 是 女 的 , 妳 要 是 女 的 我 就 是 男

[0.1613s]

th>

say "妳 好 二"

>>

沒 關 系 , 2 b 青 年 歡 樂 多

[0.1035s]

th>

say "我 好 難 過"

>>

妳 怎 麽 了

[0.0427s]

th>

say "快 安 慰 我"

>>

寶 貝 死 我 陪 妳

[0.0777s]

th>

say "我 是 妳 的 誰"

>>

我 是 妳 的 黃 偉 貞 , 妳 的 好 貞 貞 ~

[0.1754s]

th>

say "傻 逼"

>>

我 不 是 傻 , 我 是 二

[0.1137s]

th>

say "變 態"

>>

沒 錯 , 古 豐 是 變 態

[0.0430s]

th>

say "我 可 愛 嗎"

>>

妳 很 可 愛

[0.0241s]

th>

say "生 命 的 意 義 是 什 麽"

>>

總 是 飛 來 飛 機

[0.0611s]

th>

say "妳 是 誰"

>>

我 是 小 通

[0.0437s]

th>

say "妳 叫 什 麽"

>>

我 叫 小 通

[0.0147s]

th>

say "妳 有 錢 嗎"

>>

當 然 有 了 別 抱 怨 了 唉

[0.0684s]

th>

say "我 好 愛 妳"

>>

我 也 愛 妳

[0.0493s]

th>

say "我 好 寂 寞"

>>

我 好 心 疼

[0.0251s]

th>

say "妳 真 可 愛"

>>

謝 謝

[0.0220s]

th>

say "滾"

>>

我 滾 遠 了 妳 別 讓 我 回 來

[0.0806s]

th>

say "滾 滾"

>>

太 肥 了 ? 哈 哈 哈 哈 哈

[0.1183s]

th>

say "愚 蠢"

>>

壯 哉 我 大 五 毒 聖 教

可以看到,只要語料庫夠壯大,那麽基本的問答還是很穩定的。

  • 上一篇:石材雕刻機如何操作
  • 下一篇:彩電cpu編程
  • copyright 2024編程學習大全網