RadEval / factual /RadCliQv1 /radcliq_bertscore.py
X-iZhang's picture
initial
bad8293 verified
raw
history blame contribute delete
392 Bytes
from nlg.bertscore.bertscore import BertScore
def radcliq_bertscore(refs, hyps):
bertscore_scorer = BertScore(model_type='distilroberta-base',
rescale_with_baseline=True,
idf=False,
num_layers=None)
print(bertscore_scorer)
avg, scores = bertscore_scorer(refs, hyps)
return scores