You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by se...@apache.org on 2020/09/18 07:10:18 UTC

[incubator-nlpcraft] 03/12: WIP.

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

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

commit 3a21be060c99c25192140dc7bff22ccd6110f005
Author: Aaron Radzinski <ar...@datalingvo.com>
AuthorDate: Wed Sep 16 12:39:31 2020 -0700

    WIP.
---
 .../apache/nlpcraft/model/intent/impl/NCIntentSolverEngine.scala    | 3 +++
 .../apache/nlpcraft/model/intent/impl/NCIntentSolverVariant.scala   | 6 +++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/NCIntentSolverEngine.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/NCIntentSolverEngine.scala
index 1e0e6cb..ed8a900 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/NCIntentSolverEngine.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/NCIntentSolverEngine.scala
@@ -436,12 +436,14 @@ object NCIntentSolverEngine extends LazyLogging with NCOpenCensusTrace {
                         // Term is missing. Stop further processing for this intent.
                         // This intent cannot be matched.
                         logger.trace(s"Term '$term' is missing for intent '$intentId' (stopping further processing).")
+
                         abort = true
                 }
             }
             
             if (abort) {
                 logger.info(s"Intent '$intentId' didn't match because of missing term $varStr.")
+
                 None
             }
             else if (senToks.exists(tok ⇒ !tok.used && tok.token.isUserDefined)) {
@@ -457,6 +459,7 @@ object NCIntentSolverEngine extends LazyLogging with NCOpenCensusTrace {
             }
             else if (!senToks.exists(tok ⇒ tok.used && !tok.conv)) {
                 logger.info(s"Intent '$intentId' didn't match because all tokens came from STM $varStr.")
+
                 None
             }
             else {
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/NCIntentSolverVariant.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/NCIntentSolverVariant.scala
index 0716494..a9e3aa9 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/NCIntentSolverVariant.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/NCIntentSolverVariant.scala
@@ -82,11 +82,11 @@ case class NCIntentSolverVariant(tokens: util.List[NCToken]) extends Ordered[NCI
 
     override def toString: String =
         s"Variant [" +
-        s"userToks=$userToks" +
+            s"userToks=$userToks" +
             s", wordCnt=$wordCnt" +
-        s", totalUserDirect=$totalUserDirect" +
+            s", totalUserDirect=$totalUserDirect" +
             s", avgWordsPerTok=$avgWordsPerTok" +
-        s", sparsity=$totalSparsity" +
+            s", sparsity=$totalSparsity" +
             s", toks=$tokens" +
         "]"
 }
\ No newline at end of file