Spaces:
Runtime error
Runtime error
davebulaval commited on
Commit Β·
1541189
1
Parent(s): 364be12
fix deprecated keyed elements
Browse files- meaningbert.py +6 -6
meaningbert.py
CHANGED
|
@@ -64,13 +64,13 @@ _KWARGS_DESCRIPTION = """
|
|
| 64 |
MeaningBERT metric for assessing meaning preservation between sentences.
|
| 65 |
|
| 66 |
Args:
|
| 67 |
-
predictions (list of str): Predictions sentences
|
| 68 |
-
references (list of str): References sentences.
|
| 69 |
device (str): Device to use for model inference. By default, set to "cuda".
|
| 70 |
|
| 71 |
Returns:
|
| 72 |
-
score: the meaning score between two sentences in alist format respecting the order of the
|
| 73 |
-
|
| 74 |
hashcode: Hashcode of the library.
|
| 75 |
|
| 76 |
Examples:
|
|
@@ -95,8 +95,8 @@ class MeaningBERT(evaluate.Metric):
|
|
| 95 |
features=[
|
| 96 |
datasets.Features(
|
| 97 |
{
|
| 98 |
-
"
|
| 99 |
-
"
|
| 100 |
}
|
| 101 |
)
|
| 102 |
],
|
|
|
|
| 64 |
MeaningBERT metric for assessing meaning preservation between sentences.
|
| 65 |
|
| 66 |
Args:
|
| 67 |
+
predictions (list of str): Predictions sentences.
|
| 68 |
+
references (list of str): References sentences (same number of element as predictions).
|
| 69 |
device (str): Device to use for model inference. By default, set to "cuda".
|
| 70 |
|
| 71 |
Returns:
|
| 72 |
+
score: the meaning score between two sentences in alist format respecting the order of the predictions and
|
| 73 |
+
references pairs.
|
| 74 |
hashcode: Hashcode of the library.
|
| 75 |
|
| 76 |
Examples:
|
|
|
|
| 95 |
features=[
|
| 96 |
datasets.Features(
|
| 97 |
{
|
| 98 |
+
"predictions": datasets.Value("string", id="sequence"),
|
| 99 |
+
"references": datasets.Value("string", id="sequence"),
|
| 100 |
}
|
| 101 |
)
|
| 102 |
],
|