(ref_dir, dec_dir)
return r.output_to_dict(rouge_results)
Evaluate the files in ref_dir and dec_dir with pyrouge, returning results_dict
Evaluate the files in ref_dir and dec_dir with pyrouge, returning results_dict
Evaluate the files in ref_dir and dec_dir with pyrouge returning results_dict
def rouge_eval(ref_dir, dec_dir):
  """Evaluate the files in ref_dir and dec_dir with pyrouge, returning results_dict"""
  r = pyrouge.Rouge155()
  r.model_filename_pattern = '#ID#_reference.txt'
  r.system_filename_pattern = '(\d+)_decoded.txt'
  r.model_dir = ref_dir
  r.system_dir = dec_dir
  logging.getLogger('global').setLevel(logging.WARNING) # silence pyrouge logging
  rouge_results = r.convert_and_evaluate()
  return r.output_to_dict(rouge_results)
def rouge_eval ( ref_dir , dec_dir ) : r = pyrouge . Rouge155 ( ) r . model_filename_pattern = '#ID#_reference.txt' r . system_filename_pattern = '(\d+)_decoded.txt' r . model_dir = ref_dir r . system_dir = dec_dir logging . getLogger ( 'global' ) . setLevel ( logging . WARNING ) # silence pyrouge logging rouge_results = r . convert_and_evaluate ( ) return r . output_to_dict ( rouge_results )