vb.net,一个非常简单的聊天机器人 [英] vb.net, a very simple chatbot

查看:65
本文介绍了vb.net,一个非常简单的聊天机器人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,我是编程的新手,刚从vb开始,到目前为止,我能够通过谷歌搜索得到我所有问题的答案,但是现在我陷入困境中(我猜它很简单,但我只是无法找到解决方案的情况。总之,让我说到这一点;



i我正在尝试制作一个简单的聪明机器人和eliza之类的聊天机器人应用程序(它不会像好像他们一样)我现在被困住的一点是;我怎样才能让控制台在特定输入的情况下选择随机响应(我一直在谷歌搜索,但我在VB中找不到答案,虽然我尝试了代码转换网站和软件,但这并没有真正起作用)



等待你的回复,我会很高兴他们=)

hello friends,i am very new to programming and just got started from vb,this far i was able to get answers to all my questions from googling but right now i am stuck in a (i guess it's very simple but i just cant find the solution) situation.Anyways,let me get to the point;

i am trying to make a simple cleverbot and eliza like chatbot application(ofc it wont be as good as them) the point i am stuck at the moment is; how can i get the console to pick random responses in case of spesific inputs(i googled all the way but i couldn't find the answer in VB,although i tried code converting sites and softwares but that didn't really worked either)

waiting for your responses and i'll be very glad for them =)

推荐答案

我们可以'真的给你一个简单的做这个的答案 - 我们不知道还有太多其他涉及的东西。例如,您的回复是否已修复?您是否有能力根据用户输入改变它们?例如,如果用户说球是绿色的,你可以选择球和绿色作为重要,并将它们插入一个随机的股票短语:

We can't really give you a simple "do this" answer - there is far, far too much other stuff involved that we don't know about. For example, are your responses fixed? Do you have the capability to vary them according to the user input? For example if the user says "the ball is green", can you pick out the "ball" and "green" as significant, and slot them into a random stock phrase:
"Can you see the {1} {0}?"
"The {0} looks {1} to me as well!"

如果可以,那么你需要看看这种方式,如果没有,那么你需要看一下另外。



随机短语很简单:只需要​​一系列短语并随机选择一个:

If you can, then you need to look at this one way, if not, than you need to look at it another.

Random phrases are easy: just have an array of phrases and pick one at random:

Private rand As New Random()
Private responses As String() = New String() {"..", "..", ...}
...
   Dim response As String = responses(rand.[Next](responses.Length))



您可能会发现这很有用:如何构建Eliza Chatterbot - 一个可以与人聊天的程序 [ ^ ]


这篇关于vb.net,一个非常简单的聊天机器人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆