Commit
•
d42e878
1
Parent(s):
37e51f3
Fix style
Browse files- bionlp_st_2011_epi.py +6 -6
bionlp_st_2011_epi.py
CHANGED
@@ -32,7 +32,7 @@ _DISPLAYNAME = "BioNLP 2011 EPI"
|
|
32 |
_SOURCE_VIEW_NAME = "source"
|
33 |
_UNIFIED_VIEW_NAME = "bigbio"
|
34 |
|
35 |
-
_LANGUAGES = [
|
36 |
_PUBMED = True
|
37 |
_LOCAL = False
|
38 |
_CITATION = """\
|
@@ -59,7 +59,7 @@ of BioNLP Shared Task 2011.
|
|
59 |
|
60 |
_HOMEPAGE = "https://github.com/openbiocorpora/bionlp-st-2011-epi"
|
61 |
|
62 |
-
_LICENSE =
|
63 |
|
64 |
_URLs = {
|
65 |
"train": "data/train.zip",
|
@@ -207,7 +207,9 @@ class bionlp_st_2011_epi(datasets.GeneratorBasedBuilder):
|
|
207 |
),
|
208 |
datasets.SplitGenerator(
|
209 |
name=datasets.Split.VALIDATION,
|
210 |
-
gen_kwargs={
|
|
|
|
|
211 |
),
|
212 |
datasets.SplitGenerator(
|
213 |
name=datasets.Split.TEST,
|
@@ -232,9 +234,7 @@ class bionlp_st_2011_epi(datasets.GeneratorBasedBuilder):
|
|
232 |
txt_file = Path(data_file)
|
233 |
if txt_file.suffix != ".txt":
|
234 |
continue
|
235 |
-
example = brat_parse_to_bigbio_kb(
|
236 |
-
parse_brat_file(txt_file)
|
237 |
-
)
|
238 |
example["id"] = str(guid)
|
239 |
yield guid, example
|
240 |
guid += 1
|
|
|
32 |
_SOURCE_VIEW_NAME = "source"
|
33 |
_UNIFIED_VIEW_NAME = "bigbio"
|
34 |
|
35 |
+
_LANGUAGES = ["English"]
|
36 |
_PUBMED = True
|
37 |
_LOCAL = False
|
38 |
_CITATION = """\
|
|
|
59 |
|
60 |
_HOMEPAGE = "https://github.com/openbiocorpora/bionlp-st-2011-epi"
|
61 |
|
62 |
+
_LICENSE = "GENIA Project License for Annotated Corpora"
|
63 |
|
64 |
_URLs = {
|
65 |
"train": "data/train.zip",
|
|
|
207 |
),
|
208 |
datasets.SplitGenerator(
|
209 |
name=datasets.Split.VALIDATION,
|
210 |
+
gen_kwargs={
|
211 |
+
"data_files": dl_manager.iter_files(data_files["validation"])
|
212 |
+
},
|
213 |
),
|
214 |
datasets.SplitGenerator(
|
215 |
name=datasets.Split.TEST,
|
|
|
234 |
txt_file = Path(data_file)
|
235 |
if txt_file.suffix != ".txt":
|
236 |
continue
|
237 |
+
example = brat_parse_to_bigbio_kb(parse_brat_file(txt_file))
|
|
|
|
|
238 |
example["id"] = str(guid)
|
239 |
yield guid, example
|
240 |
guid += 1
|