You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by ar...@apache.org on 2021/02/24 23:56:30 UTC

[incubator-nlpcraft] branch master updated: Quick fixes.

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 0972a5f  Quick fixes.
0972a5f is described below

commit 0972a5fda6326dea51ca32fa487009ec2749ce2b
Author: Aaron Radzinski <ar...@apache.org>
AuthorDate: Wed Feb 24 15:56:20 2021 -0800

    Quick fixes.
---
 .../org/apache/nlpcraft/common/makro/NCMacroCompiler.scala     |  2 +-
 .../nlpcraft/examples/lightswitch/lightswitch_model.yaml       |  8 ++++++--
 .../nlpcraft/probe/mgrs/nlp/NCProbeEnrichmentManager.scala     | 10 ++++++++--
 3 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/makro/NCMacroCompiler.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/makro/NCMacroCompiler.scala
index a4bf877..a8d9d7c 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/common/makro/NCMacroCompiler.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/common/makro/NCMacroCompiler.scala
@@ -29,7 +29,7 @@ import scala.collection.mutable
   *
   */
 object NCMacroCompiler extends LazyLogging {
-    private final val MAX_SYN = 1000
+    private final val MAX_SYN = 10000
     
     /**
       *
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 3055efb..e4744ae 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
@@ -26,6 +26,10 @@ macros:
     macro: "{shut|kill|stop|eliminate}"
   - name: "<ENTIRE_OPT>"
     macro: "{entire|full|whole|total|_}"
+  - name: "<FLOOR_OPT>"
+    macro: "{upstairs|downstairs|{1st|2nd|3rd|4th|5th|top|ground} floor|_}"
+  - name: "<TYPE>"
+    macro: "{room|closet|attic|loft|{store|storage} {room|_}}"
   - name: "<LIGHT>"
     macro: "{all|_} {it|them|light|illumination|lamp|lamplight}"
 enabledBuiltInTokens: [] # This example doesn't use any built-in tokens.
@@ -33,8 +37,8 @@ elements:
   - id: "ls:loc"
     description: "Location of lights."
     synonyms:
-      - "<ENTIRE_OPT> {upstairs|downstairs|_} {kitchen|library|closet|garage|office|playroom|{dinning|laundry|play} room}"
-      - "<ENTIRE_OPT> {upstairs|downstairs|_} {master|kid|children|child|guest|_} {bedroom|bathroom|washroom|storage} {closet|_}"
+      - "<ENTIRE_OPT> <FLOOR_OPT> {kitchen|library|closet|garage|office|playroom|{dinning|laundry|play} <TYPE>}"
+      - "<ENTIRE_OPT> <FLOOR_OPT> {master|kid|children|child|guest|_} {bedroom|bathroom|washroom|storage} {<TYPE>|_}"
       - "<ENTIRE_OPT> {house|home|building|{1st|first} floor|{2nd|second} floor}"
 
   - id: "ls:on"
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/nlp/NCProbeEnrichmentManager.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/nlp/NCProbeEnrichmentManager.scala
index ed1b544..fb5b6cf 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/nlp/NCProbeEnrichmentManager.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/nlp/NCProbeEnrichmentManager.scala
@@ -335,14 +335,20 @@ object NCProbeEnrichmentManager extends NCService with NCOpenCensusModelStats {
                 logger.info(s"" +
                     s"\n" +
                     s"${g("|")}\n" +
-                    s"${g("|")} ${bo(g("SUCCESS"))} result sent back to server [srvReqId=${rv(g(srvReqId))}, type=${resType.getOrElse("")}]\n" +
+                    s"${g("|")} ${bo(g("SUCCESS"))} result sent back to server [" +
+                        s"srvReqId=${rv(g(srvReqId))}, " +
+                        s"type=${resType.getOrElse("")}" +
+                    s"]\n" +
                     s"${g("|")}"
                 )
             else
                 logger.info(s"" +
                     s"\n" +
                     s"${r("|")}\n" +
-                    s"${r("|")} ${bo(r("REJECT"))} result sent back to server [srvReqId=${rv(g(srvReqId))}, response=${errMsg.get}]\n" +
+                    s"${r("|")} ${bo(r("REJECT"))} result sent back to server [" +
+                        s"srvReqId=${rv(g(srvReqId))}, " +
+                        s"response=${errMsg.get}" +
+                    s"]\n" +
                     s"${r("|")}"
                 )
         }