Datasets:

Modalities:
Text
Languages:
English
Libraries:
Datasets
License:
gabrielaltay commited on
Commit
72974b7
1 Parent(s): 73e58c0

fix parsing import remove_prefix

Browse files
Files changed (1) hide show
  1. bionlp_st_2019_bb.py +2 -1
bionlp_st_2019_bb.py CHANGED
@@ -22,6 +22,7 @@ from .bigbiohub import kb_features
22
  from .bigbiohub import BigBioConfig
23
  from .bigbiohub import Tasks
24
  from .bigbiohub import brat_parse_to_bigbio_kb
 
25
 
26
 
27
  _DATASETNAME = "bionlp_st_2019_bb"
@@ -473,7 +474,7 @@ class bionlp_st_2019_bb(datasets.GeneratorBasedBuilder):
473
  if ann["type"] in ["Title", "Paragraph"]:
474
  continue
475
  ann["offsets"] = []
476
- span_str = parsing.remove_prefix(fields[1], (ann["type"] + " "))
477
  text = fields[2]
478
  for span in span_str.split(";"):
479
  start, end = span.split()
 
22
  from .bigbiohub import BigBioConfig
23
  from .bigbiohub import Tasks
24
  from .bigbiohub import brat_parse_to_bigbio_kb
25
+ from .bigbiohub import remove_prefix
26
 
27
 
28
  _DATASETNAME = "bionlp_st_2019_bb"
 
474
  if ann["type"] in ["Title", "Paragraph"]:
475
  continue
476
  ann["offsets"] = []
477
+ span_str = remove_prefix(fields[1], (ann["type"] + " "))
478
  text = fields[2]
479
  for span in span_str.split(";"):
480
  start, end = span.split()