You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by se...@apache.org on 2020/03/24 15:54:30 UTC
[incubator-nlpcraft] branch NLPCRAFT-24 updated: WIP.
This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch NLPCRAFT-24
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-24 by this push:
new aad695b WIP.
aad695b is described below
commit aad695b3464d6eb4a013db02cf155c1d289b5484
Author: Sergey Kamov <se...@apache.org>
AuthorDate: Tue Mar 24 18:54:23 2020 +0300
WIP.
---
.../mgrs/nlp/enrichers/model/NCEnricherNestedModelSpec.scala | 12 ++++++++----
.../probe/mgrs/nlp/enrichers/model/NCNestedTestModel.scala | 9 ++++++---
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCEnricherNestedModelSpec.scala b/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCEnricherNestedModelSpec.scala
index 8afe312..ac426c6 100644
--- a/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCEnricherNestedModelSpec.scala
+++ b/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCEnricherNestedModelSpec.scala
@@ -31,12 +31,16 @@ class NCEnricherNestedModelSpec extends NCEnricherBaseSpec {
runBatch(
_ ⇒ checkExists(
"tomorrow",
- usr(text = "tomorrow", id = "x:nested2")
+ usr(text = "tomorrow", id = "x3")
),
_ ⇒ checkExists(
- "tomorrow tomorrow",
- usr(text = "tomorrow", id = "x:nested2"),
- usr(text = "tomorrow", id = "x:nested2")
+ "tomorrow yesterday",
+ usr(text = "tomorrow", id = "x3"),
+ usr(text = "yesterday", id = "x3")
+ ),
+ _ ⇒ checkExists(
+ "y y",
+ usr(text = "y y", id = "y3")
)
)
}
diff --git a/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCNestedTestModel.scala b/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCNestedTestModel.scala
index 2dfc872..8d6b9df 100644
--- a/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCNestedTestModel.scala
+++ b/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCNestedTestModel.scala
@@ -31,9 +31,12 @@ import scala.collection.JavaConverters._
class NCNestedTestModel extends NCDefaultTestModel {
override def getElements: util.Set[NCElement] =
Set(
- mkElement("x:nested", "{test|*} ^^id == 'nlpcraft:date'^^"),
- mkElement("x:nested1", "{test1|*} ^^id == 'x:nested'^^"),
- mkElement("x:nested2", "{test2|*} ^^id == 'x:nested1'^^")
+ mkElement("x1", "{test|*} ^^id == 'nlpcraft:date'^^"),
+ mkElement("x2", "{test1|*} ^^id == 'x1'^^"),
+ mkElement("x3", "{test2|*} ^^id == 'x2'^^"),
+ mkElement("y1", "y"),
+ mkElement("y2", "^^id == 'y1'^^"),
+ mkElement("y3", "^^id == 'y2'^^ ^^id == 'y2'^^")
).asJava
private def mkElement(id: String, syn: String): NCElement =