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/07/23 15:59:39 UTC

[incubator-nlpcraft] branch NLPCRAFT-369 updated: Quick fix on IDL syntax in tests for NLPCRAFT-369.

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

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


The following commit(s) were added to refs/heads/NLPCRAFT-369 by this push:
     new fdbcc35  Quick fix on IDL syntax in tests for NLPCRAFT-369.
fdbcc35 is described below

commit fdbcc351ee537a1256a2971f97e0b9ea393627aa
Author: Aaron Radzinski <ar...@datalingvo.com>
AuthorDate: Fri Jul 23 08:59:27 2021 -0700

    Quick fix on IDL syntax in tests for NLPCRAFT-369.
---
 .../scala/org/apache/nlpcraft/model/intent/NCIdlIntentOptions.scala     | 2 +-
 .../scala/org/apache/nlpcraft/model/intent/compiler/NCIdlCompiler.scala | 2 +-
 .../org/apache/nlpcraft/model/intent/solver/NCIntentSolverEngine.scala  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/NCIdlIntentOptions.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/NCIdlIntentOptions.scala
index 4640657..b8d70c7 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/NCIdlIntentOptions.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/NCIdlIntentOptions.scala
@@ -34,7 +34,7 @@ object NCIdlIntentOptions {
     */
     final val JSON_UNUSED_FREE_WORDS = "unused_free_words"
     final val JSON_UNUSED_SYS_TOKS = "unused_sys_toks"
-    final val JSON_UNUSED_USER_TOKS = "unused_user_toks"
+    final val JSON_UNUSED_USR_TOKS = "unused_usr_toks"
     final val JSON_ALLOW_STM_ONLY = "allow_stm_only"
     final val JSON_ORDERED = "ordered"
 }
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/compiler/NCIdlCompiler.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/compiler/NCIdlCompiler.scala
index 0324f57..95928cd 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/compiler/NCIdlCompiler.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/compiler/NCIdlCompiler.scala
@@ -147,7 +147,7 @@ object NCIdlCompiler extends LazyLogging {
                     opts.ignoreUnusedFreeWords = boolVal(k, v)
                 else if (k == JSON_UNUSED_SYS_TOKS)
                     opts.ignoreUnusedSystemTokens = boolVal(k, v)
-                else if (k == JSON_UNUSED_USER_TOKS)
+                else if (k == JSON_UNUSED_USR_TOKS)
                     opts.ignoreUnusedUserTokens = boolVal(k, v)
                 else if (k == JSON_ALLOW_STM_ONLY)
                     opts.allowStmTokenOnly = boolVal(k, v)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/solver/NCIntentSolverEngine.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/solver/NCIntentSolverEngine.scala
index c939a05..8a98b90 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/solver/NCIntentSolverEngine.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/solver/NCIntentSolverEngine.scala
@@ -574,7 +574,7 @@ object NCIntentSolverEngine extends LazyLogging with NCOpenCensusTrace {
                         logger,
                         Some(
                             s"Intent '$intentId' ${bo(r("did not match"))} because of unused user tokens $varStr. " +
-                            s"See intent '${c(JSON_UNUSED_USER_TOKS)}' option. " +
+                            s"See intent '${c(JSON_UNUSED_USR_TOKS)}' option. " +
                             s"Unused user tokens:"
                         )
                     )