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 88f59b9  WIP.
88f59b9 is described below

commit 88f59b9e67970354a7c4588c304920474068e6ee
Author: Aaron Radzinski <[email protected]>
AuthorDate: Fri Mar 12 18:27:51 2021 -0800

    WIP.
---
 .../scala/org/apache/nlpcraft/examples/sql/SqlModel.scala  | 14 +++++++-------
 .../scala/org/apache/nlpcraft/model/NCIntentDslSpec.scala  |  6 +++---
 .../scala/org/apache/nlpcraft/model/NCIntentDslSpec2.scala | 10 +++++-----
 .../org/apache/nlpcraft/model/NCIntentPrioritiesSpec.scala |  4 ++--
 .../model/abstract/NCAbstractTokensIntentsSpec.scala       |  8 ++++----
 .../nlpcraft/model/conversation/NCConversationSpec.scala   |  2 +-
 .../model/conversation/NCConversationTimeoutSpec.scala     |  2 +-
 .../org/apache/nlpcraft/model/dialog/NCDialogSpec.scala    |  8 ++++----
 .../nlpcraft/model/properties/NCTokensPropertiesSpec.scala |  4 ++--
 .../model/properties/NCTokensRestrictionsSpec.scala        |  8 ++++----
 .../apache/nlpcraft/model/synonyms/NCSynonymsSpec.scala    |  8 ++++----
 .../nlp/enrichers/model/NCEnricherNestedModelSpec2.scala   |  4 ++--
 .../nlp/enrichers/model/NCEnricherNestedModelSpec3.scala   |  2 +-
 .../nlp/enrichers/model/NCEnricherNestedModelSpec4.scala   |  2 +-
 14 files changed, 41 insertions(+), 41 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 018afb1..63cecb1 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
@@ -279,13 +279,13 @@ class SqlModel extends 
NCModelFileAdapter("org/apache/nlpcraft/examples/sql/sql_
     @NCIntent(
         "intent=commonReport " +
         "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(sort)~{id == 'nlpcraft:sort'}? " +
-        "term(limit)~{id == 'nlpcraft:limit'}?"
+        "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(sort)~{id() == 'nlpcraft:sort'}? " +
+        "term(limit)~{id() == 'nlpcraft:limit'}?"
     )
     @NCIntentSample(Array(
         "order date, please!",
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/NCIntentDslSpec.scala 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/NCIntentDslSpec.scala
index a9dcd83..09351b8 100644
--- a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/NCIntentDslSpec.scala
+++ b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/NCIntentDslSpec.scala
@@ -36,13 +36,13 @@ class NCIntentDslSpecModel extends NCModelAdapter(
     override def getElements: util.Set[NCElement] = Set(NCTestElement("paris"))
 
     // Moscow population filter.
-    @NCIntent("intent=bigCity term(city)={id == 'nlpcraft:city' && 
~nlpcraft:city:citymeta['population'] >= 10381222}")
+    @NCIntent("intent=bigCity term(city)={id() == 'nlpcraft:city' && 
~nlpcraft:city:citymeta['population'] >= 10381222}")
     private def onBigCity(ctx: NCIntentMatch): NCResult = "OK"
 
-    @NCIntent("intent=otherCity term(city)={id == 'nlpcraft:city' }")
+    @NCIntent("intent=otherCity term(city)={id() == 'nlpcraft:city' }")
     private def onOtherCity(ctx: NCIntentMatch): NCResult = "OK"
 
-    @NCIntent("intent=userElement term(x)={id == 'paris' }")
+    @NCIntent("intent=userElement term(x)={id() == 'paris' }")
     private def onUserElement(ctx: NCIntentMatch): NCResult = "OK"
 }
 
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/NCIntentDslSpec2.scala 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/NCIntentDslSpec2.scala
index 4135adf..051f85b 100644
--- a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/NCIntentDslSpec2.scala
+++ b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/NCIntentDslSpec2.scala
@@ -31,19 +31,19 @@ class NCIntentDslSpecModel2 extends NCModelAdapter(
 ) {
     override def getElements: util.Set[NCElement] = Set(NCTestElement("a"))
 
-    @NCIntent("intent=a_11 term(a)={id == 'a'}")
+    @NCIntent("intent=a_11 term(a)={id() == 'a'}")
     private def a11(ctx: NCIntentMatch): NCResult = NCResult.text("OK")
 
-    @NCIntent("intent=a_23 term(a)={id == 'a'}[2,3]")
+    @NCIntent("intent=a_23 term(a)={id() == 'a'}[2,3]")
     private def a23(ctx: NCIntentMatch): NCResult = NCResult.text("OK")
 
-    @NCIntent("intent=a_15 term(a)={id == 'a'}[1,5]")
+    @NCIntent("intent=a_15 term(a)={id() == 'a'}[1,5]")
     private def a15(ctx: NCIntentMatch): NCResult = NCResult.text("OK")
 
-    @NCIntent("intent=a_plus term(a)={id == 'a'}+")
+    @NCIntent("intent=a_plus term(a)={id() == 'a'}+")
     private def a1Inf(ctx: NCIntentMatch): NCResult = NCResult.text("OK")
 
-    @NCIntent("intent=a_star term(a)={id == 'a'}*")
+    @NCIntent("intent=a_star term(a)={id() == 'a'}*")
     private def a0Inf(ctx: NCIntentMatch): NCResult = NCResult.text("OK")
 }
 
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/NCIntentPrioritiesSpec.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/NCIntentPrioritiesSpec.scala
index 60a2465..940b70b 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/NCIntentPrioritiesSpec.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/NCIntentPrioritiesSpec.scala
@@ -31,10 +31,10 @@ class NCIntentPrioritiesSpecModel extends NCModelAdapter(
 ) {
     override def getElements: util.Set[NCElement] = Set(NCTestElement("x"))
 
-    @NCIntent("intent=low term(x)={id == 'x'} term(city)={id == 
'nlpcraft:city'}?")
+    @NCIntent("intent=low term(x)={id() == 'x'} term(city)={id() == 
'nlpcraft:city'}?")
     private def onLow(ctx: NCIntentMatch): NCResult = NCResult.text("low")
 
-    @NCIntent("intent=high term(x)={id == 'x'} term(city)={id == 
'nlpcraft:city'}")
+    @NCIntent("intent=high term(x)={id() == 'x'} term(city)={id() == 
'nlpcraft:city'}")
     private def onHigh(ctx: NCIntentMatch): NCResult = NCResult.text("high")
 }
 
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/abstract/NCAbstractTokensIntentsSpec.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/abstract/NCAbstractTokensIntentsSpec.scala
index 1f5635d..99fe178 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/abstract/NCAbstractTokensIntentsSpec.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/abstract/NCAbstractTokensIntentsSpec.scala
@@ -22,16 +22,16 @@ import org.apache.nlpcraft.{NCTestContext, 
NCTestEnvironment}
 import org.junit.jupiter.api.Test
 
 class NCAbstractTokensModelIntents extends NCAbstractTokensModel {
-    @NCIntent("intent=wrapAnyWordIntent term(t)={id == 'wrapAnyWord'}")
+    @NCIntent("intent=wrapAnyWordIntent term(t)={id() == 'wrapAnyWord'}")
     private def onWrapInternal(ctx: NCIntentMatch): NCResult = 
NCResult.text("OK")
 
-    @NCIntent("intent=wrapNumIntent term(t)={id == 'wrapNum'}")
+    @NCIntent("intent=wrapNumIntent term(t)={id() == 'wrapNum'}")
     private def onWrapNum(ctx: NCIntentMatch): NCResult = NCResult.text("OK")
 
-    @NCIntent("intent=wrapLimitWrapAnyWord term(t1)={id == 'wrapLimit'} 
term(t2)={id == 'wrapAnyWord'}")
+    @NCIntent("intent=wrapLimitWrapAnyWord term(t1)={id() == 'wrapLimit'} 
term(t2)={id() == 'wrapAnyWord'}")
     private def wrapLimitWrapAnyWord(ctx: NCIntentMatch): NCResult = 
NCResult.text("OK")
 
-    @NCIntent("intent=wrapWrapLimit term(t1)={id == 'wrapWrapLimit'} 
term(t2)={id == 'wrapAnyWord'}")
+    @NCIntent("intent=wrapWrapLimit term(t1)={id() == 'wrapWrapLimit'} 
term(t2)={id() == 'wrapAnyWord'}")
     private def wrapWrapLimit(ctx: NCIntentMatch): NCResult = 
NCResult.text("OK")
 }
 
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/conversation/NCConversationSpec.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/conversation/NCConversationSpec.scala
index fc846e6..0b0dfe8 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/conversation/NCConversationSpec.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/conversation/NCConversationSpec.scala
@@ -35,7 +35,7 @@ class NCConversationSpecModel extends NCModel {
     override def getElements: util.Set[NCElement] = 
Set(NCTestElement("test1"), NCTestElement("test2"))
 
     // 'test1' is mandatory, 'test2' is optional.
-    @NCIntent("intent=testIntentId term~{id == 'test1'} term~{id == 'test2'}?")
+    @NCIntent("intent=testIntentId term~{id() == 'test1'} term~{id() == 
'test2'}?")
     def onMatch(): NCResult = NCResult.text("ok")
 }
 
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/conversation/NCConversationTimeoutSpec.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/conversation/NCConversationTimeoutSpec.scala
index 680183e..bcec33d 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/conversation/NCConversationTimeoutSpec.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/conversation/NCConversationTimeoutSpec.scala
@@ -47,7 +47,7 @@ class NCTimeoutSpecModel extends NCModel {
 
     override def getElements: util.Set[NCElement] = Collections.singleton(new 
NCTestElement("test"))
 
-    @NCIntent("intent=req term~{id == 'test'}")
+    @NCIntent("intent=req term~{id() == 'test'}")
     def onMatch(ctx: NCIntentMatch): NCResult = {
         val conv = ctx.getContext.getConversation
 
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/dialog/NCDialogSpec.scala 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/dialog/NCDialogSpec.scala
index 31fe770..5d5a0b7 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/dialog/NCDialogSpec.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/dialog/NCDialogSpec.scala
@@ -35,16 +35,16 @@ class NCDialogSpecModel extends NCModel {
     override def getElements: util.Set[NCElement] =
         Set((for (ch ← 'a' to 'y'; i ← 1 to 9) yield 
NCTestElement(s"$ch$i")):_*)
 
-    @NCIntent("intent=onA1 term~{id == 'a1'}")
+    @NCIntent("intent=onA1 term~{id() == 'a1'}")
     def onA1(): NCResult = NCResult.text("ok")
 
-    @NCIntent("intent=onA2 flow='^(?:onA1)(^:onA1)*$' term~{id == 'a2'}")
+    @NCIntent("intent=onA2 flow='^(?:onA1)(^:onA1)*$' term~{id() == 'a2'}")
     def onA2(): NCResult = NCResult.text("ok")
 
-    @NCIntent("intent=onA3 flow='onA1' term~{id == 'a3'}")
+    @NCIntent("intent=onA3 flow='onA1' term~{id() == 'a3'}")
     def onA3(): NCResult = NCResult.text("ok")
 
-    @NCIntent("intent=onA4 flow='onA1 onA1' term~{id == 'a4'}")
+    @NCIntent("intent=onA4 flow='onA1 onA1' term~{id() == 'a4'}")
     def onA4(): NCResult = NCResult.text("ok")
 }
 
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/properties/NCTokensPropertiesSpec.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/properties/NCTokensPropertiesSpec.scala
index 20bbb56..fffd3a3 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/properties/NCTokensPropertiesSpec.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/properties/NCTokensPropertiesSpec.scala
@@ -30,10 +30,10 @@ abstract class NCTokenPropertiesModelAbstract extends 
NCModelAdapter(
 ) {
     override def getElements: util.Set[NCElement] = Set(NCTestElement("ab", "a 
b"), NCTestElement("xy", "x y"))
 
-    @NCIntent("intent=onAB term(t)={id == 'ab'}")
+    @NCIntent("intent=onAB term(t)={id() == 'ab'}")
     def onAB(ctx: NCIntentMatch): NCResult = NCResult.text("OK")
 
-    @NCIntent("intent=onXY term(t)={id == 'xy'}")
+    @NCIntent("intent=onXY term(t)={id() == 'xy'}")
     def onXY(ctx: NCIntentMatch): NCResult = NCResult.text("OK")
 }
 
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/properties/NCTokensRestrictionsSpec.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/properties/NCTokensRestrictionsSpec.scala
index 2a1392d..f3137a1 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/properties/NCTokensRestrictionsSpec.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/properties/NCTokensRestrictionsSpec.scala
@@ -29,16 +29,16 @@ class NCTokensRestrictionsModelAbstract extends 
NCModelAdapter(
 ) {
     override def getElements: util.Set[NCElement] = Set(NCTestElement("a"))
 
-    @NCIntent("intent=onA term(t)={id == 'a'}+")
+    @NCIntent("intent=onA term(t)={id() == 'a'}+")
     def onA(ctx: NCIntentMatch): NCResult = NCResult.text("OK")
 
-    @NCIntent("intent=onLimit term(t)={id == 'nlpcraft:limit'} term(a)={id == 
'a'}")
+    @NCIntent("intent=onLimit term(t)={id() == 'nlpcraft:limit'} term(a)={id() 
== 'a'}")
     def onLimit(ctx: NCIntentMatch): NCResult = NCResult.text("OK")
 
-    @NCIntent("intent=onSort term(t)={id == 'nlpcraft:sort'} term(a)={id == 
'a'}")
+    @NCIntent("intent=onSort term(t)={id() == 'nlpcraft:sort'} term(a)={id() 
== 'a'}")
     def onSort(ctx: NCIntentMatch): NCResult = NCResult.text("OK")
 
-    @NCIntent("intent=onRelation term(t)={id == 'nlpcraft:relation'} 
term(a)={id == 'a'}[2,2]")
+    @NCIntent("intent=onRelation term(t)={id() == 'nlpcraft:relation'} 
term(a)={id() == 'a'}[2,2]")
     def onRelation(ctx: NCIntentMatch): NCResult = NCResult.text("OK")
 }
 
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/synonyms/NCSynonymsSpec.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/synonyms/NCSynonymsSpec.scala
index efde9da..73627e9 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/synonyms/NCSynonymsSpec.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/synonyms/NCSynonymsSpec.scala
@@ -42,16 +42,16 @@ class NCSynonymsSpecModel extends 
NCModelAdapter("nlpcraft.syns.test.mdl", "Syno
             NCTestElement("e4", "{^^(id == 'e1')^^}[3, 3]")
         )
 
-    @NCIntent("intent=onE1 term(t)={id == 'e1'}")
+    @NCIntent("intent=onE1 term(t)={id() == 'e1'}")
     def onE1(ctx: NCIntentMatch): NCResult = NCResult.text("OK")
 
-    @NCIntent("intent=onE2 term(t)={id == 'e2'}")
+    @NCIntent("intent=onE2 term(t)={id() == 'e2'}")
     def onE2(ctx: NCIntentMatch): NCResult = NCResult.text("OK")
 
-    @NCIntent("intent=onE3 term(t)={id == 'e3'}")
+    @NCIntent("intent=onE3 term(t)={id() == 'e3'}")
     def onE3(ctx: NCIntentMatch): NCResult = NCResult.text("OK")
 
-    @NCIntent("intent=onE4 term(t)={id == 'e4'}")
+    @NCIntent("intent=onE4 term(t)={id() == 'e4'}")
     def onE4(ctx: NCIntentMatch): NCResult = NCResult.text("OK")
 }
 
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCEnricherNestedModelSpec2.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCEnricherNestedModelSpec2.scala
index af8e2b2..2dbf7f1 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCEnricherNestedModelSpec2.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCEnricherNestedModelSpec2.scala
@@ -30,10 +30,10 @@ class NCNestedTestModel21 extends 
NCModelAdapter("nlpcraft.nested2.test.mdl", "N
     override def getElements: util.Set[NCElement] =
         Set(NCTestElement("e1", "{^^(id == 'nlpcraft:num')^^|_} word"))
 
-    @NCIntent("intent=onE1 term(t1)={id == 'e1'}")
+    @NCIntent("intent=onE1 term(t1)={id() == 'e1'}")
     def onAB(ctx: NCIntentMatch): NCResult = NCResult.text("OK")
 
-    @NCIntent("intent=onNumAndE1 term(t1)={id == 'nlpcraft:num'} term(t1)={id 
== 'e1'}")
+    @NCIntent("intent=onNumAndE1 term(t1)={id() == 'nlpcraft:num'} 
term(t1)={id() == 'e1'}")
     def onNumAndE1(ctx: NCIntentMatch): NCResult = NCResult.text("OK")
 
     override def isPermutateSynonyms: Boolean = false
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCEnricherNestedModelSpec3.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCEnricherNestedModelSpec3.scala
index 8fc474b..d065386 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCEnricherNestedModelSpec3.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCEnricherNestedModelSpec3.scala
@@ -39,7 +39,7 @@ class NCNestedTestModel3 extends NCModelAdapter(
     override def getAbstractTokens: util.Set[String] = Set("e1").asJava
     override def getEnabledBuiltInTokens: util.Set[String] = 
Set.empty[String].asJava
 
-    @NCIntent("intent=onE2 term(t1)={id == 'e2'}[12, 100]")
+    @NCIntent("intent=onE2 term(t1)={id() == 'e2'}[12, 100]")
     def onAB(ctx: NCIntentMatch): NCResult = NCResult.text("OK")
 }
 
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCEnricherNestedModelSpec4.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCEnricherNestedModelSpec4.scala
index 9c696c2..5c89eb2 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCEnricherNestedModelSpec4.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCEnricherNestedModelSpec4.scala
@@ -39,7 +39,7 @@ class NCNestedTestModel4 extends NCModelAdapter(
     override def getAbstractTokens: util.Set[String] = Set("e1").asJava
     override def getEnabledBuiltInTokens: util.Set[String] = 
Set.empty[String].asJava
 
-    @NCIntent("intent=onE2 term(t1)={id == 'e2'}[8, 100]")
+    @NCIntent("intent=onE2 term(t1)={id() == 'e2'}[8, 100]")
     def onAB(ctx: NCIntentMatch): NCResult = NCResult.text("OK")
 }
 

Reply via email to