Spaces:
Runtime error
Runtime error
Commit
Β·
d0bdd04
1
Parent(s):
749b801
Fix input format
Browse files- relation_extraction.py +14 -2
relation_extraction.py
CHANGED
|
@@ -72,8 +72,20 @@ class relation_extraction(evaluate.Metric):
|
|
| 72 |
inputs_description=_KWARGS_DESCRIPTION,
|
| 73 |
# This defines the format of each prediction and reference
|
| 74 |
features=datasets.Features({
|
| 75 |
-
'predictions': datasets.
|
| 76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
}),
|
| 78 |
# Homepage of the module for documentation
|
| 79 |
homepage="http://module.homepage",
|
|
|
|
| 72 |
inputs_description=_KWARGS_DESCRIPTION,
|
| 73 |
# This defines the format of each prediction and reference
|
| 74 |
features=datasets.Features({
|
| 75 |
+
'predictions': datasets.Sequence(datasets.Sequence(datasets.Features({
|
| 76 |
+
"head": datasets.Value("string"),
|
| 77 |
+
"head_type": datasets.Value("string"),
|
| 78 |
+
"type": datasets.Value("string"),
|
| 79 |
+
"tail": datasets.Value("string"),
|
| 80 |
+
"tail_type": datasets.Value("string"),
|
| 81 |
+
}))),
|
| 82 |
+
'references': datasets.Sequence(datasets.Sequence(datasets.Features({
|
| 83 |
+
"head": datasets.Value("string"),
|
| 84 |
+
"head_type": datasets.Value("string"),
|
| 85 |
+
"type": datasets.Value("string"),
|
| 86 |
+
"tail": datasets.Value("string"),
|
| 87 |
+
"tail_type": datasets.Value("string"),
|
| 88 |
+
}))),
|
| 89 |
}),
|
| 90 |
# Homepage of the module for documentation
|
| 91 |
homepage="http://module.homepage",
|