Spaces:
Sleeping
Sleeping
DoctorSlimm
commited on
Commit
·
2f5d16f
1
Parent(s):
0e2bcc5
oh yeahhh babyyy
Browse files- bangalore_score.py +7 -11
bangalore_score.py
CHANGED
@@ -87,17 +87,15 @@ class Bangalore_Score(evaluate.Metric):
|
|
87 |
"""Optional: download external resources useful to compute the scores"""
|
88 |
# TODO: Download external resources if needed
|
89 |
import nltk
|
90 |
-
import json
|
91 |
-
import evaluate
|
92 |
-
import pandas as pd
|
93 |
-
from datasets import Dataset, DatasetDict
|
94 |
-
|
95 |
nltk.download('punkt')
|
96 |
-
|
97 |
-
evaluate
|
98 |
-
|
|
|
|
|
|
|
99 |
# evaluate.load('BramVanroy/CharCut')
|
100 |
-
evaluate.load('exact_match')
|
101 |
# evaluate.load('accuracy')
|
102 |
pass
|
103 |
|
@@ -208,11 +206,9 @@ class Bangalore_Score(evaluate.Metric):
|
|
208 |
|
209 |
return {
|
210 |
'exact_match_headers': exact_match_headers,
|
211 |
-
# 'charcut': charcut,
|
212 |
'bleu': bleu,
|
213 |
'rougeL': rougeL,
|
214 |
'levenstein_distance': levenstein_distance,
|
215 |
-
# 'row_accuracy': row_accuracy,
|
216 |
}
|
217 |
|
218 |
|
|
|
87 |
"""Optional: download external resources useful to compute the scores"""
|
88 |
# TODO: Download external resources if needed
|
89 |
import nltk
|
|
|
|
|
|
|
|
|
|
|
90 |
nltk.download('punkt')
|
91 |
+
|
92 |
+
# import evaluate
|
93 |
+
|
94 |
+
# evaluate.load('bleu')
|
95 |
+
# evaluate.load('rouge')
|
96 |
+
# evaluate.load('ncoop57/levenshtein_distance')
|
97 |
# evaluate.load('BramVanroy/CharCut')
|
98 |
+
# evaluate.load('exact_match')
|
99 |
# evaluate.load('accuracy')
|
100 |
pass
|
101 |
|
|
|
206 |
|
207 |
return {
|
208 |
'exact_match_headers': exact_match_headers,
|
|
|
209 |
'bleu': bleu,
|
210 |
'rougeL': rougeL,
|
211 |
'levenstein_distance': levenstein_distance,
|
|
|
212 |
}
|
213 |
|
214 |
|