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 938782b WIP.
938782b is described below
commit 938782b1833ca02098d85f9717b70ab9ac22c238
Author: Sergey Kamov <[email protected]>
AuthorDate: Mon Aug 30 22:18:47 2021 +0300
WIP.
---
.../mgrs/nlp/enrichers/model/anyword/NCAnyWordSpecAdapters.scala | 8 ++++----
.../nlp/enrichers/model/anyword/NCNestedAnyAlphaNumSpec1.scala | 2 +-
...estedAnyNotSpacySpec1.scala => NCNestedAnyNotSpaceSpec1.scala} | 8 ++++----
3 files changed, 9 insertions(+), 9 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 3a4befb..5181c38 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
@@ -45,11 +45,11 @@ abstract class NCNestedAnySpecAdapter extends NCTestContext
{
@Test
def testCompose(): Unit = {
// 1, 2 and 3 any words should be suitable.
- checkIntent("a any1 any2 any3 b", "compose")
- checkIntent("a any1 any2 b", "compose")
- checkIntent("a any1 b", "compose")
+ checkIntent("a t1 t2 t3 b", "compose")
+ checkIntent("a t1 t2 b", "compose")
+ checkIntent("a t1 b", "compose")
// Too many any words.
- checkIntent("a any1 any2 any3 any4 b", "compose")
+ 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/NCNestedAnyAlphaNumSpec1.scala
index c50cc2e..d5bc04f 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
@@ -36,7 +36,7 @@ class NCNestedTestModelAnyAlphaNum1 extends
NCNestedTestModelAnyAdapter {
Set(
NCTestElement("a"),
NCTestElement("b"),
- mkNotGreedy("any", "is_alphanum(tok_txt)"),
+ mkNotGreedy("any", "^^{is_alphanum(tok_txt)}^^"),
NCTestElement("compose", "^^{# == 'a'}^^ ^^{# == 'any'}^^ ^^{# ==
'b'}^^")
)
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/NCNestedAnyNotSpaceSpec1.scala
similarity index 87%
rename from
nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyNotSpacySpec1.scala
rename to
nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/anyword/NCNestedAnyNotSpaceSpec1.scala
index 0e9aa09..091287b 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/NCNestedAnyNotSpaceSpec1.scala
@@ -29,14 +29,14 @@ import scala.jdk.CollectionConverters.SetHasAsJava
* intent without DSL.
* 'any' element's position is not restricted.
*/
-class NCNestedTestModelAnyAlphaNum1 extends NCNestedTestModelAnyAdapter {
+class NCNestedTestModelAnyNotSpace1 extends NCNestedTestModelAnyAdapter {
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'}^^")
)
@@ -44,5 +44,5 @@ class NCNestedTestModelAnyAlphaNum1 extends
NCNestedTestModelAnyAdapter {
private def onCompose(): NCResult = NCResult.text("OK")
}
-@NCTestEnvironment(model = classOf[NCNestedTestModelAnyAlphaNum1], startClient
= true)
-class NCNestedAnyAlphaNumSpec1 extends NCNestedAnySpecAdapter
+@NCTestEnvironment(model = classOf[NCNestedTestModelAnyNotSpace1], startClient
= true)
+class NCNestedAnyNotSpaceSpec1 extends NCNestedAnySpecAdapter