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 3300af4 Update NCDeployManager.scala
3300af4 is described below
commit 3300af4e67cdffc31e2a88e9b627aa2bb5120f80
Author: unknown <[email protected]>
AuthorDate: Tue May 4 12:20:30 2021 -0700
Update NCDeployManager.scala
---
.../probe/mgrs/deploy/NCDeployManager.scala | 27 +++++++++++-----------
1 file changed, 13 insertions(+), 14 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 dabab30..d56bbdc 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
@@ -461,21 +461,20 @@ object NCDeployManager extends NCService with
DecorateAsScala {
}
if (dupSyns.nonEmpty) {
- val tbl = NCAsciiTable("Elements", "Dup Synonym")
-
- dupSyns.foreach(row ⇒ tbl += (
- row._1,
- row._2
- ))
+ if (mdl.isDupSynonymsAllowed) {
+ val tbl = NCAsciiTable("Elements", "Dup Synonym")
- println("dupSyns="+dupSyns.size)
+ dupSyns.foreach(row ⇒ tbl += (
+ row._1,
+ row._2
+ ))
- if (mdl.isDupSynonymsAllowed) {
- logger.warn(s"Duplicate synonyms found in '$mdlId'
model:\n${tbl.toString}")
+ logger.trace(s"Duplicate synonyms (${dupSyns.size}) found in
'$mdlId' model.")
+ logger.trace(s" ${b("|--")} NOTE: ID of the model element is
its default built-in synonym - you don't need to add it explicitly to the list
of synonyms.")
+ logger.trace(s" ${b("+--")} Model '$mdlId' allows duplicate
synonyms but the large number may degrade the performance.")
+ logger.trace(tbl.toString)
- logger.warn(s"Duplicate synonyms found in '$mdlId' model -
turn on TRACE logging to see them.")
- logger.warn(s" ${b("|--")} NOTE: ID of the model element is
its default built-in synonym - you don't need to add it explicitly to the list
of synonyms.")
- logger.warn(s" ${b("+--")} Model '$mdlId' allows duplicate
synonyms but the large number may degrade the performance.")
+ logger.warn(s"Duplicate synonyms (${dupSyns.size}) found in
'$mdlId' model - turn on TRACE logging to see them.")
}
else
throw new NCE(s"Duplicated synonyms found and not allowed
[mdlId=$mdlId]")
@@ -1668,8 +1667,8 @@ object NCDeployManager extends NCService with
DecorateAsScala {
if (!allSyns.exists(_.intersect(seq).nonEmpty))
logger.warn(s"@NCIntentSample sample doesn't
contain any direct synonyms [" +
s"mdlId=$mdlId, " +
- s"mdlOrigin=${mdl.getOrigin}, " +
- s"sample='$s'" +
+ s"origin=${mdl.getOrigin}, " +
+ s"""sample="$s"""" +
s"]")
}