examples/research_projects/bertabs/modeling_bertabs.py/GNMTGlobalScorer/score
class GNMTGlobalScorer:    def score(self, beam, logprobs):
        """
        Rescores a prediction based on penalty functions
        """
        normalized_probs = self.length_penalty(beam, logprobs, self.alpha)
        return normalized_probs