system HF staff commited on
Commit
45db91b
0 Parent(s):

Update files from the datasets library (from 1.2.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.2.0

.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.model filter=lfs diff=lfs merge=lfs -text
12
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
13
+ *.onnx filter=lfs diff=lfs merge=lfs -text
14
+ *.ot filter=lfs diff=lfs merge=lfs -text
15
+ *.parquet filter=lfs diff=lfs merge=lfs -text
16
+ *.pb filter=lfs diff=lfs merge=lfs -text
17
+ *.pt filter=lfs diff=lfs merge=lfs -text
18
+ *.pth filter=lfs diff=lfs merge=lfs -text
19
+ *.rar filter=lfs diff=lfs merge=lfs -text
20
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
22
+ *.tflite filter=lfs diff=lfs merge=lfs -text
23
+ *.tgz filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,188 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language_creators:
5
+ - expert-generated
6
+ languages:
7
+ - en
8
+ licenses:
9
+ - other-my-license
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 10K<n<100K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - other
18
+ task_ids:
19
+ - other-other-NCI-PID-PubMed Genomics Knowledge Base Completion Dataset
20
+ ---
21
+
22
+ # Dataset Card for [Dataset Name]
23
+
24
+ ## Table of Contents
25
+ - [Dataset Description](#dataset-description)
26
+ - [Dataset Summary](#dataset-summary)
27
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
28
+ - [Languages](#languages)
29
+ - [Dataset Structure](#dataset-structure)
30
+ - [Data Instances](#data-instances)
31
+ - [Data Fields](#data-instances)
32
+ - [Data Splits](#data-instances)
33
+ - [Dataset Creation](#dataset-creation)
34
+ - [Curation Rationale](#curation-rationale)
35
+ - [Source Data](#source-data)
36
+ - [Annotations](#annotations)
37
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
38
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
39
+ - [Social Impact of Dataset](#social-impact-of-dataset)
40
+ - [Discussion of Biases](#discussion-of-biases)
41
+ - [Other Known Limitations](#other-known-limitations)
42
+ - [Additional Information](#additional-information)
43
+ - [Dataset Curators](#dataset-curators)
44
+ - [Licensing Information](#licensing-information)
45
+ - [Citation Information](#citation-information)
46
+
47
+ ## Dataset Description
48
+
49
+ - **Homepage:** [NCI-PID-PubMed Genomics Knowledge Base Completion Dataset](https://msropendata.com/datasets/80b4f6e8-5d7c-4abc-9c79-2e51dfedd791)
50
+ - **Repository:** [NCI-PID-PubMed Genomics Knowledge Base Completion Dataset](NCI-PID-PubMed Genomics Knowledge Base Completion Dataset)
51
+ - **Paper:** [Compositional Learning of Embeddings for Relation Paths in Knowledge Base and Text](https://www.aclweb.org/anthology/P16-1136/)
52
+ - **Point of Contact:** [Kristina Toutanova](mailto:kristout@google.com)
53
+
54
+
55
+ ### Dataset Summary
56
+
57
+ The database is derived from the NCI PID Pathway Interaction Database, and the textual mentions are extracted from cooccurring pairs of genes in PubMed abstracts, processed and annotated by Literome (Poon et al. 2014). This dataset was used in the paper “Compositional Learning of Embeddings for Relation Paths in Knowledge Bases and Text” (Toutanova, Lin, Yih, Poon, and Quirk, 2016). More details can be found in the included README.
58
+
59
+
60
+ ### Supported Tasks and Leaderboards
61
+
62
+ [More Information Needed]
63
+
64
+ ### Languages
65
+
66
+ English
67
+
68
+ ## Dataset Structure
69
+
70
+ NCI-PID-PubMed Genomics Knowledge Base Completion Dataset
71
+
72
+ This dataset includes a database of regulation relationships among genes and corresponding textual mentions of pairs of genes in PubMed article abstracts.
73
+ The database is derived from the NCI PID Pathway Interaction Database, and the textual mentions are extracted from cooccurring pairs of genes in PubMed abstracts, processed and annotated by Literome. This dataset was used in the paper "Compositional Learning of Embeddings for Relation Paths in Knowledge Bases and Text".
74
+
75
+ FILE FORMAT DETAILS
76
+
77
+ The files train.txt, valid.txt, and test.text contain the training, development, and test set knowledge base (database of regulation relationships) triples used in.
78
+ The file text.txt contains the textual triples derived from PubMed via entity linking and processing with Literome. The textual mentions were used for knowledge base completion in.
79
+
80
+ The separator is a tab character; the relations are Positive_regulation, Negative_regulation, and Family (Family relationships occur only in the training set).
81
+
82
+ The format is:
83
+
84
+ | GENE1 | relation | GENE2 |
85
+
86
+ Example:
87
+ ABL1 Positive_regulation CDK2
88
+
89
+ The separator is a tab character; the relations are Positive_regulation, Negative_regulation, and Family (Family relationships occur only in the training set).
90
+
91
+ ### Data Instances
92
+
93
+ [More Information Needed]
94
+
95
+ ### Data Fields
96
+
97
+ The format is:
98
+
99
+ | GENE1 | relation | GENE2 |
100
+
101
+ ### Data Splits
102
+
103
+ [More Information Needed]
104
+
105
+ ## Dataset Creation
106
+
107
+ [More Information Needed]
108
+
109
+ ### Curation Rationale
110
+
111
+ [More Information Needed]
112
+
113
+ ### Source Data
114
+
115
+ [More Information Needed]
116
+
117
+ #### Initial Data Collection and Normalization
118
+
119
+ [More Information Needed]
120
+
121
+ #### Who are the source language producers?
122
+
123
+ [More Information Needed]
124
+
125
+ ### Annotations
126
+
127
+ [More Information Needed]
128
+
129
+ #### Annotation process
130
+
131
+ [More Information Needed]
132
+
133
+ #### Who are the annotators?
134
+
135
+ [More Information Needed]
136
+
137
+ ### Personal and Sensitive Information
138
+
139
+ [More Information Needed]
140
+
141
+ ## Considerations for Using the Data
142
+
143
+ [More Information Needed]
144
+
145
+ ### Social Impact of Dataset
146
+
147
+ [More Information Needed]
148
+
149
+ ### Discussion of Biases
150
+
151
+ [More Information Needed]
152
+
153
+ ### Other Known Limitations
154
+
155
+ [More Information Needed]
156
+
157
+ ## Additional Information
158
+
159
+ [More Information Needed]
160
+
161
+ ### Dataset Curators
162
+
163
+ The dataset was initially created by Kristina Toutanova, Victoria Lin, Wen-tau Yih, Hoifung Poon and Chris Quirk, during work done at Microsoft Research.
164
+
165
+ ### Licensing Information
166
+
167
+ [More Information Needed]
168
+
169
+ ### Citation Information
170
+
171
+ ```
172
+ @inproceedings{toutanova-etal-2016-compositional,
173
+ title = "Compositional Learning of Embeddings for Relation Paths in Knowledge Base and Text",
174
+ author = "Toutanova, Kristina and
175
+ Lin, Victoria and
176
+ Yih, Wen-tau and
177
+ Poon, Hoifung and
178
+ Quirk, Chris",
179
+ booktitle = "Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
180
+ month = aug,
181
+ year = "2016",
182
+ address = "Berlin, Germany",
183
+ publisher = "Association for Computational Linguistics",
184
+ url = "https://www.aclweb.org/anthology/P16-1136",
185
+ doi = "10.18653/v1/P16-1136",
186
+ pages = "1434--1444",
187
+ }
188
+ ```
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"default": {"description": "The database is derived from the NCI PID Pathway Interaction Database, and the textual mentions are extracted from cooccurring pairs of genes in PubMed abstracts, processed and annotated by Literome (Poon et al. 2014). This dataset was used in the paper \u201cCompositional Learning of Embeddings for Relation Paths in Knowledge Bases and Text\u201d (Toutanova, Lin, Yih, Poon, and Quirk, 2016). \n", "citation": "@inproceedings{toutanova-etal-2016-compositional,\n title = \"Compositional Learning of Embeddings for Relation Paths in Knowledge Base and Text\",\n author = \"Toutanova, Kristina and\n Lin, Victoria and\n Yih, Wen-tau and\n Poon, Hoifung and\n Quirk, Chris\",\n booktitle = \"Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)\",\n month = aug,\n year = \"2016\",\n address = \"Berlin, Germany\",\n publisher = \"Association for Computational Linguistics\",\n url = \"https://www.aclweb.org/anthology/P16-1136\",\n doi = \"10.18653/v1/P16-1136\",\n pages = \"1434--1444\",\n}\n", "homepage": "_HOMEPAGE", "license": "", "features": {"GENE1": {"dtype": "string", "id": null, "_type": "Value"}, "relation": {"num_classes": 3, "names": ["Positive_regulation", "Negative_regulation", "Family"], "names_file": null, "id": null, "_type": "ClassLabel"}, "GENE2": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "msr_genomics_kbcomp", "config_name": "default", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 256789, "num_examples": 12160, "dataset_name": "msr_genomics_kbcomp"}, "test": {"name": "test", "num_bytes": 58116, "num_examples": 2784, "dataset_name": "msr_genomics_kbcomp"}, "validation": {"name": "validation", "num_bytes": 27457, "num_examples": 1315, "dataset_name": "msr_genomics_kbcomp"}}, "download_checksums": {}, "download_size": 0, "post_processing_size": null, "dataset_size": 342362, "size_in_bytes": 342362}}
dummy/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4124e85ca1b81823d5f13edf7b7e03ff0c5fdd7a21b205fce30be064879f868f
3
+ size 18809
msr_genomics_kbcomp.py ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ from __future__ import absolute_import, division, print_function
17
+
18
+ import csv
19
+ import os
20
+
21
+ import datasets
22
+
23
+
24
+ # Find for instance the citation on arxiv or on the dataset repo/website
25
+ _CITATION = """\
26
+ @inproceedings{toutanova-etal-2016-compositional,
27
+ title = "Compositional Learning of Embeddings for Relation Paths in Knowledge Base and Text",
28
+ author = "Toutanova, Kristina and
29
+ Lin, Victoria and
30
+ Yih, Wen-tau and
31
+ Poon, Hoifung and
32
+ Quirk, Chris",
33
+ booktitle = "Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
34
+ month = aug,
35
+ year = "2016",
36
+ address = "Berlin, Germany",
37
+ publisher = "Association for Computational Linguistics",
38
+ url = "https://www.aclweb.org/anthology/P16-1136",
39
+ doi = "10.18653/v1/P16-1136",
40
+ pages = "1434--1444",
41
+ }
42
+ """
43
+
44
+ _DESCRIPTION = """\
45
+ The database is derived from the NCI PID Pathway Interaction Database, and the textual mentions are extracted from cooccurring pairs of genes in PubMed abstracts, processed and annotated by Literome (Poon et al. 2014). This dataset was used in the paper “Compositional Learning of Embeddings for Relation Paths in Knowledge Bases and Text” (Toutanova, Lin, Yih, Poon, and Quirk, 2016).
46
+ """
47
+
48
+ _HOMEPAGE = "https://msropendata.com/datasets/80b4f6e8-5d7c-4abc-9c79-2e51dfedd791"
49
+
50
+
51
+ class MsrGenomicsKbcomp(datasets.GeneratorBasedBuilder):
52
+
53
+ VERSION = datasets.Version("1.1.0")
54
+
55
+ @property
56
+ def manual_download_instructions(self):
57
+ return """\
58
+ To use msr_genomics_kbcomp you need to download it manually. Please go to its homepage (https://msropendata.com/datasets/80b4f6e8-5d7c-4abc-9c79-2e51dfedd791)and login. Extract all files in one folder and use the path folder in datasets.load_dataset('msr_genomics_kbcomp', data_dir='path/to/folder/folder_name')
59
+ """
60
+
61
+ def _info(self):
62
+ return datasets.DatasetInfo(
63
+ # This is the description that will appear on the datasets page.
64
+ description=_DESCRIPTION,
65
+ # datasets.features.FeatureConnectors
66
+ features=datasets.Features(
67
+ {
68
+ # These are the features of your dataset like images, labels ...
69
+ "GENE1": datasets.Value("string"),
70
+ "relation": datasets.features.ClassLabel(
71
+ names=["Positive_regulation", "Negative_regulation", "Family"]
72
+ ),
73
+ "GENE2": datasets.Value("string"),
74
+ }
75
+ ),
76
+ # If there's a common (input, target) tuple from the features,
77
+ # specify them here. They'll be used if as_supervised=True in
78
+ # builder.as_dataset.
79
+ supervised_keys=None,
80
+ # Homepage of the dataset for documentation
81
+ homepage="_HOMEPAGE",
82
+ citation=_CITATION,
83
+ )
84
+
85
+ def _split_generators(self, dl_manager):
86
+ """Returns SplitGenerators."""
87
+ # dl_manager is a datasets.download.DownloadManager that can be used to
88
+ # download and extract URLs
89
+ data_dir = os.path.abspath(os.path.expanduser(dl_manager.manual_dir))
90
+
91
+ if not os.path.exists(data_dir):
92
+ raise FileNotFoundError(
93
+ "{} does not exist. Make sure you insert a manual dir via `datasets.load_dataset('msr_genomics_kbcomp', data_dir=...)` that includes files unzipped from the reclor zip. Manual download instructions: {}".format(
94
+ data_dir, self.manual_download_instructions
95
+ )
96
+ )
97
+ return [
98
+ datasets.SplitGenerator(
99
+ name=datasets.Split.TRAIN,
100
+ # These kwargs will be passed to _generate_examples
101
+ gen_kwargs={"filepath": os.path.join(data_dir, "train.txt")},
102
+ ),
103
+ datasets.SplitGenerator(
104
+ name=datasets.Split.TEST,
105
+ # These kwargs will be passed to _generate_examples
106
+ gen_kwargs={"filepath": os.path.join(data_dir, "test.txt")},
107
+ ),
108
+ datasets.SplitGenerator(
109
+ name=datasets.Split.VALIDATION,
110
+ # These kwargs will be passed to _generate_examples
111
+ gen_kwargs={"filepath": os.path.join(data_dir, "valid.txt")},
112
+ ),
113
+ ]
114
+
115
+ def _generate_examples(self, filepath):
116
+ """Yields examples."""
117
+ with open(filepath, encoding="utf-8") as f:
118
+ data = csv.DictReader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
119
+ for id_, row in enumerate(data):
120
+ yield id_, {
121
+ "GENE1": row["GENE1"],
122
+ "relation": row["relation"],
123
+ "GENE2": row["GENE2"],
124
+ }