This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch NLPCRAFT-41-1
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-41-1 by this push:
new 5fbdd3b WIP.
5fbdd3b is described below
commit 5fbdd3b41be63a96e5b33a3596550d1309443019
Author: Sergey Kamov <[email protected]>
AuthorDate: Thu Sep 10 13:31:38 2020 +0300
WIP.
---
.../apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
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 f9f78cd..3ea8f40 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
@@ -941,8 +941,15 @@ object NCDeployManager extends NCService with
DecorateAsScala {
case (_, othSyns) ⇒ othSyns.intersect(syns).nonEmpty
}.toMap.keys.mkString(",")
- if (cross.nonEmpty)
- throw new NCE(s"Element has duplicate synonyms with element
[modelId=$mdlId, elementId=$elemId, cross=$cross]")
+ if (cross.nonEmpty) {
+ val msg = s"Element has duplicate synonyms with element
[modelId=$mdlId, elementId=$elemId, cross=$cross]"
+
+ // TODO: it it ok?
+ if (mdl.isDupSynonymsAllowed)
+ logger.warn(msg)
+ else
+ throw new NCE(msg)
+ }
}
}