Kosuke-Yamada
commited on
Commit
•
4460792
1
Parent(s):
707ae5a
modify the difinition of features
Browse files- ner-wikipedia-dataset.py +9 -7
ner-wikipedia-dataset.py
CHANGED
@@ -99,13 +99,15 @@ class NerWikipediaDataset(datasets.GeneratorBasedBuilder):
|
|
99 |
"curid": datasets.Value("string"),
|
100 |
"text": datasets.Value("string"),
|
101 |
"entities": datasets.Sequence(
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
datasets.
|
106 |
-
|
107 |
-
|
108 |
-
|
|
|
|
|
109 |
),
|
110 |
# These are the features of your dataset like images, labels ...
|
111 |
}
|
|
|
99 |
"curid": datasets.Value("string"),
|
100 |
"text": datasets.Value("string"),
|
101 |
"entities": datasets.Sequence(
|
102 |
+
[
|
103 |
+
{
|
104 |
+
"name": datasets.Value(dtype="string"),
|
105 |
+
"span": datasets.Sequence(
|
106 |
+
datasets.Value(dtype="int64"), length=2
|
107 |
+
),
|
108 |
+
"type": datasets.Value(dtype="string"),
|
109 |
+
}
|
110 |
+
]
|
111 |
),
|
112 |
# These are the features of your dataset like images, labels ...
|
113 |
}
|