Datasets:

Modalities:
Text
Languages:
English
Size:
< 1K
Libraries:
Datasets
License:
gabrielaltay commited on
Commit
8c6b295
1 Parent(s): 3176ece

fix parsing imports

Browse files
Files changed (1) hide show
  1. bionlp_st_2011_id.py +6 -3
bionlp_st_2011_id.py CHANGED
@@ -21,6 +21,9 @@ import datasets
21
  from .bigbiohub import kb_features
22
  from .bigbiohub import BigBioConfig
23
  from .bigbiohub import Tasks
 
 
 
24
 
25
  _DATASETNAME = "bionlp_st_2011_id"
26
  _DISPLAYNAME = "BioNLP 2011 ID"
@@ -242,14 +245,14 @@ class bionlp_st_2011_id(datasets.GeneratorBasedBuilder):
242
  if self.config.schema == "source":
243
  txt_files = list(data_files.glob("*txt"))
244
  for guid, txt_file in enumerate(txt_files):
245
- example = parsing.parse_brat_file(txt_file)
246
  example["id"] = str(guid)
247
  yield guid, example
248
  elif self.config.schema == "bigbio_kb":
249
  txt_files = list(data_files.glob("*txt"))
250
  for guid, txt_file in enumerate(txt_files):
251
- example = parsing.brat_parse_to_bigbio_kb(
252
- parsing.parse_brat_file(txt_file)
253
  )
254
  example = self._standardize_arguments_roles(example)
255
  example["id"] = str(guid)
 
21
  from .bigbiohub import kb_features
22
  from .bigbiohub import BigBioConfig
23
  from .bigbiohub import Tasks
24
+ from .bigbiohub import parse_brat_file
25
+ from .bigbiohub import brat_parse_to_bigbio_kb
26
+
27
 
28
  _DATASETNAME = "bionlp_st_2011_id"
29
  _DISPLAYNAME = "BioNLP 2011 ID"
 
245
  if self.config.schema == "source":
246
  txt_files = list(data_files.glob("*txt"))
247
  for guid, txt_file in enumerate(txt_files):
248
+ example = parse_brat_file(txt_file)
249
  example["id"] = str(guid)
250
  yield guid, example
251
  elif self.config.schema == "bigbio_kb":
252
  txt_files = list(data_files.glob("*txt"))
253
  for guid, txt_file in enumerate(txt_files):
254
+ example = brat_parse_to_bigbio_kb(
255
+ parse_brat_file(txt_file)
256
  )
257
  example = self._standardize_arguments_roles(example)
258
  example["id"] = str(guid)