def pycoco_eval(scorer, refs, cands):
    '''
    scorer is assumed to have a compute_score function.
    refs is a list of lists of strings
    cands is a list of predictions
    '''
    refs, cands = tokenize(refs, cands)
    average_score, scores = scorer.compute_score(refs, cands)
    return average_score, scores

    scorer is assumed to have a compute_score function.
    refs is a list of lists of strings
    cands is a list of predictions
    
textdiffuser/eval/clipscore.py