comet

Library to score machine translations with the COMET metric

source

cometscoring

 cometscoring (model_name='Unbabel/wmt22-comet-da', gpus=1)

Class to calculate COMET score (with references)


source

cometscoring.measure_comet

 cometscoring.measure_comet (source_lines, hypothesis_lines,
                             reference_lines)

Function to calculate the comet score


source

cometscoring.measure_record_comet

 cometscoring.measure_record_comet (source_lines, hypothesis_lines,
                                    reference_lines, sourcelang,
                                    targetlang, test_set_name, test_date,
                                    mtengine, score_pathname, score_fname,
                                    domain='')

Function to score hypothesis with COMET score and record score to a specified metrics file