This is an automated email from the ASF dual-hosted git repository. aradzinski 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 05e9219 Update NCIntentSolverEngine.scala 05e9219 is described below commit 05e92199cfde4da53be6f01305f35afccd99cbee Author: Aaron Radzinski <aradzin...@datalingvo.com> AuthorDate: Wed Feb 16 09:39:47 2022 -0800 Update NCIntentSolverEngine.scala WIP --- .../nlpcraft/internal/intent/matcher/NCIntentSolverEngine.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/internal/intent/matcher/NCIntentSolverEngine.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/internal/intent/matcher/NCIntentSolverEngine.scala index a76b5f4..51d48cd 100644 --- a/nlpcraft/src/main/scala/org/apache/nlpcraft/internal/intent/matcher/NCIntentSolverEngine.scala +++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/internal/intent/matcher/NCIntentSolverEngine.scala @@ -25,6 +25,7 @@ import org.apache.nlpcraft.internal.intent.* import java.util.List as JList import java.util.function.Function +import scala.annotation.targetName import scala.collection.mutable import scala.collection.mutable.ArrayBuffer import scala.jdk.CollectionConverters.* @@ -46,6 +47,7 @@ case class NCIntentSolverEngine(dialog: NCDialogFlowManager) extends LazyLogging * @param that Weight to add. * @return */ + @targetName("plusEqual") def +=(that: Weight): Weight = val tmp = mutable.ArrayBuffer[Int]() @@ -279,7 +281,6 @@ case class NCIntentSolverEngine(dialog: NCDialogFlowManager) extends LazyLogging if grp.usedEntities.nonEmpty then var entIdx = 0 - for (e <- grp.usedEntities) val conv = if e.conv then "(conv) " else "" ents += s" #$entIdx: $conv${e.entity}" @@ -532,7 +533,6 @@ case class NCIntentSolverEngine(dialog: NCDialogFlowManager) extends LazyLogging case b: java.lang.Boolean => if b then matchesCnt += 1 - if uses > 0 then usesSum += uses usedEnts += ent