This is an automated email from the ASF dual-hosted git repository.

aradzinski pushed a commit to branch NLPCRAFT-384
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/NLPCRAFT-384 by this push:
     new aedcbe9  WIP on NLPCRAFT-384
aedcbe9 is described below

commit aedcbe93bd384d7ebd615adddba7efb7c39d8d39
Author: Aaron Radzinski <[email protected]>
AuthorDate: Tue Aug 17 14:55:09 2021 -0700

    WIP on NLPCRAFT-384
---
 .../alarm/src/main/resources/alarm_intents.idl            |  4 ++++
 .../cargps/src/main/resources/cargps_intents.idl          | 15 ++++++++++++---
 .../cargps/src/main/resources/cargps_model.yaml           |  6 +++---
 3 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/nlpcraft-examples/alarm/src/main/resources/alarm_intents.idl 
b/nlpcraft-examples/alarm/src/main/resources/alarm_intents.idl
index da7a066..109f60c 100644
--- a/nlpcraft-examples/alarm/src/main/resources/alarm_intents.idl
+++ b/nlpcraft-examples/alarm/src/main/resources/alarm_intents.idl
@@ -15,6 +15,10 @@
  * limitations under the License.
  */
 
+/*
+ * Read documentation: http://nlpcraft.apache.org/intent-matching.html
+ */
+
 // Fragments (mostly for demo purposes here).
 fragment=buzz term~{tok_id() == 'x:alarm'}
 fragment=when
diff --git a/nlpcraft-examples/cargps/src/main/resources/cargps_intents.idl 
b/nlpcraft-examples/cargps/src/main/resources/cargps_intents.idl
index 64b5532..00baf99 100644
--- a/nlpcraft-examples/cargps/src/main/resources/cargps_intents.idl
+++ b/nlpcraft-examples/cargps/src/main/resources/cargps_intents.idl
@@ -15,11 +15,20 @@
  * limitations under the License.
  */
 
+ /*
+  * Read documentation: http://nlpcraft.apache.org/intent-matching.html
+  */
+
 // Reusable fragments.
 fragment=hey term={tok_id() == "x:hey" && tok_is_first()}
 
 // Intents.
-intent=int:cancel fragment(hey) term={tok_id() == "x:cancel"}
+intent=int:cancel
+    // Ignore any other user or system tokens if we found 'cancel' token.
+    options={'unused_usr_toks': true, 'unused_sys_toks': true}
+    fragment(hey)
+    term={tok_id() == "x:cancel"}
+
 intent=int:navigate fragment(hey) term={tok_id() == "x:navigate"}
-intent=int:add:waypoint fragment(hey) term={tok_id() == "x:x:add-waypoint"}
-intent=int:remove:waypoint fragment(hey) term={tok_id() == 
"x:x:remove-waypoint"}
\ No newline at end of file
+intent=int:add:waypoint fragment(hey) term={tok_id() == "x:add-waypoint"}
+intent=int:remove:waypoint fragment(hey) term={tok_id() == "x:remove-waypoint"}
\ No newline at end of file
diff --git a/nlpcraft-examples/cargps/src/main/resources/cargps_model.yaml 
b/nlpcraft-examples/cargps/src/main/resources/cargps_model.yaml
index 8c56eb9..d8c6199 100644
--- a/nlpcraft-examples/cargps/src/main/resources/cargps_model.yaml
+++ b/nlpcraft-examples/cargps/src/main/resources/cargps_model.yaml
@@ -25,11 +25,11 @@ macros:
   - name: "<HEY>"
     macro: "{hey|hi|howdy}"
   - name: "<NAVIGATE>"
-    macro: 
"{navigate|pilot|plot|drive|route|plan|find|head|ride|direct|steer|operate|sail}
 {out|*} {course|route|destination|drive|*}"
+    macro: 
"{navigate|pilot|plot|drive|route|plan|find|head|ride|direct|steer|operate|sail}
 {out|_} {course|route|destination|drive|_}"
   - name: "<CANCEL>"
-    macro: "{cancel|stop|abort|finish|cease|quit} {off|*}"
+    macro: "{cancel|stop|abort|finish|cease|quit} {off|_}"
   - name: "<WAYPOINT>"
-    macro: "{waypoint|location|point|stopover|stop over|way 
station|stop|checkpoint|stop point} {point|station|*}"
+    macro: "{waypoint|location|point|stopover|stop over|way 
station|stop|checkpoint|stop point} {point|station|_}"
 
 #
 # Allows for multi-word synonyms in this entire model

Reply via email to