I making a project of Siri and I need help for making her respond and I'm wondering if this is the right way. Is this the right way?
when gf clicked ask [What can I help you with?] and wait if <(answer) = [Hello]> say [Hello!] end
Last edited by maxamillion321 (2012-10-14 15:11:39)
Offline
You may want to pick out certain keywords or phrases.., and put these in a list. For example, if the user says the word time in their sentence then see what 'time' corresponds to in the list and give a generic answer about time (for example the current time). As Wes64 said, specific keywords probably won't work well because people tend to ask things in different ways!
"Offline
http://en.wikipedia.org/wiki/Natural_la … processing
This is where you want to listen to your English teacher. When listening, look for patterns, like: "subject verb object" is a common way we write sentences. "I program in Scratch." "I" being the subject, "program" being the verb, "Scratch" being the object. With that pattern, you can pick out certain words the program responds with. So when it "reads" what I've written, it'll pick out "I", so you probably want the program to respond with "You", and then look and add the verb "program" and then the object as well: "Scratch." The result will be: "You program Scratch" which is wrong since we don't program Scratch, we program in it, so you also want to get the preposition "in" and add that to get "You program in Scratch".
With this method you can make simple responses to simple statements.
You: I program in Scratch Bot: You program in Scratch You: You are awesome Bot: I am awesome
Then gradually add more replacements instead of just switching the subject (I and you) to switching the verb (are, am) to even more complicated stuff where it responds to questions like "How long have you been running?" (this is actually an extremely complicated question since it can refer to the run-time like how long the program has been running, or how long they have been running/jogging). So start with simple responses and recognizing statements and then move on to harder stuff.
Though I think Scratch will only be able to handle simple statements and questions, it'd be interesting to see how far you can go with this though. Good luck!
Offline