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 2021/07/23 22:50:57 UTC

[incubator-nlpcraft] branch NLPCRAFT-376-TEST-FIX created (now dcdb568)

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

sergeykamov pushed a change to branch NLPCRAFT-376-TEST-FIX
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git.


      at dcdb568  SQL model fixes.

This branch includes the following new commits:

     new dcdb568  SQL model fixes.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[incubator-nlpcraft] 01/01: SQL model fixes.

Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit dcdb5687c96a78558fde84ff4b68efede1fbd747
Author: Sergey Kamov <sk...@gmail.com>
AuthorDate: Sat Jul 24 01:50:47 2021 +0300

    SQL model fixes.
---
 .../sql/src/main/java/org/apache/nlpcraft/examples/sql/SqlModel.scala | 4 +---
 1 file changed, 1 insertion(+), 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..2163a75 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
@@ -400,7 +400,6 @@ class SqlModel extends NCModelFileAdapter("sql_model.yaml") with LazyLogging {
       * cleared between user questions, except for the obvious clarifying questions. We assume that question is being
       * clarified if its tokens satisfy one of criteria:
       *  - all these tokens are values (What about 'Exotic Liquids')
-      *  - all these tokens are columns (Give me 'last name')
       *  - new token is single date token (What about 'tomorrow')
       *  <p>
       *  If new sentence tokens satisfied any of these criteria,
@@ -418,10 +417,9 @@ class SqlModel extends NCModelFileAdapter("sql_model.yaml") with LazyLogging {
                 case Some(col) => col.getValue != null
                 case None => false
             }
-            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)