def get_confidence_str_distance(text_from, text_to, distances):
    match_ratio = SequenceMatcher(None, text_from, text_to).ratio()
    conf = 0.0
    for (threshold, confidence) in distances:
        if threshold >= match_ratio:
            conf = confidence + (match_ratio - threshold)
            break
    return conf
dataset/ETHPy150Open bartdag/recodoc2/recodoc2/apps/doc/parser/doc_diff.py/get_confidence_str_distance/swapped operands of `>=`