(
raw_tf: int, doc_len: int, avg_doc_len: float, k: float = K1, b: float = B
)
| 246 | |
| 247 | |
| 248 | def compute_bm25_tf( |
| 249 | raw_tf: int, doc_len: int, avg_doc_len: float, k: float = K1, b: float = B |
| 250 | ) -> float: |
| 251 | return raw_tf * (k + 1) / (raw_tf + k * (1 - b + b * doc_len / avg_doc_len)) |
| 252 | |
| 253 | |
| 254 | def merge_cqa_dupstack(data_path: str, verbose: bool = False): |
no outgoing calls
no test coverage detected