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 2020/09/18 07:10:27 UTC

[incubator-nlpcraft] 12/12: WIP.

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

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

commit 449f9652ca99a40b0ce3f7ce7606f608bb7b9919
Author: Sergey Kamov <se...@apache.org>
AuthorDate: Fri Sep 18 09:57:37 2020 +0300

    WIP.
---
 .../apache/nlpcraft/server/sugsyn/NCSuggestSynonymManager.scala    | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

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 5fa6351..a22cd93 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
@@ -191,7 +191,7 @@ object NCSuggestSynonymManager extends NCService {
                             promise.success(
                                 NCSuggestSynonymResult(
                                     modelId = mdlId,
-                                    minScore = 0,
+                                    minScore = minScore,
                                     durationMs = System.currentTimeMillis() - now,
                                     timestamp = now,
                                     error = err,
@@ -326,8 +326,7 @@ object NCSuggestSynonymManager extends NCService {
                                                     GSON.toJson(
                                                         RestRequest(
                                                             sentences = batch.map(p ⇒ RestRequestSentence(p.sentence, Seq(p.index).asJava)).asJava,
-                                                            // 'ctxword'' server range is (0, 2), input range is (0, 1)
-                                                            minScore = minScore * 2,
+                                                            minScore = 0,
                                                             limit = MAX_LIMIT
                                                         )
                                                     ),
@@ -459,4 +458,4 @@ object NCSuggestSynonymManager extends NCService {
 
             promise.future
         }
-}
+}
\ No newline at end of file