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

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


The following commit(s) were added to refs/heads/NLPCRAFT-203 by this push:
     new 098dd48  Update NCIntentSolverEngine.scala
098dd48 is described below

commit 098dd48e6078d06636891b46a35a0e8ce47feb10
Author: Aaron Radzinski <[email protected]>
AuthorDate: Tue Dec 29 15:42:18 2020 -0800

    Update NCIntentSolverEngine.scala
---
 .../model/intent/impl/NCIntentSolverEngine.scala   | 28 ++++++++++------------
 1 file changed, 13 insertions(+), 15 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 5897fd1..16105fe 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
@@ -418,25 +418,23 @@ object NCIntentSolverEngine extends LazyLogging with 
NCOpenCensusTrace {
                             intentGrps += TermTokensGroup(termMatch.termId, 
termMatch.usedTokens)
                             lastTermMatch = termMatch
 
-                            logger.whenInfoEnabled {
-                                val tbl = NCAsciiTable()
+                            val tbl = NCAsciiTable()
 
-                                val w = termMatch.weight.toSeq
+                            val w = termMatch.weight.toSeq
 
-                                tbl += (s"${B}Intent ID$RST", 
s"$BO${intent.id}$RST")
-                                tbl += (s"${B}Term$RST", term.toString)
-                                tbl += (s"${B}Match tokens$RST", 
termMatch.usedTokens.map(t ⇒ {
-                                    val txt = t.token.getOriginalText
-                                    val idx = t.token.getIndex
+                            tbl += (s"${B}Intent ID$RST", 
s"$BO${intent.id}$RST")
+                            tbl += (s"${B}Term$RST", term.toString)
+                            tbl += (s"${B}Match tokens$RST", 
termMatch.usedTokens.map(t ⇒ {
+                                val txt = t.token.getOriginalText
+                                val idx = t.token.getIndex
 
-                                    s"$txt${c("[" + idx + "]")}"
-                                }).mkString("|"))
-                                tbl += (s"${B}Match weight$RST",
-                                    s"${y("STK:")}${w.head}, 
${y("CDW:")}${w(1)}, ${y("MIN:")}${w(2)}, ${y("MAX:")}${w(3)}"
-                                )
+                                s"$txt${c("[" + idx + "]")}"
+                            }).mkString("|"))
+                            tbl += (s"${B}Match weight$RST",
+                                s"${y("STK:")}${w.head}, ${y("CDW:")}${w(1)}, 
${y("MIN:")}${w(2)}, ${y("MAX:")}${w(3)}"
+                            )
 
-                                tbl.info(logger, Some("Term match found:"))
-                            }
+                            tbl.info(logger, Some("Term match found:"))
                         }
 
                     case None ⇒

Reply via email to