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 b8a620c  Update LightSwitchGroovyModel.groovy
b8a620c is described below

commit b8a620cb69bf99476b41574e8b880f220d6b307d
Author: Aaron Radzinski <[email protected]>
AuthorDate: Mon Jul 19 11:57:57 2021 -0700

    Update LightSwitchGroovyModel.groovy
---
 .../apache/nlpcraft/examples/lightswitch/LightSwitchGroovyModel.groovy  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/nlpcraft-examples/lightswitch/src/main/java/org/apache/nlpcraft/examples/lightswitch/LightSwitchGroovyModel.groovy
 
b/nlpcraft-examples/lightswitch/src/main/java/org/apache/nlpcraft/examples/lightswitch/LightSwitchGroovyModel.groovy
index 55d2393..9c9e978 100644
--- 
a/nlpcraft-examples/lightswitch/src/main/java/org/apache/nlpcraft/examples/lightswitch/LightSwitchGroovyModel.groovy
+++ 
b/nlpcraft-examples/lightswitch/src/main/java/org/apache/nlpcraft/examples/lightswitch/LightSwitchGroovyModel.groovy
@@ -65,7 +65,7 @@ class LightSwitchGroovyModel extends NCModelFileAdapter {
         @NCIntentTerm("act") NCToken actTok,
         @NCIntentTerm("loc") List<NCToken> locToks) {
         String status = actTok.id == "ls:on" ? "on" : "off"
-        String locations = locToks ? locToks.collect{ it.getOriginalText() 
}.join(", ") : "entire house"
+        String locations = locToks ? locToks*.originalText.join(", ") : 
"entire house"
 
         // Add HomeKit, Arduino or other integration here.
 

Reply via email to