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

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


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

commit 59f62d3c05127cf1c9e7475addec4ffa81efe431
Author: Sergey Kamov <[email protected]>
AuthorDate: Mon Aug 30 19:33:29 2021 +0300

    WIP.
---
 .../nlp/enrichers/model/anyword/NCAnyWordSpecAdapters.scala    | 10 +++++-----
 .../nlp/enrichers/model/anyword/NCNestedAnyAlphaNumSpec1.scala |  5 +----
 .../nlp/enrichers/model/anyword/NCNestedAnyNotSpacySpec1.scala |  5 +----
 .../nlp/enrichers/model/anyword/NCNestedAnyRegexSpec1.scala    |  5 +----
 .../nlp/enrichers/model/anyword/NCNestedAnyRegexSpec2.scala    |  3 +--
 .../nlp/enrichers/model/anyword/NCNestedAnyRegexSpec3.scala    |  5 +----
 .../nlp/enrichers/model/anyword/NCNestedAnyRegexSpec4.scala    |  9 ++++-----
 .../nlp/enrichers/model/anyword/NCNestedAnyRegexSpec5.scala    |  3 +--
 8 files changed, 15 insertions(+), 30 deletions(-)

diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCAnyWordSpecAdapters.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCAnyWordSpecAdapters.scala
index 8a087c4..3a4befb 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCAnyWordSpecAdapters.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCAnyWordSpecAdapters.scala
@@ -43,13 +43,13 @@ abstract class NCNestedTestModelAnyAdapter extends 
NCModelAdapter("nlpcraft.test
   */
 abstract class NCNestedAnySpecAdapter extends NCTestContext {
     @Test
-    def test(): Unit = {
+    def testCompose(): Unit = {
         // 1, 2 and 3 any words should be suitable.
-        checkIntent("a t1 t2 t3 b", "compose")
-        checkIntent("a t1 t2 b", "compose")
-        checkIntent("a t1 b", "compose")
+        checkIntent("a any1 any2 any3 b", "compose")
+        checkIntent("a any1 any2 b", "compose")
+        checkIntent("a any1 b", "compose")
 
         // Too many any words.
-        checkFail("a t1 t2 t3 t4 b")
+        checkIntent("a any1 any2 any3 any4 b", "compose")
     }
 }
\ No newline at end of file
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyAlphaNumSpec1.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyAlphaNumSpec1.scala
index 3b160f4..c50cc2e 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyAlphaNumSpec1.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyAlphaNumSpec1.scala
@@ -37,10 +37,7 @@ class NCNestedTestModelAnyAlphaNum1 extends 
NCNestedTestModelAnyAdapter {
             NCTestElement("a"),
             NCTestElement("b"),
             mkNotGreedy("any", "is_alphanum(tok_txt)"),
-            NCTestElement(
-                "compose",
-                "^^{# == 'a'}^^ ^^{# == 'any'}^^ ^^{# == 'b'}^^"
-            )
+            NCTestElement("compose", "^^{# == 'a'}^^ ^^{# == 'any'}^^ ^^{# == 
'b'}^^")
         )
 
     @NCIntent("intent=compose term(x)={# == 'compose'}")
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyNotSpacySpec1.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyNotSpacySpec1.scala
index 6c8e3ba..0e9aa09 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyNotSpacySpec1.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyNotSpacySpec1.scala
@@ -37,10 +37,7 @@ class NCNestedTestModelAnyAlphaNum1 extends 
NCNestedTestModelAnyAdapter {
             NCTestElement("a"),
             NCTestElement("b"),
             mkNotGreedy("any", "tok_txt != ' '"),
-            NCTestElement(
-                "compose",
-                "^^{# == 'a'}^^ ^^{# == 'any'}^^ ^^{# == 'b'}^^"
-            )
+            NCTestElement("compose", "^^{# == 'a'}^^ ^^{# == 'any'}^^ ^^{# == 
'b'}^^")
         )
 
     @NCIntent("intent=compose term(x)={# == 'compose'}")
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec1.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec1.scala
index 6fde495..9b58c1f 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec1.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec1.scala
@@ -37,10 +37,7 @@ class NCNestedTestModelAnyRegex1 extends 
NCNestedTestModelAnyAdapter {
             NCTestElement("a"),
             NCTestElement("b"),
             mkNotGreedy("any", "{//[a-zA-Z0-9]+//}[1, 3]"),
-            NCTestElement(
-                "compose",
-                "^^{# == 'a'}^^ ^^{# == 'any'}^^ ^^{# == 'b'}^^"
-            )
+            NCTestElement("compose", "^^{# == 'a'}^^ ^^{# == 'any'}^^ ^^{# == 
'b'}^^")
         )
 
     @NCIntent("intent=compose term(x)={# == 'compose'}")
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec2.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec2.scala
index 43887f1..6a4dd8f 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec2.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec2.scala
@@ -38,8 +38,7 @@ class NCNestedTestModelAnyRegex2 extends 
NCNestedTestModelAnyAdapter {
             NCTestElement("b"),
             mkNotGreedy("any", "{//[a-zA-Z0-9]+//}[1, 3]"),
             NCTestElement(
-                "compose",
-                "^^{# == 'a'}^^ ^^{# == 'any' && tok_is_between_ids('a', 'b') 
== true}^^ ^^{# == 'b'}^^"
+                "compose", "^^{# == 'a'}^^ ^^{# == 'any' && 
tok_is_between_ids('a', 'b') == true}^^ ^^{# == 'b'}^^"
             )
         )
 
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec3.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec3.scala
index 413d9d1..ce70b2e 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec3.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec3.scala
@@ -35,10 +35,7 @@ class NCNestedTestModelAnyRegex3 extends 
NCNestedTestModelAnyAdapter {
         Set(
             NCTestElement("a"),
             NCTestElement("b"),
-            NCTestElement(
-                "compose",
-                "^^{# == 'a'}^^ {//[a-zA-Z0-9]+//}[1, 3] ^^{# == 'b'}^^"
-            )
+            NCTestElement("compose", "^^{# == 'a'}^^ {//[a-zA-Z0-9]+//}[1, 3] 
^^{# == 'b'}^^")
         )
 
     @NCIntent("intent=compose term(x)={# == 'compose'}")
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec4.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec4.scala
index 0bffdf0..04ca2cc 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec4.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec4.scala
@@ -40,11 +40,10 @@ class NCNestedTestModelAnyRegex4 extends 
NCNestedTestModelAnyAdapter {
         )
 
     @NCIntent(
-        "intent=compose " +
-            "    options={'ordered': true, 'unused_free_words': false}" +
-            "    term(a)={# == 'a'}" +
-            "    term(any)={# == 'any'}[1,3] " +
-            "    term(b)={# == 'b'}"
+        "intent=compose options={'ordered': true, 'unused_free_words': false} 
" +
+        "    term(a)={# == 'a'}" +
+        "    term(any)={# == 'any'}[1,3] " +
+        "    term(b)={# == 'b'}"
     )
     private def onCompose(): NCResult = NCResult.text("OK")
 }
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec5.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec5.scala
index 2861f1e..27e2d92 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec5.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec5.scala
@@ -40,8 +40,7 @@ class NCNestedTestModelAnyRegex5 extends 
NCNestedTestModelAnyAdapter {
         )
 
     @NCIntent(
-        "intent=compose " +
-        "    options={'ordered': true, 'unused_free_words': false}" +
+        "intent=compose options={'ordered': true, 'unused_free_words': false} 
" +
         "    term(a)={# == 'a'}" +
         "    term(any)={# == 'any' && tok_is_between_ids('a', 'b') == 
true}[1,3] " +
         "    term(b)={# == 'b'}"

Reply via email to