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/02/18 09:38:28 UTC

[incubator-nlpcraft] branch NLPCRAFT-218 created (now 96ac27f)

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

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


      at 96ac27f  WIP.

This branch includes the following new commits:

     new 96ac27f  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-218
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git

commit 96ac27f5e7f829e6aa2ac9412c0dc8741243f20e
Author: Sergey Kamov <sk...@gmail.com>
AuthorDate: Thu Feb 18 12:38:12 2021 +0300

    WIP.
---
 .../org/apache/nlpcraft/server/sugsyn/NCSuggestSynonymManager.scala    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/sugsyn/NCSuggestSynonymManager.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/sugsyn/NCSuggestSynonymManager.scala
index aaa1d2c..31d7786 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/sugsyn/NCSuggestSynonymManager.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/sugsyn/NCSuggestSynonymManager.scala
@@ -225,6 +225,7 @@ object NCSuggestSynonymManager extends NCService {
                             val allReqs =
                                 elemSyns.map {
                                     case (elemId, syns) ⇒
+                                        // Current implementation supports suggestions only for single words synonyms.
                                         val normSyns: Seq[Seq[Word]] = syns.filter(_.size == 1)
                                         val synsStems = normSyns.map(_.map(_.stem))
                                         val synsWords = normSyns.map(_.map(_.word))
@@ -265,7 +266,7 @@ object NCSuggestSynonymManager extends NCService {
                                     map { case (elemId, _) ⇒ elemId }
 
                             if (noExElems.nonEmpty)
-                                warns += s"Elements do not have synonyms in their intent samples - no suggestion can be made: ${noExElems.mkString(", ")}"
+                                warns += s"Elements do not have single words synonyms in their intent samples - no suggestion can be made: ${noExElems.mkString(", ")}"
 
                             val allReqsCnt = allReqs.map(_._2.size).sum
                             val allSynsCnt = elemSyns.map(_._2.size).sum