Martin DoΔekal
commited on
Commit
β’
c03043d
1
Parent(s):
732e363
reuirements
Browse filesexample change
- README.md +6 -5
- requirements.txt +2 -0
README.md
CHANGED
@@ -28,11 +28,12 @@ ROUGE RAW is language-agnostic variant of ROUGE without stemmer, stop words and
|
|
28 |
|
29 |
|
30 |
```python
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
36 |
{'rougeraw1_precision': 1.0, 'rougeraw1_recall': 1.0, 'rougeraw1_fmeasure': 1.0, 'rougeraw2_precision': 1.0, 'rougeraw2_recall': 1.0, 'rougeraw2_fmeasure': 1.0, 'rougerawl_precision': 1.0, 'rougerawl_recall': 1.0, 'rougerawl_fmeasure': 1.0}
|
37 |
```
|
38 |
|
|
|
28 |
|
29 |
|
30 |
```python
|
31 |
+
import evaluate
|
32 |
+
rougeraw = evaluate.load('CZLC/rouge_raw')
|
33 |
+
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 |
{'rougeraw1_precision': 1.0, 'rougeraw1_recall': 1.0, 'rougeraw1_fmeasure': 1.0, 'rougeraw2_precision': 1.0, 'rougeraw2_recall': 1.0, 'rougeraw2_fmeasure': 1.0, 'rougerawl_precision': 1.0, 'rougerawl_recall': 1.0, 'rougerawl_fmeasure': 1.0}
|
38 |
```
|
39 |
|
requirements.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
evaluate~=0.4.1
|
2 |
+
datasets~=2.15.0
|