This is an automated email from the ASF dual-hosted git repository.

aradzinski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/master by this push:
     new e4886b3  WIP
e4886b3 is described below

commit e4886b3de4069d7c10f7e87762285a113c990a07
Author: Aaron Radzinski <[email protected]>
AuthorDate: Mon Feb 21 21:34:31 2022 -0800

    WIP
---
 .../nlpcraft/internal/intent/compiler/NCIDLCodeGenerator.scala      | 2 +-
 .../entity/parser/semantic/impl/NCSemanticEntityParserImpl.scala    | 6 +++++-
 .../intent/compiler/functions/NCIDLFunctionsCollections.scala       | 1 +
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/internal/intent/compiler/NCIDLCodeGenerator.scala
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/internal/intent/compiler/NCIDLCodeGenerator.scala
index 1f7bd91..aeafbb0 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/internal/intent/compiler/NCIDLCodeGenerator.scala
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/internal/intent/compiler/NCIDLCodeGenerator.scala
@@ -923,7 +923,7 @@ trait NCIDLCodeGenerator:
                 case "ent_index" => arg1Tok() match { case x => stack.push(() 
=> Z(toEntity(x().value).index, 1)) }
                 case "ent_text" => arg1Tok() match { case x => stack.push(() 
=> Z(toEntity(x().value).text, 1)) }
                 case "ent_count" => checkAvail(); z0(() => 
Z(idlCtx.entities.size, 0))
-                case "ent_groups" => arg1Tok() match { case x => stack.push(() 
=> Z(toEntity(x().value).impl.getGroups, 1)) }
+                case "ent_groups" => arg1Tok() match { case x => stack.push(() 
=> Z(JList.copyOf(toEntity(x().value).impl.getGroups), 1)) }
                 case "ent_all" => checkAvail(); z0(() => 
Z(idlCtx.entities.asJava, 0))
                 case "ent_all_for_id" => checkAvail(); doForAll((e, id) => 
e.impl.getId == id)
                 case "ent_all_for_group" => checkAvail(); doForAll((e, grp) => 
e.impl.getGroups.contains(grp))
diff --git 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/entity/parser/semantic/impl/NCSemanticEntityParserImpl.scala
 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/entity/parser/semantic/impl/NCSemanticEntityParserImpl.scala
index 7ab716f..31fe4a6 100644
--- 
a/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/entity/parser/semantic/impl/NCSemanticEntityParserImpl.scala
+++ 
b/nlpcraft/src/main/scala/org/apache/nlpcraft/nlp/entity/parser/semantic/impl/NCSemanticEntityParserImpl.scala
@@ -142,9 +142,13 @@ object NCSemanticEntityParserImpl:
 import 
org.apache.nlpcraft.nlp.entity.parser.semantic.impl.NCSemanticEntityParserImpl.*
 
 /**
-  *
+  * 
+  * @param stemmer
+  * @param parser
   * @param macros
   * @param elements
+  * @param mdlSrc
+  * @param scrType
   */
 class NCSemanticEntityParserImpl(
     stemmer: NCSemanticStemmer,
diff --git 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/intent/compiler/functions/NCIDLFunctionsCollections.scala
 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/intent/compiler/functions/NCIDLFunctionsCollections.scala
index 989131d..a7ab272 100644
--- 
a/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/intent/compiler/functions/NCIDLFunctionsCollections.scala
+++ 
b/nlpcraft/src/test/scala/org/apache/nlpcraft/internal/intent/compiler/functions/NCIDLFunctionsCollections.scala
@@ -36,6 +36,7 @@ class NCIDLFunctionsCollections extends NCIDLFunctions:
             "list(1, 2, 3) != list(1.0, 2, 3)",
             "get(list(1, 2, 3), 1) == 2",
             "has(list(1, 2, 3), 1) == true",
+            "has(list('act'), 'act') == true",
             "has(list(1.1, 2.1, 3.1), 1.1) == true",
             "has(list(1.0, 2.0, 3.0), 1.0) == true",
             "has(list(1.0, 2.0, 3.0), 1) == false", // Different types.

Reply via email to