mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
refine README (#169)
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import json
|
||||
import math
|
||||
import re
|
||||
import logging
|
||||
import copy
|
||||
@ -167,4 +168,4 @@ class EsQueryer:
|
||||
#d = 1e-9
|
||||
# for k, v in dtwt.items():
|
||||
# d += v * v
|
||||
return s / q # math.sqrt(q) / math.sqrt(d)
|
||||
return s / q / max(1, math.sqrt(math.log10(max(len(qtwt.keys()), len(dtwt.keys())))))# math.sqrt(q) / math.sqrt(d)
|
||||
|
||||
Reference in New Issue
Block a user