Datasets:

Languages:
English
License:
system HF staff commited on
Commit
30228f0
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,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language_creators:
5
+ - expert-generated
6
+ languages:
7
+ - en
8
+ licenses:
9
+ - unknown
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 10K<n<100K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - structure-prediction
18
+ task_ids:
19
+ - named-entity-recognition
20
+ ---
21
+
22
+ # Dataset Card for [Dataset Name]
23
+
24
+ ## Table of Contents
25
+ - [Dataset Card for [Dataset Name]](#dataset-card-for-dataset-name)
26
+ - [Table of Contents](#table-of-contents)
27
+ - [Dataset Description](#dataset-description)
28
+ - [Dataset Summary](#dataset-summary)
29
+ - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
30
+ - [Languages](#languages)
31
+ - [Dataset Structure](#dataset-structure)
32
+ - [Data Instances](#data-instances)
33
+ - [Data Fields](#data-fields)
34
+ - [Data Splits](#data-splits)
35
+ - [Dataset Creation](#dataset-creation)
36
+ - [Curation Rationale](#curation-rationale)
37
+ - [Source Data](#source-data)
38
+ - [Initial Data Collection and Normalization](#initial-data-collection-and-normalization)
39
+ - [Who are the source language producers?](#who-are-the-source-language-producers)
40
+ - [Annotations](#annotations)
41
+ - [Annotation process](#annotation-process)
42
+ - [Who are the annotators?](#who-are-the-annotators)
43
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
44
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
45
+ - [Social Impact of Dataset](#social-impact-of-dataset)
46
+ - [Discussion of Biases](#discussion-of-biases)
47
+ - [Other Known Limitations](#other-known-limitations)
48
+ - [Additional Information](#additional-information)
49
+ - [Dataset Curators](#dataset-curators)
50
+ - [Licensing Information](#licensing-information)
51
+ - [Citation Information](#citation-information)
52
+
53
+ ## Dataset Description
54
+
55
+ - **Homepage:** [linnaeus](http://linnaeus.sourceforge.net/)
56
+ - **Repository:**
57
+ - **Paper:** [BMC Bioinformatics](https://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-11-85)
58
+ - **Leaderboard:**
59
+ - **Point of Contact:**
60
+
61
+ ### Dataset Summary
62
+
63
+ [More Information Needed]
64
+
65
+ ### Supported Tasks and Leaderboards
66
+
67
+ [More Information Needed]
68
+
69
+ ### Languages
70
+
71
+ [More Information Needed]
72
+
73
+ ## Dataset Structure
74
+
75
+ ### Data Instances
76
+
77
+ [More Information Needed]
78
+
79
+ ### Data Fields
80
+
81
+ - `id`: Sentence identifier.
82
+ - `tokens`: Array of tokens composing a sentence.
83
+ - `ner_tags`: Array of tags, where `0` indicates no species mentioned, `1` signals the first token of a species and `2` the subsequent tokens of the species.
84
+
85
+ ### Data Splits
86
+
87
+ [More Information Needed]
88
+
89
+ ## Dataset Creation
90
+
91
+ ### Curation Rationale
92
+
93
+ [More Information Needed]
94
+
95
+ ### Source Data
96
+
97
+ #### Initial Data Collection and Normalization
98
+
99
+ [More Information Needed]
100
+
101
+ #### Who are the source language producers?
102
+
103
+ [More Information Needed]
104
+
105
+ ### Annotations
106
+
107
+ #### Annotation process
108
+
109
+ [More Information Needed]
110
+
111
+ #### Who are the annotators?
112
+
113
+ [More Information Needed]
114
+
115
+ ### Personal and Sensitive Information
116
+
117
+ [More Information Needed]
118
+
119
+ ## Considerations for Using the Data
120
+
121
+ ### Social Impact of Dataset
122
+
123
+ [More Information Needed]
124
+
125
+ ### Discussion of Biases
126
+
127
+ [More Information Needed]
128
+
129
+ ### Other Known Limitations
130
+
131
+ [More Information Needed]
132
+
133
+ ## Additional Information
134
+
135
+ ### Dataset Curators
136
+
137
+ [More Information Needed]
138
+
139
+ ### Licensing Information
140
+
141
+ [More Information Needed]
142
+
143
+ ### Citation Information
144
+
145
+ [More Information Needed]
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"linnaeus": {"description": "A novel corpus of full-text documents manually annotated for species mentions.\n", "citation": "@article{gerner2010linnaeus,\n title={LINNAEUS: a species name identification system for biomedical literature},\n author={Gerner, Martin and Nenadic, Goran and Bergman, Casey M},\n journal={BMC bioinformatics},\n volume={11},\n number={1},\n pages={85},\n year={2010},\n publisher={Springer}\n}\n", "homepage": "http://linnaeus.sourceforge.net/", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "tokens": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "ner_tags": {"feature": {"num_classes": 3, "names": ["O", "B", "I"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "linnaeus", "config_name": "linnaeus", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 4772417, "num_examples": 11936, "dataset_name": "linnaeus"}, "validation": {"name": "validation", "num_bytes": 1592823, "num_examples": 4079, "dataset_name": "linnaeus"}, "test": {"name": "test", "num_bytes": 2802877, "num_examples": 7143, "dataset_name": "linnaeus"}}, "download_checksums": {"https://drive.google.com/u/0/uc?id=1OletxmPYNkz2ltOr9pyT0b0iBtUWxslh&export=download/": {"num_bytes": 18204624, "checksum": "30522c752fd90e6da05f117a52da13174b246e4980e46840e6e1737dc67e1d27"}}, "download_size": 18204624, "post_processing_size": null, "dataset_size": 9168117, "size_in_bytes": 27372741}}
dummy/linnaeus/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d63b26856cc74dbb464ea22d709946e67caff7291bbeec323f6368518d73f7e2
3
+ size 12082
linnaeus.py ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 HuggingFace Datasets Authors.
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
+ # Lint as: python3
17
+ """LINNAEUS: A species name identification system for biomedical literature"""
18
+
19
+ import logging
20
+ import os
21
+
22
+ import datasets
23
+
24
+
25
+ _CITATION = """\
26
+ @article{gerner2010linnaeus,
27
+ title={LINNAEUS: a species name identification system for biomedical literature},
28
+ author={Gerner, Martin and Nenadic, Goran and Bergman, Casey M},
29
+ journal={BMC bioinformatics},
30
+ volume={11},
31
+ number={1},
32
+ pages={85},
33
+ year={2010},
34
+ publisher={Springer}
35
+ }
36
+ """
37
+
38
+ _DESCRIPTION = """\
39
+ A novel corpus of full-text documents manually annotated for species mentions.
40
+ """
41
+
42
+ _HOMEPAGE = "http://linnaeus.sourceforge.net/"
43
+ _URL = "https://drive.google.com/u/0/uc?id=1OletxmPYNkz2ltOr9pyT0b0iBtUWxslh&export=download/"
44
+ _BIOBERT_NER_DATASET_DIRECTORY = "linnaeus"
45
+ _TRAINING_FILE = "train.tsv"
46
+ _DEV_FILE = "devel.tsv"
47
+ _TEST_FILE = "test.tsv"
48
+
49
+
50
+ class LinnaeusConfig(datasets.BuilderConfig):
51
+ """BuilderConfig for Linnaeus"""
52
+
53
+ def __init__(self, **kwargs):
54
+ """BuilderConfig for Linnaeus.
55
+ Args:
56
+ **kwargs: keyword arguments forwarded to super.
57
+ """
58
+ super(LinnaeusConfig, self).__init__(**kwargs)
59
+
60
+
61
+ class Linnaeus(datasets.GeneratorBasedBuilder):
62
+ """Linnaeus dataset."""
63
+
64
+ BUILDER_CONFIGS = [
65
+ LinnaeusConfig(name="linnaeus", version=datasets.Version("1.0.0"), description="Linnaeus dataset"),
66
+ ]
67
+
68
+ def _info(self):
69
+ return datasets.DatasetInfo(
70
+ description=_DESCRIPTION,
71
+ features=datasets.Features(
72
+ {
73
+ "id": datasets.Value("string"),
74
+ "tokens": datasets.Sequence(datasets.Value("string")),
75
+ "ner_tags": datasets.Sequence(
76
+ datasets.features.ClassLabel(
77
+ names=[
78
+ "O",
79
+ "B",
80
+ "I",
81
+ ]
82
+ )
83
+ ),
84
+ }
85
+ ),
86
+ supervised_keys=None,
87
+ homepage=_HOMEPAGE,
88
+ citation=_CITATION,
89
+ )
90
+
91
+ def _split_generators(self, dl_manager):
92
+ """Returns SplitGenerators."""
93
+ urls_to_download = {
94
+ "biobert_ner_datasets": _URL,
95
+ }
96
+ downloaded_files = dl_manager.download_and_extract(urls_to_download)
97
+ dataset_directory = os.path.join(downloaded_files["biobert_ner_datasets"], _BIOBERT_NER_DATASET_DIRECTORY)
98
+ return [
99
+ datasets.SplitGenerator(
100
+ name=datasets.Split.TRAIN, gen_kwargs={"filepath": os.path.join(dataset_directory, _TRAINING_FILE)}
101
+ ),
102
+ datasets.SplitGenerator(
103
+ name=datasets.Split.VALIDATION, gen_kwargs={"filepath": os.path.join(dataset_directory, _DEV_FILE)}
104
+ ),
105
+ datasets.SplitGenerator(
106
+ name=datasets.Split.TEST, gen_kwargs={"filepath": os.path.join(dataset_directory, _TEST_FILE)}
107
+ ),
108
+ ]
109
+
110
+ def _generate_examples(self, filepath):
111
+ logging.info("⏳ Generating examples from = %s", filepath)
112
+ with open(filepath, encoding="utf-8") as f:
113
+ guid = 0
114
+ tokens = []
115
+ ner_tags = []
116
+ for line in f:
117
+ if line.startswith("-DOCSTART-") or line == "" or line == "\n":
118
+ if tokens:
119
+ yield guid, {
120
+ "id": str(guid),
121
+ "tokens": tokens,
122
+ "ner_tags": ner_tags,
123
+ }
124
+ guid += 1
125
+ tokens = []
126
+ ner_tags = []
127
+ else:
128
+ # tokens are tab separated
129
+ splits = line.split("\t")
130
+ tokens.append(splits[0])
131
+ ner_tags.append(splits[1].rstrip())
132
+ # last example
133
+ yield guid, {
134
+ "id": str(guid),
135
+ "tokens": tokens,
136
+ "ner_tags": ner_tags,
137
+ }