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 26b4139  WIP.
26b4139 is described below

commit 26b413972a734a1a068e4c240c2831376bff3b6a
Author: Sergey Kamov <[email protected]>
AuthorDate: Mon Aug 30 22:56:42 2021 +0300

    WIP.
---
 .../enrichers/model/anyword/NCNestedAnySpec.scala  | 64 ++++++++++++++++++++++
 ...dapters.scala => NCNestedModelAnyAdapter.scala} | 21 +------
 .../NCNestedTestModelAnyAlphaNum1.scala}           | 12 ++--
 .../NCNestedTestModelAnyRegex1.scala}              | 12 ++--
 .../NCNestedTestModelAnyRegex2.scala}              | 12 ++--
 .../NCNestedTestModelAnyRegex3.scala}              | 12 ++--
 .../NCNestedTestModelAnyRegex4.scala}              | 12 ++--
 .../NCNestedTestModelAnyRegex5.scala}              | 12 ++--
 .../NCNestedTestModelAnyNotSpace1.scala}           | 14 ++---
 9 files changed, 103 insertions(+), 68 deletions(-)

diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnySpec.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnySpec.scala
new file mode 100644
index 0000000..1513658
--- /dev/null
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnySpec.scala
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword
+
+import 
org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword.alphanum.NCNestedTestModelAnyAlphaNum1
+import org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword.regex._
+import 
org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword.space.NCNestedTestModelAnyNotSpace1
+import org.apache.nlpcraft.{NCTestContext, NCTestEnvironment}
+import org.junit.jupiter.api.Test
+
+class NCNestedAnySpec extends NCTestContext {
+    private def test(): 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")
+
+        // Too many any words.
+        checkFail("a t1 t2 t3 t4 b")
+    }
+
+    @Test
+    @NCTestEnvironment(model = classOf[NCNestedTestModelAnyRegex1], 
startClient = true)
+    def testRegex1(): Unit = test()
+
+    @Test
+    @NCTestEnvironment(model = classOf[NCNestedTestModelAnyRegex2], 
startClient = true)
+    def testRegex2(): Unit = test()
+
+    @Test
+    @NCTestEnvironment(model = classOf[NCNestedTestModelAnyRegex3], 
startClient = true)
+    def testRegex3(): Unit = test()
+
+    @Test
+    @NCTestEnvironment(model = classOf[NCNestedTestModelAnyRegex4], 
startClient = true)
+    def testRegex4(): Unit = test()
+
+    @Test
+    @NCTestEnvironment(model = classOf[NCNestedTestModelAnyRegex5], 
startClient = true)
+    def testRegex5(): Unit = test()
+
+    @Test
+    @NCTestEnvironment(model = classOf[NCNestedTestModelAnyAlphaNum1], 
startClient = true)
+    def testAlphaNum1(): Unit = test()
+
+    @Test
+    @NCTestEnvironment(model = classOf[NCNestedTestModelAnyNotSpace1], 
startClient = true)
+    def testNotSpaceNum1(): Unit = test()
+}
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/NCNestedModelAnyAdapter.scala
similarity index 68%
rename from 
nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCAnyWordSpecAdapters.scala
rename to 
nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedModelAnyAdapter.scala
index 5181c38..d749656 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/NCNestedModelAnyAdapter.scala
@@ -17,17 +17,17 @@
 
 package org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword
 
+import org.apache.nlpcraft.NCTestElement
 import org.apache.nlpcraft.model.NCModelAdapter
-import org.apache.nlpcraft.{NCTestContext, NCTestElement}
-import org.junit.jupiter.api.Test
 
 import java.util
 import java.util.Optional
 import scala.jdk.CollectionConverters.SetHasAsJava
+
 /**
   *
   */
-abstract class NCNestedTestModelAnyAdapter extends 
NCModelAdapter("nlpcraft.test.mdl", "Test Model", "1.0") {
+abstract class NCNestedModelAnyAdapter extends 
NCModelAdapter("nlpcraft.test.mdl", "Test Model", "1.0") {
     override def getEnabledBuiltInTokens: util.Set[String] = 
Set.empty[String].asJava
 
     protected def mkNotGreedy(id: String, syn: String): NCTestElement = {
@@ -37,19 +37,4 @@ abstract class NCNestedTestModelAnyAdapter extends 
NCModelAdapter("nlpcraft.test
 
         e
     }
-}
-/**
-  *
-  */
-abstract class NCNestedAnySpecAdapter extends NCTestContext {
-    @Test
-    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")
-
-        // Too many any words.
-        checkIntent("a t1 t2 t3 t4 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/alphanum/NCNestedTestModelAnyAlphaNum1.scala
similarity index 84%
rename from 
nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyAlphaNumSpec1.scala
rename to 
nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/alphanum/NCNestedTestModelAnyAlphaNum1.scala
index d5bc04f..8a3461c 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/alphanum/NCNestedTestModelAnyAlphaNum1.scala
@@ -15,10 +15,11 @@
  * limitations under the License.
  */
 
-package org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword
+package org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword.alphanum
 
+import org.apache.nlpcraft.NCTestElement
 import org.apache.nlpcraft.model.{NCElement, NCIntent, NCResult}
-import org.apache.nlpcraft.{NCTestElement, NCTestEnvironment}
+import 
org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword.NCNestedModelAnyAdapter
 
 import java.util
 import scala.jdk.CollectionConverters.SetHasAsJava
@@ -29,7 +30,7 @@ import scala.jdk.CollectionConverters.SetHasAsJava
   * intent without DSL.
   * 'any' element's position is not restricted.
   */
-class NCNestedTestModelAnyAlphaNum1 extends NCNestedTestModelAnyAdapter {
+class NCNestedTestModelAnyAlphaNum1 extends NCNestedModelAnyAdapter {
     override def getAbstractTokens: util.Set[String] = Set("a", "b", 
"any").asJava
 
     override def getElements: util.Set[NCElement] =
@@ -42,7 +43,4 @@ class NCNestedTestModelAnyAlphaNum1 extends 
NCNestedTestModelAnyAdapter {
 
     @NCIntent("intent=compose term(x)={# == 'compose'}")
     private def onCompose(): NCResult = NCResult.text("OK")
-}
-
-@NCTestEnvironment(model = classOf[NCNestedTestModelAnyAlphaNum1], startClient 
= true)
-class NCNestedAnyAlphaNumSpec1 extends NCNestedAnySpecAdapter
+}
\ No newline at end of file
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/regex/NCNestedTestModelAnyRegex1.scala
similarity index 85%
rename from 
nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec1.scala
rename to 
nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/regex/NCNestedTestModelAnyRegex1.scala
index 9b58c1f..42fd9bc 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/regex/NCNestedTestModelAnyRegex1.scala
@@ -15,10 +15,11 @@
  * limitations under the License.
  */
 
-package org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword
+package org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword.regex
 
+import org.apache.nlpcraft.NCTestElement
 import org.apache.nlpcraft.model.{NCElement, NCIntent, NCResult}
-import org.apache.nlpcraft.{NCTestElement, NCTestEnvironment}
+import 
org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword.NCNestedModelAnyAdapter
 
 import java.util
 import scala.jdk.CollectionConverters.SetHasAsJava
@@ -29,7 +30,7 @@ import scala.jdk.CollectionConverters.SetHasAsJava
   * intent without DSL.
   * 'any' element's position is not restricted.
   */
-class NCNestedTestModelAnyRegex1 extends NCNestedTestModelAnyAdapter {
+class NCNestedTestModelAnyRegex1 extends NCNestedModelAnyAdapter {
     override def getAbstractTokens: util.Set[String] = Set("a", "b", 
"any").asJava
 
     override def getElements: util.Set[NCElement] =
@@ -42,7 +43,4 @@ class NCNestedTestModelAnyRegex1 extends 
NCNestedTestModelAnyAdapter {
 
     @NCIntent("intent=compose term(x)={# == 'compose'}")
     private def onCompose(): NCResult = NCResult.text("OK")
-}
-
-@NCTestEnvironment(model = classOf[NCNestedTestModelAnyRegex1], startClient = 
true)
-class NCNestedAnyRegexSpec1 extends NCNestedAnySpecAdapter
+}
\ No newline at end of file
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/regex/NCNestedTestModelAnyRegex2.scala
similarity index 85%
rename from 
nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec2.scala
rename to 
nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/regex/NCNestedTestModelAnyRegex2.scala
index 6a4dd8f..2f0b433 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/regex/NCNestedTestModelAnyRegex2.scala
@@ -15,10 +15,11 @@
  * limitations under the License.
  */
 
-package org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword
+package org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword.regex
 
+import org.apache.nlpcraft.NCTestElement
 import org.apache.nlpcraft.model.{NCElement, NCIntent, NCResult}
-import org.apache.nlpcraft.{NCTestElement, NCTestEnvironment}
+import 
org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword.NCNestedModelAnyAdapter
 
 import java.util
 import scala.jdk.CollectionConverters.SetHasAsJava
@@ -29,7 +30,7 @@ import scala.jdk.CollectionConverters.SetHasAsJava
   * intent without DSL.
   * 'any' element's position is restricted.
   */
-class NCNestedTestModelAnyRegex2 extends NCNestedTestModelAnyAdapter {
+class NCNestedTestModelAnyRegex2 extends NCNestedModelAnyAdapter {
     override def getAbstractTokens: util.Set[String] = Set("a", "b", 
"any").asJava
 
     override def getElements: util.Set[NCElement] =
@@ -44,7 +45,4 @@ class NCNestedTestModelAnyRegex2 extends 
NCNestedTestModelAnyAdapter {
 
     @NCIntent("intent=compose term(x)={# == 'compose'}")
     private def onCompose(): NCResult = NCResult.text("OK")
-}
-
-@NCTestEnvironment(model = classOf[NCNestedTestModelAnyRegex2], startClient = 
true)
-class NCNestedAnyRegexSpec2 extends NCNestedAnySpecAdapter
+}
\ No newline at end of file
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/regex/NCNestedTestModelAnyRegex3.scala
similarity index 84%
rename from 
nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec3.scala
rename to 
nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/regex/NCNestedTestModelAnyRegex3.scala
index ce70b2e..5029674 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/regex/NCNestedTestModelAnyRegex3.scala
@@ -15,10 +15,11 @@
  * limitations under the License.
  */
 
-package org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword
+package org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword.regex
 
+import org.apache.nlpcraft.NCTestElement
 import org.apache.nlpcraft.model.{NCElement, NCIntent, NCResult}
-import org.apache.nlpcraft.{NCTestElement, NCTestEnvironment}
+import 
org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword.NCNestedModelAnyAdapter
 
 import java.util
 import scala.jdk.CollectionConverters.SetHasAsJava
@@ -28,7 +29,7 @@ import scala.jdk.CollectionConverters.SetHasAsJava
   * intent without DSL.
   * 'any' element's position is restricted implicitly via synonym definition.
   */
-class NCNestedTestModelAnyRegex3 extends NCNestedTestModelAnyAdapter {
+class NCNestedTestModelAnyRegex3 extends NCNestedModelAnyAdapter {
     override def getAbstractTokens: util.Set[String] = Set("a", "b").asJava
 
     override def getElements: util.Set[NCElement] =
@@ -40,7 +41,4 @@ class NCNestedTestModelAnyRegex3 extends 
NCNestedTestModelAnyAdapter {
 
     @NCIntent("intent=compose term(x)={# == 'compose'}")
     private def onCompose(): NCResult = NCResult.text("OK")
-}
-
-@NCTestEnvironment(model = classOf[NCNestedTestModelAnyRegex3], startClient = 
true)
-class NCNestedAnyRegexSpec3 extends NCNestedAnySpecAdapter
+}
\ No newline at end of file
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/regex/NCNestedTestModelAnyRegex4.scala
similarity index 85%
rename from 
nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec4.scala
rename to 
nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/regex/NCNestedTestModelAnyRegex4.scala
index 04ca2cc..8b9b30c 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/regex/NCNestedTestModelAnyRegex4.scala
@@ -15,10 +15,11 @@
  * limitations under the License.
  */
 
-package org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword
+package org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword.regex
 
+import org.apache.nlpcraft.NCTestElement
 import org.apache.nlpcraft.model.{NCElement, NCIntent, NCResult}
-import org.apache.nlpcraft.{NCTestElement, NCTestEnvironment}
+import 
org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword.NCNestedModelAnyAdapter
 
 import java.util
 import scala.jdk.CollectionConverters.SetHasAsJava
@@ -29,7 +30,7 @@ import scala.jdk.CollectionConverters.SetHasAsJava
   * intent with DSL.
   * 'any' element's position is not restricted (IDL).
   */
-class NCNestedTestModelAnyRegex4 extends NCNestedTestModelAnyAdapter {
+class NCNestedTestModelAnyRegex4 extends NCNestedModelAnyAdapter {
     override def getAbstractTokens: util.Set[String] = Set.empty[String].asJava
 
     override def getElements: util.Set[NCElement] =
@@ -46,7 +47,4 @@ class NCNestedTestModelAnyRegex4 extends 
NCNestedTestModelAnyAdapter {
         "    term(b)={# == 'b'}"
     )
     private def onCompose(): NCResult = NCResult.text("OK")
-}
-
-@NCTestEnvironment(model = classOf[NCNestedTestModelAnyRegex4], startClient = 
true)
-class NCNestedAnyRegexSpec4 extends NCNestedAnySpecAdapter
+}
\ No newline at end of file
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/regex/NCNestedTestModelAnyRegex5.scala
similarity index 86%
rename from 
nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyRegexSpec5.scala
rename to 
nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/regex/NCNestedTestModelAnyRegex5.scala
index 27e2d92..03d12ac 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/regex/NCNestedTestModelAnyRegex5.scala
@@ -15,10 +15,11 @@
  * limitations under the License.
  */
 
-package org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword
+package org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword.regex
 
+import org.apache.nlpcraft.NCTestElement
 import org.apache.nlpcraft.model.{NCElement, NCIntent, NCResult}
-import org.apache.nlpcraft.{NCTestElement, NCTestEnvironment}
+import 
org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword.NCNestedModelAnyAdapter
 
 import java.util
 import scala.jdk.CollectionConverters.SetHasAsJava
@@ -29,7 +30,7 @@ import scala.jdk.CollectionConverters.SetHasAsJava
   * intent with DSL.
   * 'any' element's position is restricted (IDL).
   */
-class NCNestedTestModelAnyRegex5 extends NCNestedTestModelAnyAdapter {
+class NCNestedTestModelAnyRegex5 extends NCNestedModelAnyAdapter {
     override def getAbstractTokens: util.Set[String] = Set.empty[String].asJava
 
     override def getElements: util.Set[NCElement] =
@@ -46,7 +47,4 @@ class NCNestedTestModelAnyRegex5 extends 
NCNestedTestModelAnyAdapter {
         "    term(b)={# == 'b'}"
         )
     private def onCompose(): NCResult = NCResult.text("OK")
-}
-
-@NCTestEnvironment(model = classOf[NCNestedTestModelAnyRegex5], startClient = 
true)
-class NCNestedAnyRegexSpec5 extends NCNestedAnySpecAdapter
+}
\ No newline at end of file
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyNotSpaceSpec1.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/space/NCNestedTestModelAnyNotSpace1.scala
similarity index 82%
rename from 
nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyNotSpaceSpec1.scala
rename to 
nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/space/NCNestedTestModelAnyNotSpace1.scala
index 091287b..e1fe702 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyNotSpaceSpec1.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/space/NCNestedTestModelAnyNotSpace1.scala
@@ -15,10 +15,11 @@
  * limitations under the License.
  */
 
-package org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword
+package org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword.space
 
+import org.apache.nlpcraft.NCTestElement
 import org.apache.nlpcraft.model.{NCElement, NCIntent, NCResult}
-import org.apache.nlpcraft.{NCTestElement, NCTestEnvironment}
+import 
org.apache.nlpcraft.probe.mgrs.nlp.enrichers.model.anyword.NCNestedModelAnyAdapter
 
 import java.util
 import scala.jdk.CollectionConverters.SetHasAsJava
@@ -29,20 +30,17 @@ import scala.jdk.CollectionConverters.SetHasAsJava
   * intent without DSL.
   * 'any' element's position is not restricted.
   */
-class NCNestedTestModelAnyNotSpace1 extends NCNestedTestModelAnyAdapter {
+class NCNestedTestModelAnyNotSpace1 extends NCNestedModelAnyAdapter {
     override def getAbstractTokens: util.Set[String] = Set("a", "b", 
"any").asJava
 
     override def getElements: util.Set[NCElement] =
         Set(
             NCTestElement("a"),
             NCTestElement("b"),
-            mkNotGreedy("any", "^^{tok_txt != '!'}^^"),
+            mkNotGreedy("any", "^^{tok_txt != ' '}^^"),
             NCTestElement("compose", "^^{# == 'a'}^^ ^^{# == 'any'}^^ ^^{# == 
'b'}^^")
         )
 
     @NCIntent("intent=compose term(x)={# == 'compose'}")
     private def onCompose(): NCResult = NCResult.text("OK")
-}
-
-@NCTestEnvironment(model = classOf[NCNestedTestModelAnyNotSpace1], startClient 
= true)
-class NCNestedAnyNotSpaceSpec1 extends NCNestedAnySpecAdapter
+}
\ No newline at end of file

Reply via email to