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

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


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

commit 1c4a3106c0f96d26e75596d875a12ad1e2f1185d
Author: Aaron Radzinzski <[email protected]>
AuthorDate: Wed Mar 10 19:49:19 2021 -0800

    WIP.
---
 .../org/apache/nlpcraft/examples/sql/SqlModel.scala    | 16 ++++++++--------
 .../org/apache/nlpcraft/examples/sql/sql_model.yaml    | 18 +++++++++---------
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/sql/SqlModel.scala 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/sql/SqlModel.scala
index a837967..018afb1 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/sql/SqlModel.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/sql/SqlModel.scala
@@ -340,14 +340,14 @@ class SqlModel extends 
NCModelFileAdapter("org/apache/nlpcraft/examples/sql/sql_
       */
     @NCIntent(
         "intent=customSortReport " +
-        "term(sort)~{id == 'sort:best' || id == 'sort:worst'} " +
-        "term(tbls)~{groups @@ 'table'}[0,7] " +
-        "term(cols)~{id == 'col:date' || id == 'col:num' || id == 
'col:varchar'}[0,7] " +
-        "term(condNums)~{id == 'condition:num'}[0,7] " +
-        "term(condVals)~{id == 'condition:value'}[0,7] " +
-        "term(condDates)~{id == 'condition:date'}[0,7] " +
-        "term(condFreeDate)~{id == 'nlpcraft:date'}? " +
-        "term(limit)~{id == 'nlpcraft:limit'}?"
+            "term(sort)~{id() == 'sort:best' || id() == 'sort:worst'} " +
+            "term(tbls)~{has(groups(), 'table')}[0,7] " +
+            "term(cols)~{id() == 'col:date' || id() == 'col:num' || id() == 
'col:varchar'}[0,7] " +
+            "term(condNums)~{id() == 'condition:num'}[0,7] " +
+            "term(condVals)~{id() == 'condition:value'}[0,7] " +
+            "term(condDates)~{id() == 'condition:date'}[0,7] " +
+            "term(condFreeDate)~{id() == 'nlpcraft:date'}? " +
+            "term(limit)~{id() == 'nlpcraft:limit'}?"
     )
     @NCIntentSample(Array(
         "What are the least performing categories for the last quarter?"
diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/sql/sql_model.yaml 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/sql/sql_model.yaml
index fdfdb4e..063b267 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/sql/sql_model.yaml
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/examples/sql/sql_model.yaml
@@ -1445,43 +1445,43 @@ elements:
   groups:
     - "element"
   synonyms:
-    - "^^[colName](groups @@ 'column' && value == null)^^"
+    - "^^[colName](has(groups(), 'column') && value() == null)^^"
 - id: "col:val"
   groups:
     - "element"
   synonyms:
-    - "^^[colVal](groups @@ 'column' && value != null)^^"
+    - "^^[colVal](has(groups(), 'column') && value() != null)^^"
 - id: "col:num"
   groups:
     - "element"
   synonyms:
-    - "^^id == 'col' && colName.~sql:datatype == (4, 8)^^"
+    - "^^id() == 'col' && has(list(4, 8), meta_part(part('colName'), 
'sql:datatype'))^^"
 - id: "col:date"
   groups:
     - "element"
   synonyms:
-    - "^^id == 'col' && colName.~sql:datatype == 91^^"
+    - "^^id() == 'col' && meta_part(part('colName'), 'sql:datatype') == 91^^"
 - id: "col:varchar"
   groups:
     - "element"
   synonyms:
-    - "^^id == 'col' && colName.~sql:datatype == 12^^"
+    - "^^id() == 'col' && meta_part(part('colName'), 'sql:datatype') == 12^^"
 - id: "condition:num"
   groups:
     - "condition"
   synonyms:
-    - "^^id == 'col:num'^^ ^^id == 'nlpcraft:num'^^ "
+    - "^^id() == 'col:num'^^ ^^id() == 'nlpcraft:num'^^ "
 - id: "condition:value"
   groups:
     - "condition"
   synonyms:
-    - "^^id == 'col:varchar'^^ {is|equal|_} ^^id == 'col:val'^^"
-    - "^^id == 'col:val'^^"
+    - "^^id() == 'col:varchar'^^ {is|equal|_} ^^id() == 'col:val'^^"
+    - "^^id() == 'col:val'^^"
 - id: "condition:date"
   groups:
     - "condition"
   synonyms:
-    - "^^id == 'col:date'^^ ^^id == 'nlpcraft:date'^^ "
+    - "^^id() == 'col:date'^^ ^^id() == 'nlpcraft:date'^^ "
 - id: "sort:best"
   groups:
     - "Sort criteria"

Reply via email to