chatterbot mysql_Chatbot Tutorial (聊天机器人制作教程) 每日更新 不断学习
為了提高英語(yǔ)水平堅(jiān)持 沒(méi)事的時(shí)候 翻譯一下這篇文章。
今天 先簡(jiǎn)單的 翻譯一下第一部分。本人英語(yǔ)超級(jí)菜,所以請(qǐng)各位看原始英文版,以免誤導(dǎo)各位,每天翻譯多少就上傳多少。
制作一個(gè)人工智能聊天機(jī)器人教程
一步一步的指導(dǎo)你如何制作你自己的聊天機(jī)器人
1:Introduction Chatbot Description (first example)
簡(jiǎn)介聊天機(jī)器人 第一個(gè)例子
Basically a chatterbot is a computer program that when you provide it with some inputs in Natural Language (English, French ...) responds with something meaningful in that same language. Which means that the strength of a chatterbot could be directly measured by the quality of the output selected by the Bot in response to the user. By the previous description, we could deduce that a very basic chatterbot can be written in a few lines of code in a given specific programming language. Lets make our first chatterbot (notice that all the codes that will be used in this tutorial will be written in C++. Also, it is assumed that the reader is familiar with the STL library) This tutorial is also available in the following languages:Java,Visual Basic,C#,Pascal,PrologandLisp
基本上一個(gè)聊天機(jī)器人程序就是當(dāng)你用自然語(yǔ)言(英語(yǔ),法語(yǔ)....)提供輸入時(shí),它能夠用相同的語(yǔ)言做出有意義的應(yīng)答。
意思是一個(gè)健壯的聊天機(jī)器人可以的在響應(yīng)用戶時(shí)直接判斷輸出。通過(guò)前面的描述,我們可以推斷一個(gè)非常基礎(chǔ)的聊天機(jī)器人可以是用一種特定的編程語(yǔ)言寫(xiě)幾行代碼來(lái)完成的。
讓我們編寫(xiě)第一個(gè)聊天機(jī)器人吧(注意:本教程的所有代碼全部用C++,并且假定讀者已經(jīng)熟悉STL)。這個(gè)教程也可用如下語(yǔ)言編寫(xiě) :
java vb c# pascal(DELPHI) and Lisp
1 //
2 //Program Name: chatterbot13 //Description: this is a very basic example of a chatterbot program4 //
5 //Author: Gonzales Cenelia6 //7
8 #include
9 #include
10 #include
11
12 intmain()13 {14 std::string Response[] ={15 "I HEARD YOU!",16 "SO, YOU ARE TALKING TO ME.",17 "CONTINUE, I’M LISTENING.",18 "VERY INTERESTING CONVERSATION.",19 "TELL ME MORE..."
20 };21
22 srand((unsigned) time(NULL));23
24 std::string sInput = "";25 std::string sResponse = "";26
27 while(1) {28 std::cout << ">";29 std::getline(std::cin, sInput);30 int nSelection = rand() % 5;31 sResponse =Response[nSelection];32 std::cout << sResponse <<:endl>
35 return 0;36 }
View Code
As you can see, it doesn't take a lot of code to write a very basic program that can interact with a user but it would probably be very difficult to write a program that would really be capable of trulyinterpreting(說(shuō)明)what the user is actually saying and after that would also gene
rate an appropriate response to it. These have been a long term goal since the beginning and even before the very first computers were created. In 1951,the British?mathematician(數(shù)學(xué)家)Alan Turing has came up with the questionCan machines thinkand he has also propose a test which is now known as theTuring Test.In this test, a computer program and also a real person is set to speak to a third person (the judge) and he has to decide which of them is the real person. Nowadays, there is a competition that was named the?Loebner Prize?and in this competition bots that has successfully fool most of the judge for at list 5 minutes would win a prize of 100.000$. So far no computer program was able to pass this test successfully. One of the major reasons for this is that computer programs written to compute in such contest have naturally the?tendency(傾向)?of committing a lot oftypo(排印錯(cuò)誤)?(they are often out of the context of the conversation). Which means that generally, it isn't that difficult for a judge to decide whether he is speaking to a "computer program" or a real person. Also, the direct ancestor of all those program that tries to?mimic(模仿)?a conversation between real human beings is?Eliza,the first version of this program was written in 1966 by Joseph Weizenbaum a professor of MIT.
正如你看到的,他不需要很多的代碼去編寫(xiě)一個(gè)非常基礎(chǔ)的項(xiàng)目,它和用戶交互,但是編寫(xiě)一個(gè)能夠真正理解用戶實(shí)際所說(shuō)的話并給出適當(dāng)?shù)膽?yīng)答的程序是很難的。
甚至從第一臺(tái)電腦誕生以來(lái),這就一直是一個(gè)長(zhǎng)期目標(biāo)。
在1951年,英國(guó)數(shù)學(xué)家 阿蘭 圖靈提出一個(gè)問(wèn)題 “機(jī)器人可以思考”并且提出了一個(gè)測(cè)試,現(xiàn)在被稱(chēng)為“圖靈測(cè)試”,
在這個(gè)測(cè)試中 一個(gè)電腦程序和是一個(gè)真人,將和第三個(gè)人對(duì)話。第三個(gè)人要分辨出哪個(gè)是真人。
如今,有一個(gè)被叫做“勒布納獎(jiǎng)"的競(jìng)賽。在這個(gè)競(jìng)賽機(jī)器人如果欺騙了大多數(shù)”裁判官“將得到10W美金。目前為止還沒(méi)有任何程序通過(guò)測(cè)試。
主要原因是,為這個(gè)項(xiàng)目寫(xiě)一個(gè)有語(yǔ)言?xún)A向的估算有很多錯(cuò)誤(他們經(jīng)常斷章取義的交談)。
意思就是說(shuō),區(qū)分機(jī)器人和真人并不是很難的。
此外,所有這些程序試圖模仿真正的人類(lèi)之間的對(duì)話的直接祖先是伊麗莎,這個(gè)程序?qū)懙牡谝粋€(gè)版本于1966年由麻省理工學(xué)院教授約瑟夫魏澤鮑姆。
Chatbots in general are considered to belong to the weak a.i field (weak artificial intelligence) as opposed to strong a.i who's goal is to create programs that are as intelligent as humans or more intelligent.
But it doesn't mean that chatbots do not have any true potential. Being able to create a program that could communicate the same way humans do would be a great advance for the a.i field.
Chatbot is this part of artificial intelligence which is more accessible to hobbyist (it only take some average programming skill to be a chatbot programmer). So, programmers out there who wanted to create true a.i or some kind of artificial intelligence, writing intelligent chatbots is a great place to start!
聊天機(jī)器人一般被認(rèn)為是屬于弱AI場(chǎng)(弱人工智能),而不是強(qiáng)大的AI ,他的目標(biāo)是創(chuàng)造人類(lèi)一樣聰明或更智能的程序。
這并不意味著聊天機(jī)器人沒(méi)有任何潛力。能夠創(chuàng)建一個(gè)和人一樣溝通的程序,在人工智能領(lǐng)域?qū)⑹且粋€(gè)巨大進(jìn)步。
聊天機(jī)器人是人工智能這方面愛(ài)好者這部分(它只能采取一些普通編程技能是一個(gè)的chatbot程序員)
所以,誰(shuí)想要建立真正的人工智能AI或某種程序員,編寫(xiě)的智能聊天機(jī)器人是一個(gè)偉大的地方開(kāi)始!
不認(rèn)識(shí)的陌生詞語(yǔ)
1 Interact v. 互相作用; 互動(dòng); 互相影響2 probably adv. 大概, 或許3 capable adj. 有能力的, 能干的, 能的4 truly adv 真實(shí)的 不假的5 interpretive adj. 作為說(shuō)明的; 解釋的6 actually adv. 實(shí)際上, 真的; 竟然7 generate v. 產(chǎn)生, 導(dǎo)致, 發(fā)生8 appropriate v. 撥出; 挪用, 盜用; 占用9 adj. 適當(dāng)?shù)? 恰當(dāng)?shù)? 相稱(chēng)的10 term goal 長(zhǎng)期目標(biāo)11 propose v. 計(jì)劃, 建議, 打算; 打算, 求婚12 judge n. 法官, 推事, 審判官13 v. 審理; 判斷; 鑒定; 下判斷; 作評(píng)價(jià)14 major n. 主修, 陸軍少校, 成年人; 大調(diào)15 v. 主修16 adj. 主要的, 大部份的, 較多的; 主修的, 大調(diào)的, 成年的17 reason n. 理由, 動(dòng)機(jī), 原因; 判斷力, 推理; 理性, 理智; 道理, 情理18 v. 推論, 思考, 勸說(shuō); 說(shuō)服, 辯論, 推論19 compute v. 計(jì)算; 推斷; 估算20 contest n. 競(jìng)賽, 爭(zhēng)論21 v. 競(jìng)賽, 爭(zhēng)辯, 爭(zhēng)取; 爭(zhēng)奪22 tendency n. 趨向, 傾向23 conversation n. 會(huì)話, 交談, 說(shuō)話24 generally adv. 通常, 普遍地, 逐漸地; 一般來(lái)說(shuō)25 direct v. 指示, 命令, 指揮; 指導(dǎo); 指揮26 adj. 直接的, 坦白的27 adv. 直接地28 ancestor n. 祖宗, 祖先; 先驅(qū); 原型; 被繼承人29 tries n. 試驗(yàn)者, 審問(wèn)者, 試驗(yàn)物30 mimic n. 效顰者; 小丑; 模仿者31 v. 模仿; 摹擬32 adj. 模仿的; 擬態(tài)的; 假裝的33 conversation n. 會(huì)話, 交談, 說(shuō)話34 considered adj. 考慮過(guò)的; 被尊重的35 belong v. 屬于, 住; 合適; 適宜36 weak adj. 不牢固的, 虛弱的, 弱的37 field n. 領(lǐng)域, 范圍, 領(lǐng)地; 場(chǎng)地, 田地; 被指定為記錄里信息項(xiàng)目的空間 (計(jì)算機(jī)用語(yǔ)); 表面; 用于運(yùn)動(dòng)的場(chǎng)地; 游戲者的作品; 層次; 打仗的場(chǎng)地, 戰(zhàn)場(chǎng); 戰(zhàn)斗38 v. 使上場(chǎng); 擔(dān)任場(chǎng)外隊(duì)員39 adj. 田間的; 野外的; 野生的40 artificial adj. 人工的, 人造的; 矯揉造作的, 不自然的; 假的; 人為的41 intelligence n. 智力; 智能; 聰明42 opposed adj. 反對(duì)的, 對(duì)抗的, 敵對(duì)的43 potential n. 潛在性, 可能性44 adj. 有潛力的, 潛在的, 可能的45 communicate vt. 傳達(dá),表達(dá);顯示:清晰地揭示;表明;傳染:擴(kuò)散;46 vi. 通訊;交際;相連;相通;47 advance n. 前進(jìn); 增長(zhǎng); 發(fā)展; 增高48 v. 使向前移動(dòng); 將...提前; 推進(jìn), 促進(jìn); 預(yù)付; 前進(jìn); 進(jìn)展; 向前移動(dòng); 進(jìn)步49 adj. 先行的; 預(yù)先的, 事先的50 accessible adj. 易受影響的, 易接近的, 可進(jìn)入的51 hobbyist n.沉溺于某種癖好者, 業(yè)余愛(ài)好者
View Code
總結(jié)
以上是生活随笔為你收集整理的chatterbot mysql_Chatbot Tutorial (聊天机器人制作教程) 每日更新 不断学习的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 天猫店铺介绍,影响天猫店铺转让价格的六个
- 下一篇: 爬虫+数据库+大数据分析