forked from micro222/chatbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
templates2.txt
69 lines (58 loc) · 2.62 KB
/
templates2.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// The robot will try to match the sentence with one of the templates below.
// If there's a match, the specified function will deal with the rest of the processing.
// The first 2 numbers indicate which words are passed to the function.
//
// Note, where there ia a *, no match is needed
// CLASS STATEMENTS
// parameters: subject, class
a * is a *, handle_class_statement(2, 5) // ex: a cat is an animal
* is a *, handle_class_statement(1, 4) // ex: beer is a beverage
// CLASS QUESTIONS
// parameters: subject, class
what is *, handle_class_question(3) // ex: what is coffee?
what are *, handle_class_question(3) // ex: what are raccoons?
what is a *, handle_class_question(4) // ex: what is a cow?
// ATTRIBUTE STATEMENTS
// parameters: subject, attribute
* is *, handle_attribute_statement(1, 3) // ex: chocolate is brown
// ATTRIBUTE QUESTIONS
// parameters: subject, attribute
what * is *, handle_attribute_question(4, 2) // ex: what color is chocolate
where is *, handle_attribute_question(3, "location") // ex: where is lucy?
// ATTRIBUTE CONFIRMAION QUESTIONS
// parameters: subject, attribute
is * *, handle_attribute_confirmation_question(2, 3) // ex: is chocolate brown
//TO DO
// say my name
// what is my name,
// what is your name
// i am male,
// bob is male
// my gender is male
// what is my gender
// bob is tired
// ABILITY
can * *, handle_ability_question(2, 3) // ex: can cows fly
* can *, handle_ability_statement(1, 3) // ex: crows can fly
// RATING STATEMENTS
I hate *, handle_rating_statement(1, 3, 0)
I dont like *, handle_rating_statement(1, 4, 3)
I like *, handle_rating_statement(1, 3, 7) // ex: i like beer
I love *, handle_rating_statement(1, 3, 10)
* hates *, handle_rating_statement(1, 3, 0) // ex: bob hates beer
* doesn't like *, handle_rating_statement(1, 4, 3)
* likes *, handle_rating_statement(1, 3, 7) // ex: bob likes jane
* loves *, handle_rating_statement(1, 3, 10) // ex: fred loves beer
// RATING QUESTION
do you like *, handle_rating_question(2, 4) // ex: do you like beer
does * like *, handle_rating_question(2, 4) // ex: does fred like beer
// MISC.
list *, list_question, 2 // ex: list action
hi, handle_greetings()
hey, handle_greetings()
hello, handle_greetings()
// TO DO
// help
// bye
// what time is it
// how are you