Spaces:
Runtime error
Runtime error
Update meaningbert.py
Browse files- meaningbert.py +3 -2
meaningbert.py
CHANGED
|
@@ -76,7 +76,7 @@ Examples:
|
|
| 76 |
|
| 77 |
>>> documents = ["hello there", "general kenobi"]
|
| 78 |
>>> simplifications = ["hello there", "general kenobi"]
|
| 79 |
-
>>> meaning_bert = evaluate.load("meaningbert")
|
| 80 |
>>> results = meaning_bert.compute(documents=documents, simplifications=simplifications)
|
| 81 |
"""
|
| 82 |
|
|
@@ -84,7 +84,7 @@ _HASH = "21845c0cc85a2e8e16c89bb0053f489095cf64c5b19e9c3865d3e10047aba51b"
|
|
| 84 |
|
| 85 |
|
| 86 |
@evaluate.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
|
| 87 |
-
class
|
| 88 |
def _info(self):
|
| 89 |
return evaluate.MetricInfo(
|
| 90 |
description=_DESCRIPTION,
|
|
@@ -104,6 +104,7 @@ class MeaningBERTScore(evaluate.Metric):
|
|
| 104 |
"https://github.com/GRAAL-Research/MeaningBERT",
|
| 105 |
"https://www.frontiersin.org/articles/10.3389/frai.2023.1223924/full",
|
| 106 |
],
|
|
|
|
| 107 |
)
|
| 108 |
|
| 109 |
def _compute(
|
|
|
|
| 76 |
|
| 77 |
>>> documents = ["hello there", "general kenobi"]
|
| 78 |
>>> simplifications = ["hello there", "general kenobi"]
|
| 79 |
+
>>> meaning_bert = evaluate.load("davebulaval/meaningbert")
|
| 80 |
>>> results = meaning_bert.compute(documents=documents, simplifications=simplifications)
|
| 81 |
"""
|
| 82 |
|
|
|
|
| 84 |
|
| 85 |
|
| 86 |
@evaluate.utils.file_utils.add_start_docstrings(_DESCRIPTION, _KWARGS_DESCRIPTION)
|
| 87 |
+
class MeaningBERT(evaluate.Metric):
|
| 88 |
def _info(self):
|
| 89 |
return evaluate.MetricInfo(
|
| 90 |
description=_DESCRIPTION,
|
|
|
|
| 104 |
"https://github.com/GRAAL-Research/MeaningBERT",
|
| 105 |
"https://www.frontiersin.org/articles/10.3389/frai.2023.1223924/full",
|
| 106 |
],
|
| 107 |
+
module_type="metric",
|
| 108 |
)
|
| 109 |
|
| 110 |
def _compute(
|