Datasets:

Languages:
Japanese
License:
Kosuke-Yamada commited on
Commit
e826634
1 Parent(s): 4460792

modify features

Browse files
Files changed (1) hide show
  1. ner-wikipedia-dataset.py +7 -13
ner-wikipedia-dataset.py CHANGED
@@ -99,15 +99,13 @@ class NerWikipediaDataset(datasets.GeneratorBasedBuilder):
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
  }
@@ -151,10 +149,6 @@ class NerWikipediaDataset(datasets.GeneratorBasedBuilder):
151
  test_data = data[validation_split:]
152
 
153
  return [
154
- datasets.SplitGenerator(
155
- name=datasets.Split.ALL,
156
- gen_kwargs={"data": data},
157
- ),
158
  datasets.SplitGenerator(
159
  name=datasets.Split.TRAIN,
160
  gen_kwargs={"data": train_data},
 
99
  "curid": datasets.Value("string"),
100
  "text": datasets.Value("string"),
101
  "entities": datasets.Sequence(
102
+ {
103
+ "name": datasets.Value(dtype="string"),
104
+ "span": datasets.Sequence(
105
+ datasets.Value(dtype="int64"), length=2
106
+ ),
107
+ "type": datasets.Value(dtype="string"),
108
+ }
 
 
109
  ),
110
  # These are the features of your dataset like images, labels ...
111
  }
 
149
  test_data = data[validation_split:]
150
 
151
  return [
 
 
 
 
152
  datasets.SplitGenerator(
153
  name=datasets.Split.TRAIN,
154
  gen_kwargs={"data": train_data},