eladsegal commited on
Commit
38b143b
1 Parent(s): 451ff2c

Update metrics/rouge.py

Browse files
Files changed (1) hide show
  1. metrics/rouge.py +1 -1
metrics/rouge.py CHANGED
@@ -33,6 +33,6 @@ def compute_rouge(predictions, references, rouge_types=None, use_aggregator=True
33
 
34
  # TODO: Check if it is necessary
35
  # Copied from https://github.com/huggingface/transformers/blob/3977b58437b8ce1ea1da6e31747d888efec2419b/examples/pytorch/summarization/run_summarization.py#L520
36
- def rouge_postprocess_text(text):
37
  # rougeLSum expects newline after each sentence
38
  return "\n".join(nltk.sent_tokenize(text))
 
33
 
34
  # TODO: Check if it is necessary
35
  # Copied from https://github.com/huggingface/transformers/blob/3977b58437b8ce1ea1da6e31747d888efec2419b/examples/pytorch/summarization/run_summarization.py#L520
36
+ def postprocess_text(text):
37
  # rougeLSum expects newline after each sentence
38
  return "\n".join(nltk.sent_tokenize(text))