Jump to content

[Java] How to use MagPie?

creativename

I'm trying to create a chat bot using java and magpie, however I can't figure out how to get it to respond a certain way, I can't quite explain it so here's an example of what I want.

 

 

e.g.

App: Hello, let's talk.

User: I want (w/e can do in here)

App: Are you sure you want (w/e user inputed)?

 

 

Basically I want it to recognize the "I want" part, and then give me back "Are you sure you want" + other half of input.

 

Everything else is working, I just can't  get this part working, I would like some suggestions on how to edit it.

 

 

else if (findKeyword(statement, "I want " , 0 >= 0)

{

response = transformIWantToStatement("Would you really be happy if you had ");

}

 

 

I'm not even sure if I did that part correctly. I will post the entire magpie code if that's needed.

CPU: Intel Core i7 2600k | Mootherboard: ASUS P8z68v-Pro | GPU: EVGA GTX780Ti 3GB | RAM: Kingston HyperX Genesis 8GB (4GBx2) 1600mhz | PSU: Corsair AX760 | STORAGE: Samsung 840 Pro 512GB | COOLER: Noctua NH-C14 | CASE: Fractal Design Define R4 Pearl Black | Operating SystemWindows 7 Professional 64-bit |

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×