From 7eb9746dc7a088c8bd270fdd658bf3cda872dda9 Mon Sep 17 00:00:00 2001 From: lxsang Date: Thu, 18 Feb 2021 18:54:16 +0100 Subject: [PATCH] allow to set threadhold to top similarity post --- blog/controllers/PostController.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/controllers/PostController.lua b/blog/controllers/PostController.lua index 4566f1d..f8c0afb 100644 --- a/blog/controllers/PostController.lua +++ b/blog/controllers/PostController.lua @@ -236,7 +236,7 @@ function PostController:analyse(n) self.analytical:delete({["="] = {["1"] = 1}}) -- get similarity and put to the table for id, v in pairs(vectors) do - local top = cluster.top_similarity(id, vectors, n) + local top = cluster.top_similarity(id, vectors, n, 0.1) for a, b in pairs(top) do local record = {pid = id, sid = a, score = b} self.analytical:create(record)