Datasets:

Modalities:
Text
ArXiv:
Libraries:
Datasets
rajivratn commited on
Commit
1dc0337
1 Parent(s): 51f604c

Update inspec.py

Browse files
Files changed (1) hide show
  1. inspec.py +11 -11
inspec.py CHANGED
@@ -51,7 +51,7 @@ class TestLDKP(datasets.GeneratorBasedBuilder):
51
  if self.config.name == "extraction" or self.config.name == "ldkp_extraction": # This is the name of the configuration selected in BUILDER_CONFIGS above
52
  features = datasets.Features(
53
  {
54
- "id": datasets.Value("int64")
55
  "document": datasets.features.Sequence(datasets.Value("string")),
56
  "BIO_tags": datasets.features.Sequence(datasets.Value("string"))
57
 
@@ -60,7 +60,7 @@ class TestLDKP(datasets.GeneratorBasedBuilder):
60
  elif self.config.name == "generation" or self.config.name == "ldkp_generation":
61
  features = datasets.Features(
62
  {
63
- "id": datasets.Value("int64")
64
  "document": datasets.features.Sequence(datasets.Value("string")),
65
  "extractive_keyphrases": datasets.features.Sequence(datasets.Value("string")),
66
  "abstractive_keyphrases": datasets.features.Sequence(datasets.Value("string"))
@@ -70,7 +70,7 @@ class TestLDKP(datasets.GeneratorBasedBuilder):
70
  else:
71
  features = datasets.Features(
72
  {
73
- "id": datasets.Value("int64")
74
  "document": datasets.features.Sequence(datasets.Value("string")),
75
  "document_tags": datasets.features.Sequence(datasets.Value("string")),
76
  "extractive_keyphrases": datasets.features.Sequence(datasets.Value("string")),
@@ -101,14 +101,14 @@ class TestLDKP(datasets.GeneratorBasedBuilder):
101
 
102
  data_dir = dl_manager.download_and_extract(_URLS)
103
  return [
104
- datasets.SplitGenerator(
105
- name=datasets.Split.TRAIN,
106
- # These kwargs will be passed to _generate_examples
107
- gen_kwargs={
108
- "filepath": data_dir['train'],
109
- "split": "train",
110
- },
111
- ),
112
  datasets.SplitGenerator(
113
  name=datasets.Split.TEST,
114
  # These kwargs will be passed to _generate_examples
 
51
  if self.config.name == "extraction" or self.config.name == "ldkp_extraction": # This is the name of the configuration selected in BUILDER_CONFIGS above
52
  features = datasets.Features(
53
  {
54
+ "id": datasets.Value("int64"),
55
  "document": datasets.features.Sequence(datasets.Value("string")),
56
  "BIO_tags": datasets.features.Sequence(datasets.Value("string"))
57
 
 
60
  elif self.config.name == "generation" or self.config.name == "ldkp_generation":
61
  features = datasets.Features(
62
  {
63
+ "id": datasets.Value("int64"),
64
  "document": datasets.features.Sequence(datasets.Value("string")),
65
  "extractive_keyphrases": datasets.features.Sequence(datasets.Value("string")),
66
  "abstractive_keyphrases": datasets.features.Sequence(datasets.Value("string"))
 
70
  else:
71
  features = datasets.Features(
72
  {
73
+ "id": datasets.Value("int64"),
74
  "document": datasets.features.Sequence(datasets.Value("string")),
75
  "document_tags": datasets.features.Sequence(datasets.Value("string")),
76
  "extractive_keyphrases": datasets.features.Sequence(datasets.Value("string")),
 
101
 
102
  data_dir = dl_manager.download_and_extract(_URLS)
103
  return [
104
+ # datasets.SplitGenerator(
105
+ # name=datasets.Split.TRAIN,
106
+ # # These kwargs will be passed to _generate_examples
107
+ # gen_kwargs={
108
+ # "filepath": data_dir['train'],
109
+ # "split": "train",
110
+ # },
111
+ # ),
112
  datasets.SplitGenerator(
113
  name=datasets.Split.TEST,
114
  # These kwargs will be passed to _generate_examples