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 526e9db  WIP.
526e9db is described below

commit 526e9db6834d37ff95042a1c9499349dbcb9b583
Author: Aaron Radzinzski <[email protected]>
AuthorDate: Wed Feb 10 18:32:34 2021 -0800

    WIP.
---
 .../apache/nlpcraft/model/intent/impl/ver2/NCIntentDslCompiler.scala   | 3 ++-
 .../scala/org/apache/nlpcraft/model/intent/dsl/NCDslCompilerSpec.scala | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/ver2/NCIntentDslCompiler.scala
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/ver2/NCIntentDslCompiler.scala
index 4edae92..e25c33f 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/ver2/NCIntentDslCompiler.scala
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/intent/impl/ver2/NCIntentDslCompiler.scala
@@ -25,6 +25,7 @@ import org.apache.nlpcraft.model.NCToken
 import org.apache.nlpcraft.model.intent.impl.antlr4._
 import org.apache.nlpcraft.model.intent.utils.ver2._
 
+import scala.collection.immutable.HashMap
 import scala.collection.mutable
 import scala.collection.mutable.ArrayBuffer
 
@@ -221,7 +222,7 @@ object NCIntentDslCompiler extends LazyLogging {
         }
 
         override def exitMetaDecl(ctx: NCIntentDslParser.MetaDeclContext): 
Unit = {
-            meta = U.jsonToObject(ctx.jsonObj().getText, classOf[Map[String, 
Any]])
+            meta = U.jsonToObject(ctx.jsonObj().getText, 
classOf[HashMap[String, Any]])
         }
 
         override def exitOrderedDecl(ctx: 
NCIntentDslParser.OrderedDeclContext): Unit = {
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/intent/dsl/NCDslCompilerSpec.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/intent/dsl/NCDslCompilerSpec.scala
index 9873444..7659856 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/model/intent/dsl/NCDslCompilerSpec.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/model/intent/dsl/NCDslCompilerSpec.scala
@@ -30,7 +30,7 @@ class NCDslCompilerSpec {
     def test(): Unit = {
         NCIntentDslCompiler.compile(
             """
-              |intent=i1 meta={'a': true} term={}
+              |intent=i1 meta={'a': true} term={2 == 2}
               |""".stripMargin, "mdl.id",
             Map.empty[String, AnyRef],
             Map.empty[String, AnyRef],

Reply via email to