def sentence_ribes(references, hypothesis, alpha=0.25, beta=0.10):
    best_ribes = -1.0
    # Calculates RIBES for each reference and returns the best score.
    for reference in references:
        # Collects the *worder* from the ranked correlation alignments.
        worder = word_rank_alignment(reference, hypothesis)
        nkt = kendall_tau(worder)
            
        # Calculates the brevity penalty
        bp = min(1.0, math.exp(1.0 - len(reference)/len(hypothesis)))
        
        # Calculates the unigram precision, *p1*
        p1 = len(worder) / len(hypothesis)
        
        _ribes = nkt * (p1 ** alpha) *  (bp ** beta)
        
        if _ribes > best_ribes: # Keeps the best score.
            best_ribes = _ribes
        
    return best_ribes
The RIBES (Rank-based Intuitive Bilingual Evaluation Score) from 
dataset/ETHPy150Open nltk/nltk/nltk/translate/ribes_score.py/sentence_ribes