Spaces:
Runtime error
Runtime error
wenming_ma
commited on
Commit
·
203ab82
1
Parent(s):
42d9609
Changes to be committed:
Browse files
weming.py
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
from evaluate import Metric
|
2 |
-
|
3 |
-
class WemingMetric(Metric):
|
4 |
-
|
5 |
-
def _download_and_prepare(self, dl_manager):
|
6 |
-
import nltk
|
7 |
-
nltk.download("punkt")
|
8 |
-
|
9 |
-
def _compute(self, references, predictions):
|
10 |
-
em = sum([r==p for r, p in zip(references, predictions)])/len(references)
|
11 |
-
return {"exact_match": em}
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|