This is an automated email from the ASF dual-hosted git repository. sergeykamov pushed a commit to branch NLPCRAFT-376 in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
commit aea073381791d8e3f471f6e0dfea8d7d321ab567 Author: Sergey Kamov <[email protected]> AuthorDate: Fri Jul 23 11:46:11 2021 +0300 WIP. --- .../sql/src/main/java/org/apache/nlpcraft/examples/sql/SqlModel.scala | 2 +- .../org/apache/nlpcraft/models/stm/NCStmIndexesTestModelSpec.scala | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nlpcraft-examples/sql/src/main/java/org/apache/nlpcraft/examples/sql/SqlModel.scala b/nlpcraft-examples/sql/src/main/java/org/apache/nlpcraft/examples/sql/SqlModel.scala index 181ae8b..6e5753f 100644 --- a/nlpcraft-examples/sql/src/main/java/org/apache/nlpcraft/examples/sql/SqlModel.scala +++ b/nlpcraft-examples/sql/src/main/java/org/apache/nlpcraft/examples/sql/SqlModel.scala @@ -421,7 +421,7 @@ class SqlModel extends NCModelFileAdapter("sql_model.yaml") with LazyLogging { def isColumn(t: NCToken): Boolean = findAnyColumnTokenOpt(t).isDefined def isDate(t: NCToken): Boolean = t.getId == "nlpcraft:date" - val ok = toks.forall(isValue) || toks.forall(isColumn) || toks.size == 1 && isDate(toks.head) + val ok = toks.forall(isValue) || toks.size == 1 && isDate(toks.head) if (!ok) { m.getContext.getConversation.clearStm(_ => true) diff --git a/nlpcraft/src/test/scala/org/apache/nlpcraft/models/stm/NCStmIndexesTestModelSpec.scala b/nlpcraft/src/test/scala/org/apache/nlpcraft/models/stm/NCStmIndexesTestModelSpec.scala index 801103d..9965597 100644 --- a/nlpcraft/src/test/scala/org/apache/nlpcraft/models/stm/NCStmIndexesTestModelSpec.scala +++ b/nlpcraft/src/test/scala/org/apache/nlpcraft/models/stm/NCStmIndexesTestModelSpec.scala @@ -51,12 +51,12 @@ class NCStmIndexesTestModel extends NCModelAdapter("nlpcraft.stm.idxs.test", "ST def str(t: NCToken): String = s"${t.origText}(${t.index})" println(s"variant: ${ctx.getVariant.asScala.map(str).mkString("|")}") + println(s"variant sort bynotes: $bynotes") + println(s"variant sort byindexes: $byindexes") println(s"variant freeTokens: ${ctx.getVariant.getFreeTokens.asScala.map(str).mkString("|")}") println(s"variant matchedTokens: ${ctx.getVariant.getMatchedTokens.asScala.map(str).mkString("|")}") println(s"variant userDefinedTokens: ${ctx.getVariant.getUserDefinedTokens.asScala.map(str).mkString("|")}") println(s"variant conversation: ${ctx.getContext.getConversation.getTokens.asScala.map(str).mkString("|")}") - println(s"bynotes: $bynotes") - println(s"byindexes: $byindexes") NCResult.text("OK") }
