JairoDanielMT's picture
Upload folder using huggingface_hub
4ef6c2b verified
Raw
History Blame Contribute Delete
329 Bytes
import math
def get_distinctiveness(N, E_t): return math.log(N / (1 + E_t)) if N > 0 else 0
def get_local_confidence(F_t_e, max_F_e): return F_t_e / max_F_e if max_F_e > 0 else 0
def get_source_multiplier(S_t_e): return min(1.0, 0.5 + (0.25 * S_t_e))
def calculate_score(lc, dist, sm): return sm * (0.7 * lc + 0.3 * dist)