add dialog api (#33)

This commit is contained in:
KevinHuSh
2024-01-17 20:20:42 +08:00
committed by GitHub
parent 6be3dd56fa
commit 9bf75d4511
50 changed files with 511 additions and 273 deletions

View File

@ -147,7 +147,7 @@ class EsQueryer:
atks = toDict(atks)
btkss = [toDict(tks) for tks in btkss]
tksim = [self.similarity(atks, btks) for btks in btkss]
return np.array(sims[0]) * vtweight + np.array(tksim) * tkweight
return np.array(sims[0]) * vtweight + np.array(tksim) * tkweight, sims[0], tksim
def similarity(self, qtwt, dtwt):
if isinstance(dtwt, type("")):