This is an automated email from the ASF dual-hosted git repository.
aradzinski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/master by this push:
new b4560d9 Fixed light switch example.
b4560d9 is described below
commit b4560d9235b51367296efc57b749f4d84b67a1f4
Author: Aaron Radzinski <[email protected]>
AuthorDate: Sat Jan 9 11:34:09 2021 -0800
Fixed light switch example.
---
.../org/apache/nlpcraft/examples/lightswitch/LightSwitchModel.scala | 3 ++-
.../org/apache/nlpcraft/examples/lightswitch/lightswitch_model.yaml | 6 +++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/lightswitch/LightSwitchModel.scala
b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/lightswitch/LightSwitchModel.scala
index 3de3924..0eae768 100644
---
a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/lightswitch/LightSwitchModel.scala
+++
b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/lightswitch/LightSwitchModel.scala
@@ -53,7 +53,8 @@ class LightSwitchModel extends
NCModelFileAdapter("org/apache/nlpcraft/examples/
"Please, no lights!",
"Kill off all the lights now!",
"No lights in the bedroom, please.",
- "Light up the garage, please!"
+ "Light up the garage, please!",
+ "Kill the illumination now!"
))
def onMatch(
@NCIntentTerm("act") actTok: NCToken,
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/lightswitch/lightswitch_model.yaml
b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/lightswitch/lightswitch_model.yaml
index a8239b0..dfce460 100644
---
a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/lightswitch/lightswitch_model.yaml
+++
b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/lightswitch/lightswitch_model.yaml
@@ -22,6 +22,8 @@ description: "NLI-powered light switch example model."
macros:
- name: "<ACTION>"
macro: "{turn|switch|dial|control|let|set|get|put}"
+ - name: "<KILL>"
+ macro: "{shut|kill|stop|eliminate}"
- name: "<ENTIRE_OPT>"
macro: "{entire|full|whole|total|*}"
- name: "<LIGHT>"
@@ -49,7 +51,9 @@ elements:
description: "Light switch OFF action."
synonyms:
- "<ACTION> <LIGHT> {off|out}"
- - "{<ACTION>|shut|kill|stop|eliminate} {off|out} <LIGHT>"
+ - "{<ACTION>|<KILL>} {off|out} <LIGHT>"
+ - "<KILL> <LIGHT>"
+ - "<LIGHT> <KILL>"
- "no <LIGHT>"
intents:
- "intent=ls term(act)={groups @@ 'act'} term(loc)={id == 'ls:loc'}*"
\ No newline at end of file