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 2021/01/19 10:10:31 UTC

[incubator-nlpcraft] branch NLPCRAFT-191 created (now 15d7453)

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

sergeykamov pushed a change to branch NLPCRAFT-191
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git.


      at 15d7453  WIP.

This branch includes the following new commits:

     new 15d7453  WIP.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-nlpcraft] 01/01: WIP.

Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 15d7453f753d9d92e52936329dc8028125e98e5d
Author: Sergey Kamov <sk...@gmail.com>
AuthorDate: Tue Jan 19 13:09:44 2021 +0300

    WIP.
---
 .../apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala   | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
index d7f6d2a..1119c27 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
@@ -207,7 +207,7 @@ object NCDeployManager extends NCService with DecorateAsScala {
                     if (syns.add(holder)) {
                         cnt += 1
 
-                        if (cnt > maxCnt)
+                        if (mdl.isMaxSynonymsThresholdError && cnt > maxCnt)
                             throw new NCE(s"Too many total synonyms detected [" +
                                 s"mdlId=$mdlId, " +
                                 s"cnt=$cnt, " +
@@ -369,6 +369,15 @@ object NCDeployManager extends NCService with DecorateAsScala {
             }
         }
 
+        if (cnt > maxCnt && !mdl.isMaxSynonymsThresholdError)
+            logger.warn(
+                s"Too many total synonyms detected [" +
+                  s"mdlId=$mdlId, " +
+                  s"cnt=$cnt, " +
+                  s"max=$maxCnt" +
+                  s"]"
+            )
+
         // Discard value loaders.
         for (elm ← mdl.getElements.asScala) {
             val ldr = elm.getValueLoader