Spaces:
Build error
Build error
drslimm
commited on
Commit
·
01da6c1
1
Parent(s):
e3f227c
add modules
Browse files- bangalore_score.py +9 -7
bangalore_score.py
CHANGED
|
@@ -28,29 +28,31 @@ year={2020}
|
|
| 28 |
|
| 29 |
# TODO: Add description of the module here
|
| 30 |
_DESCRIPTION = """\
|
| 31 |
-
|
| 32 |
"""
|
| 33 |
|
| 34 |
|
| 35 |
# TODO: Add description of the arguments of the module here
|
| 36 |
_KWARGS_DESCRIPTION = """
|
| 37 |
-
|
| 38 |
Args:
|
| 39 |
predictions: list of predictions to score. Each predictions
|
| 40 |
should be a string with tokens separated by spaces.
|
| 41 |
references: list of reference for each prediction. Each
|
| 42 |
reference should be a string with tokens separated by spaces.
|
| 43 |
Returns:
|
| 44 |
-
|
| 45 |
-
|
|
|
|
|
|
|
| 46 |
Examples:
|
| 47 |
Examples should be written in doctest format, and should illustrate how
|
| 48 |
to use the function.
|
| 49 |
|
| 50 |
-
>>> my_new_module = evaluate.load("
|
| 51 |
-
>>> results = my_new_module.compute(references=[
|
| 52 |
>>> print(results)
|
| 53 |
-
{'
|
| 54 |
"""
|
| 55 |
|
| 56 |
# TODO: Define external resources urls if needed
|
|
|
|
| 28 |
|
| 29 |
# TODO: Add description of the module here
|
| 30 |
_DESCRIPTION = """\
|
| 31 |
+
Computing metrics on generated tabular data
|
| 32 |
"""
|
| 33 |
|
| 34 |
|
| 35 |
# TODO: Add description of the arguments of the module here
|
| 36 |
_KWARGS_DESCRIPTION = """
|
| 37 |
+
Computing loss and accuracy on generated tabular data
|
| 38 |
Args:
|
| 39 |
predictions: list of predictions to score. Each predictions
|
| 40 |
should be a string with tokens separated by spaces.
|
| 41 |
references: list of reference for each prediction. Each
|
| 42 |
reference should be a string with tokens separated by spaces.
|
| 43 |
Returns:
|
| 44 |
+
bleu: bleu score (for normalized data)
|
| 45 |
+
rougeL: rougeL score (for normalized data)
|
| 46 |
+
levenstein_distance: levenstein distance (for normalized data)
|
| 47 |
+
format_score: score for correctness of generated output format
|
| 48 |
Examples:
|
| 49 |
Examples should be written in doctest format, and should illustrate how
|
| 50 |
to use the function.
|
| 51 |
|
| 52 |
+
>>> my_new_module = evaluate.load("DoctorSlimm/bangalore_score")
|
| 53 |
+
>>> results = my_new_module.compute(references=[str, str], predictions=[str, str])
|
| 54 |
>>> print(results)
|
| 55 |
+
{'bleu': 0.5, 'rougeL': 0.5, 'levenstein_distance': 0.5, 'format_score': 0.5}
|
| 56 |
"""
|
| 57 |
|
| 58 |
# TODO: Define external resources urls if needed
|