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

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


The following commit(s) were added to refs/heads/NLPCRAFT-477 by this push:
     new 3e82c41  WIP.
3e82c41 is described below

commit 3e82c410edc37baa427e386adc8fb1b1243bd602
Author: Sergey Kamov <[email protected]>
AuthorDate: Mon Feb 7 12:50:30 2022 +0300

    WIP.
---
 .../apache/nlpcraft/internal/intent/matcher/NCIntentSolverVariant.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/internal/intent/matcher/NCIntentSolverVariant.scala
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/internal/intent/matcher/NCIntentSolverVariant.scala
index 3251864..19b67ff 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/internal/intent/matcher/NCIntentSolverVariant.scala
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/internal/intent/matcher/NCIntentSolverVariant.scala
@@ -43,8 +43,8 @@ case class NCIntentSolverVariant(entities: Seq[NCEntity]) 
extends Ordered[NCInte
         val toks: Seq[Seq[NCToken]] = entities.map(_.getTokens.asScala.toSeq)
 
         val toksCnt = toks.map(_.size).sum
-        val totalSparsity = -toks.map(calcSparsity).sum  // Less is better.
         val avgWordsPerEntity = if toksCnt > 0 then 
Math.round((entities.size.toFloat / toksCnt) * 100) else 0
+        val totalSparsity = -toks.map(calcSparsity).sum  // Less is better.
 
         // Order is important.
         Seq(toksCnt, avgWordsPerEntity, totalSparsity)

Reply via email to