Datasets:
PereLluis13
commited on
Commit
·
e5b5750
1
Parent(s):
139eb58
Update REDFM.py
Browse files
REDFM.py
CHANGED
@@ -102,10 +102,10 @@ class RedFM(datasets.GeneratorBasedBuilder):
|
|
102 |
"uri": datasets.Value("string"),
|
103 |
"lan": datasets.Value("string"),
|
104 |
"text": datasets.Value("string"),
|
105 |
-
"entities":
|
106 |
-
"relations":
|
107 |
'predicate': datasets.ClassLabel(num_classes=32, names=['country', 'place of birth', 'spouse', 'country of citizenship', 'instance of', 'capital', 'child', 'shares border with', 'author', 'director', 'occupation', 'founded by', 'league', 'owned by', 'genre', 'named after', 'follows', 'headquarters location', 'cast member', 'manufacturer', 'located in or next to body of water', 'location', 'part of', 'mouth of the watercourse', 'member of', 'sport', 'characters', 'participant', 'notable work', 'replaces', 'sibling', 'inception']),
|
108 |
-
'object': datasets.Features({'uri': datasets.Value(dtype='string'), 'surfaceform': datasets.Value(dtype='string'), 'type': datasets.Value(dtype='string'), 'start': datasets.Value(dtype='int32'), 'end': datasets.Value(dtype='int32')})}
|
109 |
}
|
110 |
)
|
111 |
else:
|
@@ -115,10 +115,10 @@ class RedFM(datasets.GeneratorBasedBuilder):
|
|
115 |
"title": datasets.Value("string"),
|
116 |
"uri": datasets.Value("string"),
|
117 |
"text": datasets.Value("string"),
|
118 |
-
"entities":
|
119 |
-
"relations":
|
120 |
'predicate': datasets.ClassLabel(num_classes=32, names=['country', 'place of birth', 'spouse', 'country of citizenship', 'instance of', 'capital', 'child', 'shares border with', 'author', 'director', 'occupation', 'founded by', 'league', 'owned by', 'genre', 'named after', 'follows', 'headquarters location', 'cast member', 'manufacturer', 'located in or next to body of water', 'location', 'part of', 'mouth of the watercourse', 'member of', 'sport', 'characters', 'participant', 'notable work', 'replaces', 'sibling', 'inception']),
|
121 |
-
'object': datasets.Features({'uri': datasets.Value(dtype='string'), 'surfaceform': datasets.Value(dtype='string'), 'type': datasets.Value(dtype='string'), 'start': datasets.Value(dtype='int32'), 'end': datasets.Value(dtype='int32')})}
|
122 |
}
|
123 |
)
|
124 |
return datasets.DatasetInfo(
|
|
|
102 |
"uri": datasets.Value("string"),
|
103 |
"lan": datasets.Value("string"),
|
104 |
"text": datasets.Value("string"),
|
105 |
+
"entities": [{'uri': datasets.Value(dtype='string'), 'surfaceform': datasets.Value(dtype='string'), 'type': datasets.Value(dtype='string'), 'start': datasets.Value(dtype='int32'), 'end': datasets.Value(dtype='int32')}],
|
106 |
+
"relations": [{'subject': datasets.Features({'uri': datasets.Value(dtype='string'), 'surfaceform': datasets.Value(dtype='string'), 'type': datasets.Value(dtype='string'), 'start': datasets.Value(dtype='int32'), 'end': datasets.Value(dtype='int32')}),
|
107 |
'predicate': datasets.ClassLabel(num_classes=32, names=['country', 'place of birth', 'spouse', 'country of citizenship', 'instance of', 'capital', 'child', 'shares border with', 'author', 'director', 'occupation', 'founded by', 'league', 'owned by', 'genre', 'named after', 'follows', 'headquarters location', 'cast member', 'manufacturer', 'located in or next to body of water', 'location', 'part of', 'mouth of the watercourse', 'member of', 'sport', 'characters', 'participant', 'notable work', 'replaces', 'sibling', 'inception']),
|
108 |
+
'object': datasets.Features({'uri': datasets.Value(dtype='string'), 'surfaceform': datasets.Value(dtype='string'), 'type': datasets.Value(dtype='string'), 'start': datasets.Value(dtype='int32'), 'end': datasets.Value(dtype='int32')})}],
|
109 |
}
|
110 |
)
|
111 |
else:
|
|
|
115 |
"title": datasets.Value("string"),
|
116 |
"uri": datasets.Value("string"),
|
117 |
"text": datasets.Value("string"),
|
118 |
+
"entities": [{'uri': datasets.Value(dtype='string'), 'surfaceform': datasets.Value(dtype='string'), 'type': datasets.Value(dtype='string'), 'start': datasets.Value(dtype='int32'), 'end': datasets.Value(dtype='int32')}],
|
119 |
+
"relations": [{'subject': datasets.Features({'uri': datasets.Value(dtype='string'), 'surfaceform': datasets.Value(dtype='string'), 'type': datasets.Value(dtype='string'), 'start': datasets.Value(dtype='int32'), 'end': datasets.Value(dtype='int32')}),
|
120 |
'predicate': datasets.ClassLabel(num_classes=32, names=['country', 'place of birth', 'spouse', 'country of citizenship', 'instance of', 'capital', 'child', 'shares border with', 'author', 'director', 'occupation', 'founded by', 'league', 'owned by', 'genre', 'named after', 'follows', 'headquarters location', 'cast member', 'manufacturer', 'located in or next to body of water', 'location', 'part of', 'mouth of the watercourse', 'member of', 'sport', 'characters', 'participant', 'notable work', 'replaces', 'sibling', 'inception']),
|
121 |
+
'object': datasets.Features({'uri': datasets.Value(dtype='string'), 'surfaceform': datasets.Value(dtype='string'), 'type': datasets.Value(dtype='string'), 'start': datasets.Value(dtype='int32'), 'end': datasets.Value(dtype='int32')})}],
|
122 |
}
|
123 |
)
|
124 |
return datasets.DatasetInfo(
|