Datasets:
EMBO
/

Languages:
English
ArXiv:
DOI:
License:
drAbreu commited on
Commit
8d77973
1 Parent(s): ef7da8f

Update SourceData.py

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