@@ -69,6 +69,7 @@ Let's assume we have a list of floors for our elevator. Since we're dealing with
69
69
When an entity with an ID is of type "List" and is in "Strict" mode, the engine will only match if the text in the slot appears in the list.
70
70
71
71
> "take me to floor one" will match.
72
+
72
73
> "take me to floor 5" will not.
73
74
74
75
It's important to note that the Intent will not match, not just the entity.
@@ -85,17 +86,23 @@ The "PrebuiltInteger" entity is used when you expect to get an integer in that s
85
86
#### Examples of a valid match and return values
86
87
87
88
> "Two thousand one hundred and fifty-five" -> "2155"
89
+
88
90
> "first" -> "1"
91
+
89
92
> "a" -> "1"
93
+
90
94
> "four oh seven one" -> "4071"
91
95
92
96
If there's text that is not recognizable as a number, the entity and intent will not match.
93
97
94
98
#### Examples of an invalid match
95
99
96
100
> "the third"
101
+
97
102
> "first floor I think"
103
+
98
104
> "second plus three"
105
+
99
106
> "thirty-three and anyways"
100
107
101
108
Consider our elevator example.
@@ -111,12 +118,19 @@ In the pattern it's allowed to include words or entities that may be present in
111
118
To see how this would reduce the number of patterns needed consider the following set.
112
119
113
120
> "Take me to the {floorName}"
121
+
114
122
> "Take me the {floorName}"
123
+
115
124
> "Take me to {floorName}"
125
+
116
126
> "take me {floorName}"
127
+
117
128
> "Take me to the {floorName}" please
129
+
118
130
> "Take me the {floorName}" please
131
+
119
132
> "Take me to {floorName}" please
133
+
120
134
> "take me {floorName}" please
121
135
122
136
These can all be reduced to a single pattern with optional items.
0 commit comments