Datasets:

Modalities:
Text
Size:
< 1K
Libraries:
Datasets
rajivratn commited on
Commit
fc38796
·
1 Parent(s): b688f58

Update test_ldkp.py

Browse files
Files changed (1) hide show
  1. test_ldkp.py +4 -4
test_ldkp.py CHANGED
@@ -62,8 +62,8 @@ class TestLDKP(datasets.GeneratorBasedBuilder):
62
  if self.config.name == "ldkp": # This is the name of the configuration selected in BUILDER_CONFIGS above
63
  features = datasets.Features(
64
  {
65
- "text": list(str),
66
- "BIO_tags": list(str)
67
  #"text": datasets.Value("string"),
68
  #"BIO_tags": datasets.Value("string")
69
  # "answer": datasets.Value("string")
@@ -141,8 +141,8 @@ class TestLDKP(datasets.GeneratorBasedBuilder):
141
  if self.config.name == "ldkp":
142
  # Yields examples as (key, example) tuples
143
  yield key, {
144
- "text": data["abstract"]+data["other_sec"],
145
- "BIO_tags": data["abstract_tags"] + data["other_sec_tags"]
146
  # "answer": "" if split == "test" else data["answer"],
147
  }
148
  else:
 
62
  if self.config.name == "ldkp": # This is the name of the configuration selected in BUILDER_CONFIGS above
63
  features = datasets.Features(
64
  {
65
+ "text": datasets.features.Sequence({'txt':datasets.Value("string")}),
66
+ "BIO_tags": datasets.features.Sequence({'txt':datasets.Value("string")})
67
  #"text": datasets.Value("string"),
68
  #"BIO_tags": datasets.Value("string")
69
  # "answer": datasets.Value("string")
 
141
  if self.config.name == "ldkp":
142
  # Yields examples as (key, example) tuples
143
  yield key, {
144
+ "text": {"txt":data["abstract"]+data["other_sec"]},
145
+ "BIO_tags": {'tag':data["abstract_tags"] + data["other_sec_tags"]}
146
  # "answer": "" if split == "test" else data["answer"],
147
  }
148
  else: