Datasets:

Modalities:
Text
Libraries:
Datasets
dibyaaaaax commited on
Commit
bed4bc8
·
1 Parent(s): 0a01f63

Update kptimes.py

Browse files
Files changed (1) hide show
  1. kptimes.py +17 -20
kptimes.py CHANGED
@@ -74,8 +74,7 @@ class KPTimes(datasets.GeneratorBasedBuilder):
74
  "doc_bio_tags": datasets.features.Sequence(datasets.Value("string")),
75
  "extractive_keyphrases": datasets.features.Sequence(datasets.Value("string")),
76
  "abstractive_keyphrases": datasets.features.Sequence(datasets.Value("string")),
77
- "other_metadata": datasets.features.Sequence(
78
- {
79
  "id": datasets.Value("string"),
80
  "categories": [datasets.Value("string")],
81
  "date": datasets.Value("string"),
@@ -83,8 +82,6 @@ class KPTimes(datasets.GeneratorBasedBuilder):
83
  "abstract": datasets.Value("string"),
84
  "keyword": datasets.Value("string"),
85
  }
86
- )
87
-
88
  }
89
  )
90
  return datasets.DatasetInfo(
@@ -103,22 +100,22 @@ class KPTimes(datasets.GeneratorBasedBuilder):
103
 
104
  data_dir = dl_manager.download_and_extract(_URLS)
105
  return [
106
- datasets.SplitGenerator(
107
- name=datasets.Split.TRAIN,
108
- # These kwargs will be passed to _generate_examples
109
- gen_kwargs={
110
- "filepath": data_dir['train'],
111
- "split": "train",
112
- },
113
- ),
114
- datasets.SplitGenerator(
115
- name=datasets.Split.TEST,
116
- # These kwargs will be passed to _generate_examples
117
- gen_kwargs={
118
- "filepath": data_dir['test'],
119
- "split": "test"
120
- },
121
- ),
122
  datasets.SplitGenerator(
123
  name=datasets.Split.VALIDATION,
124
  # These kwargs will be passed to _generate_examples
 
74
  "doc_bio_tags": datasets.features.Sequence(datasets.Value("string")),
75
  "extractive_keyphrases": datasets.features.Sequence(datasets.Value("string")),
76
  "abstractive_keyphrases": datasets.features.Sequence(datasets.Value("string")),
77
+ "other_metadata": {
 
78
  "id": datasets.Value("string"),
79
  "categories": [datasets.Value("string")],
80
  "date": datasets.Value("string"),
 
82
  "abstract": datasets.Value("string"),
83
  "keyword": datasets.Value("string"),
84
  }
 
 
85
  }
86
  )
87
  return datasets.DatasetInfo(
 
100
 
101
  data_dir = dl_manager.download_and_extract(_URLS)
102
  return [
103
+ # datasets.SplitGenerator(
104
+ # name=datasets.Split.TRAIN,
105
+ # # These kwargs will be passed to _generate_examples
106
+ # gen_kwargs={
107
+ # "filepath": data_dir['train'],
108
+ # "split": "train",
109
+ # },
110
+ # ),
111
+ # datasets.SplitGenerator(
112
+ # name=datasets.Split.TEST,
113
+ # # These kwargs will be passed to _generate_examples
114
+ # gen_kwargs={
115
+ # "filepath": data_dir['test'],
116
+ # "split": "test"
117
+ # },
118
+ # ),
119
  datasets.SplitGenerator(
120
  name=datasets.Split.VALIDATION,
121
  # These kwargs will be passed to _generate_examples