Datasets:
Update SourceData.py
Browse files- SourceData.py +16 -17
SourceData.py
CHANGED
@@ -69,24 +69,23 @@ class SourceData(datasets.GeneratorBasedBuilder):
|
|
69 |
_LICENSE = "CC-BY 4.0"
|
70 |
|
71 |
DEFAULT_CONFIG_NAME = "NER"
|
72 |
-
|
73 |
-
def __init__(self):
|
74 |
-
self.VERSION = datasets.Version(self.config.version)
|
75 |
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
}
|
83 |
-
self.
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
|
|
|
|
90 |
|
91 |
def _info(self):
|
92 |
if self.config.name == "NER":
|
|
|
69 |
_LICENSE = "CC-BY 4.0"
|
70 |
|
71 |
DEFAULT_CONFIG_NAME = "NER"
|
|
|
|
|
|
|
72 |
|
73 |
+
VERSION = datasets.Version(self.version)
|
74 |
+
|
75 |
+
self._URLS = {
|
76 |
+
"NER": f"{_BASE_URL}token_classification/v_{self.config.version}/ner/",
|
77 |
+
"PANELIZATION": f"{_BASE_URL}token_classification/v_{self.config.version}/panelization/",
|
78 |
+
"ROLES_GP": f"{_BASE_URL}token_classification/v_{self.config.version}/roles_gene/",
|
79 |
+
"ROLES_SM": f"{_BASE_URL}token_classification/v_{self.config.version}/roles_small_mol/",
|
80 |
+
"ROLES_MULTI": f"{_BASE_URL}token_classification/v_{self.config.version}/roles_multi/",
|
81 |
+
}
|
82 |
+
self.BUILDER_CONFIGS = [
|
83 |
+
datasets.BuilderConfig(name="NER", version=self.VERSION, description="Dataset for named-entity recognition."),
|
84 |
+
datasets.BuilderConfig(name="PANELIZATION", version=self.VERSION, description="Dataset to separate figure captions into panels."),
|
85 |
+
datasets.BuilderConfig(name="ROLES_GP", version=self.VERSION, description="Dataset for semantic roles of gene products."),
|
86 |
+
datasets.BuilderConfig(name="ROLES_SM", version=self.VERSION, description="Dataset for semantic roles of small molecules."),
|
87 |
+
datasets.BuilderConfig(name="ROLES_MULTI", version=self.VERSION, description="Dataset to train roles. ROLES_GP and ROLES_SM at once."),
|
88 |
+
]
|
89 |
|
90 |
def _info(self):
|
91 |
if self.config.name == "NER":
|