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 8bb8dfa WIP.
8bb8dfa is described below
commit 8bb8dfa1bb9883dc815e12c667f3b2d6a72ba055
Author: Aaron Radzinski <[email protected]>
AuthorDate: Fri Mar 12 20:38:53 2021 -0800
WIP.
---
.../scala/org/apache/nlpcraft/common/makro/NCMacroParserSpec.scala | 2 +-
.../src/test/scala/org/apache/nlpcraft/model/NCIntentDslSpec.scala | 2 +-
.../org/apache/nlpcraft/model/abstract/NCAbstractTokensModel.scala | 2 +-
.../scala/org/apache/nlpcraft/model/intent/dsl/dsl_test_model.yaml | 2 +-
.../probe/mgrs/nlp/enrichers/model/NCEnricherNestedModelSpec.scala | 4 ++--
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git
a/nlpcraft/src/test/scala/org/apache/nlpcraft/common/makro/NCMacroParserSpec.scala
b/nlpcraft/src/test/scala/org/apache/nlpcraft/common/makro/NCMacroParserSpec.scala
index efe491b..f2cf226 100644
---
a/nlpcraft/src/test/scala/org/apache/nlpcraft/common/makro/NCMacroParserSpec.scala
+++
b/nlpcraft/src/test/scala/org/apache/nlpcraft/common/makro/NCMacroParserSpec.scala
@@ -145,7 +145,7 @@ class NCMacroParserSpec {
checkEq("//[a-zA-Z0-9]+//", Seq("//[a-zA-Z0-9]+//"))
checkEq("the ^^[internal]{id() == 'anyWord'}^^", Seq("the
^^[internal]{id() == 'anyWord'}^^"))
checkEq("{A}[0,1] ^^[internal]{id() == 'anyWord'}^^",
Seq("^^[internal]{id() == 'anyWord'}^^", "A ^^[internal]{id() == 'anyWord'}^^"))
- checkEq("w1 ^^id == 'nlpcraft:num'^^ w2", Seq("w1 ^^id ==
'nlpcraft:num'^^ w2"))
+ checkEq("w1 ^^{id == 'nlpcraft:num'}^^ w2", Seq("w1 ^^{id ==
'nlpcraft:num'}^^ w2"))
checkEq("before limit ^^[limitAlias]{id() == 'nlpcraft:limit'}^^",
Seq("before limit ^^[limitAlias]{id() == 'nlpcraft:limit'}^^"))
checkEq("wrap ^^[wrapLimitAlias]{id() == 'wrapLimit'}^^", Seq("wrap
^^[wrapLimitAlias]{id() == 'wrapLimit'}^^"))
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 5e33497..def742c 100644
--- a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/NCIntentDslSpec.scala
+++ b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/NCIntentDslSpec.scala
@@ -36,7 +36,7 @@ class NCIntentDslSpecModel extends NCModelAdapter(
override def getElements: util.Set[NCElement] = Set(NCTestElement("paris"))
// Moscow population filter.
- @NCIntent("intent=bigCity term(city)={id() == 'nlpcraft:city' &&
value(meta_token('nlpcraft:city:citymeta'), 'population') >= 10381222}")
+ @NCIntent("intent=bigCity term(city)={id() == 'nlpcraft:city' &&
get(meta_token('nlpcraft:city:citymeta'), 'population') >= 10381222}")
private def onBigCity(ctx: NCIntentMatch): NCResult = "OK"
@NCIntent("intent=otherCity term(city)={id() == 'nlpcraft:city' }")
diff --git
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/abstract/NCAbstractTokensModel.scala
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/abstract/NCAbstractTokensModel.scala
index 86a6dd4..0a919a6 100644
---
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/abstract/NCAbstractTokensModel.scala
+++
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/abstract/NCAbstractTokensModel.scala
@@ -30,7 +30,7 @@ class NCAbstractTokensModel extends NCModelAdapter(
Set(
NCTestElement("anyWord", "//[a-zA-Z0-9]+//"),
NCTestElement("wrapAnyWord", "the ^^[internal]{id() ==
'anyWord'}^^"),
- NCTestElement("wrapNum", "w1 ^^id == 'nlpcraft:num'^^ w2"),
+ NCTestElement("wrapNum", "w1 ^^{id == 'nlpcraft:num'}^^ w2"),
NCTestElement("wrapLimit", "before limit ^^[limitAlias]{id() ==
'nlpcraft:limit'}^^"),
NCTestElement("wrapWrapLimit", "wrap ^^[wrapLimitAlias]{id() ==
'wrapLimit'}^^")
)
diff --git
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/intent/dsl/dsl_test_model.yaml
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/intent/dsl/dsl_test_model.yaml
index 219f27e..824f0f2 100644
---
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/intent/dsl/dsl_test_model.yaml
+++
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/intent/dsl/dsl_test_model.yaml
@@ -49,7 +49,7 @@ elements:
- "{a33|a3}"
- id: "a4"
synonyms:
- - "{fourth|4th} ^^[alias4](id == 'a3')^^"
+ - "{fourth|4th} ^^[alias4]{id == 'a3'}^^"
intents:
- "intent=i1 term(t1)={id() == 'a' && meta_token('txt') == 'x'}"
diff --git
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCEnricherNestedModelSpec.scala
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCEnricherNestedModelSpec.scala
index 404a05e..7fac5ca 100644
---
a/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCEnricherNestedModelSpec.scala
+++
b/nlpcraft/src/test/scala/org/apache/nlpcraft/probe/mgrs/nlp/enrichers/model/NCEnricherNestedModelSpec.scala
@@ -34,8 +34,8 @@ class NCNestedTestModel extends NCDefaultTestModel {
NCTestElement("x2", "{test1|_} ^^{id() == 'x1'}^^"),
NCTestElement("x3", "{test2|_} ^^{id() == 'x2'}^^"),
NCTestElement("y1", "y"),
- NCTestElement("y2", "^^id == 'y1'^^"),
- NCTestElement("y3", "^^id == 'y2'^^ ^^id == 'y2'^^")
+ NCTestElement("y2", "^^{id == 'y1'}^^"),
+ NCTestElement("y3", "^^{id == 'y2'}^^ ^^{id == 'y2'}^^")
)
}