Commit ·
ba68baa
1
Parent(s): c9227e4
fix bigbio imports
Browse files34 unmodified lines3536373839404142209 unmodified lines25225325425325525625725825926026126026126226326426526634 unmodified linesfrom .bigbiohub import kb_featuresfrom .bigbiohub import BigBioConfigfrom .bigbiohub import Tasksfrom .bigbiohub import parse_brat_filefrom .bigbiohub import brat_parse_to_bigbio_kb
_LANGUAGES = ['English']_PUBMED = True209 unmodified lines if self.config.schema == "source": txt_files = data_files["text_files"] for guid, txt_file in enumerate(txt_files): example = parsing.parse_brat_file(txt_file) example = parse_brat_file(txt_file) example["id"] = str(guid) yield guid, example
elif self.config.schema == "bigbio_kb": txt_files = data_files["text_files"] for guid, txt_file in enumerate(txt_files): example = parsing.brat_parse_to_bigbio_kb( parsing.parse_brat_file(txt_file) example = brat_parse_to_bigbio_kb( parse_brat_file(txt_file) ) example["id"] = str(guid) yield guid, exampleverspoor_2013.py+5-3