mirror of
https://github.com/lxsang/antd-web-apps
synced 2024-11-20 02:18:20 +01:00
allow to set threadhold to top similarity post
This commit is contained in:
parent
7eb9746dc7
commit
0765d22913
@ -236,7 +236,7 @@ function PostController:analyse(n)
|
|||||||
self.analytical:delete({["="] = {["1"] = 1}})
|
self.analytical:delete({["="] = {["1"] = 1}})
|
||||||
-- get similarity and put to the table
|
-- get similarity and put to the table
|
||||||
for id, v in pairs(vectors) do
|
for id, v in pairs(vectors) do
|
||||||
local top = cluster.top_similarity(id, vectors, n, 0.1)
|
local top = cluster.top_similarity(id, vectors, tonumber(n), 0.1)
|
||||||
for a, b in pairs(top) do
|
for a, b in pairs(top) do
|
||||||
local record = {pid = id, sid = a, score = b}
|
local record = {pid = id, sid = a, score = b}
|
||||||
self.analytical:create(record)
|
self.analytical:create(record)
|
||||||
|
Loading…
Reference in New Issue
Block a user