chatterbot mysql_Chatbot Tutorial (聊天机器人制作教程) 每日更新 不断学习
為了提高英語水平堅持 沒事的時候 翻譯一下這篇文章。
今天 先簡單的 翻譯一下第一部分。本人英語超級菜,所以請各位看原始英文版,以免誤導各位,每天翻譯多少就上傳多少。
制作一個人工智能聊天機器人教程
一步一步的指導你如何制作你自己的聊天機器人
1:Introduction Chatbot Description (first example)
簡介聊天機器人 第一個例子
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
基本上一個聊天機器人程序就是當你用自然語言(英語,法語....)提供輸入時,它能夠用相同的語言做出有意義的應答。
意思是一個健壯的聊天機器人可以的在響應用戶時直接判斷輸出。通過前面的描述,我們可以推斷一個非常基礎的聊天機器人可以是用一種特定的編程語言寫幾行代碼來完成的。
讓我們編寫第一個聊天機器人吧(注意:本教程的所有代碼全部用C++,并且假定讀者已經熟悉STL)。這個教程也可用如下語言編寫 :
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(說明)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(數學家)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(排印錯誤)?(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.
正如你看到的,他不需要很多的代碼去編寫一個非常基礎的項目,它和用戶交互,但是編寫一個能夠真正理解用戶實際所說的話并給出適當的應答的程序是很難的。
甚至從第一臺電腦誕生以來,這就一直是一個長期目標。
在1951年,英國數學家 阿蘭 圖靈提出一個問題 “機器人可以思考”并且提出了一個測試,現在被稱為“圖靈測試”,
在這個測試中 一個電腦程序和是一個真人,將和第三個人對話。第三個人要分辨出哪個是真人。
如今,有一個被叫做“勒布納獎"的競賽。在這個競賽機器人如果欺騙了大多數”裁判官“將得到10W美金。目前為止還沒有任何程序通過測試。
主要原因是,為這個項目寫一個有語言傾向的估算有很多錯誤(他們經常斷章取義的交談)。
意思就是說,區分機器人和真人并不是很難的。
此外,所有這些程序試圖模仿真正的人類之間的對話的直接祖先是伊麗莎,這個程序寫的第一個版本于1966年由麻省理工學院教授約瑟夫魏澤鮑姆。
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!
聊天機器人一般被認為是屬于弱AI場(弱人工智能),而不是強大的AI ,他的目標是創造人類一樣聰明或更智能的程序。
這并不意味著聊天機器人沒有任何潛力。能夠創建一個和人一樣溝通的程序,在人工智能領域將是一個巨大進步。
聊天機器人是人工智能這方面愛好者這部分(它只能采取一些普通編程技能是一個的chatbot程序員)
所以,誰想要建立真正的人工智能AI或某種程序員,編寫的智能聊天機器人是一個偉大的地方開始!
不認識的陌生詞語
1 Interact v. 互相作用; 互動; 互相影響2 probably adv. 大概, 或許3 capable adj. 有能力的, 能干的, 能的4 truly adv 真實的 不假的5 interpretive adj. 作為說明的; 解釋的6 actually adv. 實際上, 真的; 竟然7 generate v. 產生, 導致, 發生8 appropriate v. 撥出; 挪用, 盜用; 占用9 adj. 適當的, 恰當的, 相稱的10 term goal 長期目標11 propose v. 計劃, 建議, 打算; 打算, 求婚12 judge n. 法官, 推事, 審判官13 v. 審理; 判斷; 鑒定; 下判斷; 作評價14 major n. 主修, 陸軍少校, 成年人; 大調15 v. 主修16 adj. 主要的, 大部份的, 較多的; 主修的, 大調的, 成年的17 reason n. 理由, 動機, 原因; 判斷力, 推理; 理性, 理智; 道理, 情理18 v. 推論, 思考, 勸說; 說服, 辯論, 推論19 compute v. 計算; 推斷; 估算20 contest n. 競賽, 爭論21 v. 競賽, 爭辯, 爭取; 爭奪22 tendency n. 趨向, 傾向23 conversation n. 會話, 交談, 說話24 generally adv. 通常, 普遍地, 逐漸地; 一般來說25 direct v. 指示, 命令, 指揮; 指導; 指揮26 adj. 直接的, 坦白的27 adv. 直接地28 ancestor n. 祖宗, 祖先; 先驅; 原型; 被繼承人29 tries n. 試驗者, 審問者, 試驗物30 mimic n. 效顰者; 小丑; 模仿者31 v. 模仿; 摹擬32 adj. 模仿的; 擬態的; 假裝的33 conversation n. 會話, 交談, 說話34 considered adj. 考慮過的; 被尊重的35 belong v. 屬于, 住; 合適; 適宜36 weak adj. 不牢固的, 虛弱的, 弱的37 field n. 領域, 范圍, 領地; 場地, 田地; 被指定為記錄里信息項目的空間 (計算機用語); 表面; 用于運動的場地; 游戲者的作品; 層次; 打仗的場地, 戰場; 戰斗38 v. 使上場; 擔任場外隊員39 adj. 田間的; 野外的; 野生的40 artificial adj. 人工的, 人造的; 矯揉造作的, 不自然的; 假的; 人為的41 intelligence n. 智力; 智能; 聰明42 opposed adj. 反對的, 對抗的, 敵對的43 potential n. 潛在性, 可能性44 adj. 有潛力的, 潛在的, 可能的45 communicate vt. 傳達,表達;顯示:清晰地揭示;表明;傳染:擴散;46 vi. 通訊;交際;相連;相通;47 advance n. 前進; 增長; 發展; 增高48 v. 使向前移動; 將...提前; 推進, 促進; 預付; 前進; 進展; 向前移動; 進步49 adj. 先行的; 預先的, 事先的50 accessible adj. 易受影響的, 易接近的, 可進入的51 hobbyist n.沉溺于某種癖好者, 業余愛好者
View Code
總結
以上是生活随笔為你收集整理的chatterbot mysql_Chatbot Tutorial (聊天机器人制作教程) 每日更新 不断学习的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 天猫店铺介绍,影响天猫店铺转让价格的六个
- 下一篇: 奇迹暖暖一直显示服务器满怎么办,奇迹暖暖