gabrielaltay commited on
Commit
e984dc5
1 Parent(s): 44e17e4

fix bigbio imports

Browse files
Files changed (1) hide show
  1. ctebmsp.py +6 -3
ctebmsp.py CHANGED
@@ -32,6 +32,9 @@ import datasets
32
  from .bigbiohub import kb_features
33
  from .bigbiohub import BigBioConfig
34
  from .bigbiohub import Tasks
 
 
 
35
 
36
  _LANGUAGES = ['Spanish']
37
  _PUBMED = True
@@ -259,14 +262,14 @@ class CTEBMSpDataset(datasets.GeneratorBasedBuilder):
259
 
260
  if self.config.schema == "source":
261
  for guid, txt_file in enumerate(txt_files):
262
- example = parsing.parse_brat_file(txt_file)
263
  example["id"] = str(guid)
264
  yield guid, example
265
 
266
  elif self.config.schema == "bigbio_kb":
267
  for guid, txt_file in enumerate(txt_files):
268
- example = parsing.brat_parse_to_bigbio_kb(
269
- parsing.parse_brat_file(txt_file)
270
  )
271
  example["id"] = str(guid)
272
  yield guid, example
 
32
  from .bigbiohub import kb_features
33
  from .bigbiohub import BigBioConfig
34
  from .bigbiohub import Tasks
35
+ from .bigbiohub import parse_brat_file
36
+ from .bigbiohub import brat_parse_to_bigbio_kb
37
+
38
 
39
  _LANGUAGES = ['Spanish']
40
  _PUBMED = True
 
262
 
263
  if self.config.schema == "source":
264
  for guid, txt_file in enumerate(txt_files):
265
+ example = parse_brat_file(txt_file)
266
  example["id"] = str(guid)
267
  yield guid, example
268
 
269
  elif self.config.schema == "bigbio_kb":
270
  for guid, txt_file in enumerate(txt_files):
271
+ example = brat_parse_to_bigbio_kb(
272
+ parse_brat_file(txt_file)
273
  )
274
  example["id"] = str(guid)
275
  yield guid, example