Martin Dočekal commited on
Commit
d2429ca
1 Parent(s): d8248d0

example fix

Browse files
Files changed (2) hide show
  1. README.md +3 -3
  2. rouge_raw.py +3 -3
README.md CHANGED
@@ -34,7 +34,7 @@ predictions = ["the cat is on the mat", "hello there"]
34
  references = ["the cat is on the mat", "hello there"]
35
  results = rougeraw.compute(predictions=predictions, references=references)
36
  print(results)
37
- {'1_precision': 1.0, '1_recall': 1.0, '1_fmeasure': 1.0, '2_precision': 1.0, '2_recall': 1.0, '2_fmeasure': 1.0, 'l_precision': 1.0, 'l_recall': 1.0, 'l_fmeasure': 1.0}
38
  ```
39
 
40
 
@@ -50,13 +50,13 @@ There are precision, recall, F1 values for rougeraw-1, rougeraw-2 and rougeraw-l
50
 
51
  Key format:
52
  ```
53
- {1|2|l}_{low|mid|high}_{precision|recall|fmeasure}
54
  e.g.: 1_low_precision
55
  ```
56
 
57
  If aggregate is False the format is:
58
  ```
59
- {1|2|l}_{precision|recall|fmeasure}
60
  e.g.: 1_precision
61
  ```
62
 
 
34
  references = ["the cat is on the mat", "hello there"]
35
  results = rougeraw.compute(predictions=predictions, references=references)
36
  print(results)
37
+ {'1_low_precision': 1.0, '1_low_recall': 1.0, '1_low_fmeasure': 1.0, '1_mid_precision': 1.0, '1_mid_recall': 1.0, '1_mid_fmeasure': 1.0, '1_high_precision': 1.0, '1_high_recall': 1.0, '1_high_fmeasure': 1.0, '2_low_precision': 1.0, '2_low_recall': 1.0, '2_low_fmeasure': 1.0, '2_mid_precision': 1.0, '2_mid_recall': 1.0, '2_mid_fmeasure': 1.0, '2_high_precision': 1.0, '2_high_recall': 1.0, '2_high_fmeasure': 1.0, 'L_low_precision': 1.0, 'L_low_recall': 1.0, 'L_low_fmeasure': 1.0, 'L_mid_precision': 1.0, 'L_mid_recall': 1.0, 'L_mid_fmeasure': 1.0, 'L_high_precision': 1.0, 'L_high_recall': 1.0, 'L_high_fmeasure': 1.0}
38
  ```
39
 
40
 
 
50
 
51
  Key format:
52
  ```
53
+ {1|2|L}_{low|mid|high}_{precision|recall|fmeasure}
54
  e.g.: 1_low_precision
55
  ```
56
 
57
  If aggregate is False the format is:
58
  ```
59
+ {1|2|L}_{precision|recall|fmeasure}
60
  e.g.: 1_precision
61
  ```
62
 
rouge_raw.py CHANGED
@@ -380,9 +380,9 @@ class RougeRaw(evaluate.Metric):
380
  "2_precision": res["2"].p,
381
  "2_recall": res["2"].r,
382
  "2_fmeasure": res["2"].f,
383
- "l_precision": res["L"].p,
384
- "l_recall": res["L"].r,
385
- "l_fmeasure": res["L"].f,
386
  }
387
 
388
  if select is not None:
 
380
  "2_precision": res["2"].p,
381
  "2_recall": res["2"].r,
382
  "2_fmeasure": res["2"].f,
383
+ "L_precision": res["L"].p,
384
+ "L_recall": res["L"].r,
385
+ "L_fmeasure": res["L"].f,
386
  }
387
 
388
  if select is not None: