This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-03-10 23:44:43

silvershine
Scratcher
Registered: 2010-11-21
Posts: 500+

Advanced Question

Hey everyone,
I'm working on an AI that you can chat with (Like on Skype or AOL or gmail) and I've been running into some issues.

Heres what happens so far:
_________________________

•User types something in
•Program turns each word in question into an item on a list
_________________________

Now what I'm trying to do is get to look over the list to find keywords. If it does, I want it to find the appropriate answer.

EXAMPLE OF PROBLEM:
•Program can understand the word "hello"
•User type's in "hello"
•Program answers "Hello!"
•User types in "bleh hello"
•Program says "Hello!"
•User types in "hello bleh"
•Program doesn't answer because it doesn't know what to do


Help would be greatly appreciated!


Silvershine

Offline

 

#2 2011-03-11 17:17:28

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Advanced Question

It might have to do with the fact that your other user inputs had 'hello' at the end without a space following. Right now that's the only correlation I see, but it would help a lot if we could see the script to get a better idea of how it parses the string and interprets it.  hmm


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#3 2011-03-11 19:48:08

EmperorEvil
Scratcher
Registered: 2009-02-13
Posts: 1000+

Re: Advanced Question

I'm just asking where did you get your picture in your sig, Silvershine? Are you one of my aquaintances on a teacher's wiki?


http://oi54.tinypic.com/t8ogle.jpg http://blocks.scratchr.org/API.php?user=veggieman001&action=onlineStatus

Offline

 

#4 2011-03-11 21:05:00

silvershine
Scratcher
Registered: 2010-11-21
Posts: 500+

Re: Advanced Question

Harakou wrote:

It might have to do with the fact that your other user inputs had 'hello' at the end without a space following. Right now that's the only correlation I see, but it would help a lot if we could see the script to get a better idea of how it parses the string and interprets it.  hmm

Thanks, that was the problem. I added a script that removes the space while checking to see if it matches any keywords.

Offline

 

#5 2011-03-11 21:06:11

silvershine
Scratcher
Registered: 2010-11-21
Posts: 500+

Re: Advanced Question

EmperorEvil wrote:

I'm just asking where did you get your picture in your sig, Silvershine? Are you one of my aquaintances on a teacher's wiki?

I got it a while ago off google images. Sorry, (I guess) I'm not one of your acquaintances on a teachers wiki...

Offline

 

#6 2011-03-12 08:01:00

EmperorEvil
Scratcher
Registered: 2009-02-13
Posts: 1000+

Re: Advanced Question

silvershine wrote:

EmperorEvil wrote:

I'm just asking where did you get your picture in your sig, Silvershine? Are you one of my aquaintances on a teacher's wiki?

I got it a while ago off google images. Sorry, (I guess) I'm not one of your acquaintances on a teachers wiki...

Yeah...


http://oi54.tinypic.com/t8ogle.jpg http://blocks.scratchr.org/API.php?user=veggieman001&action=onlineStatus

Offline

 

Board footer