albertvillanova HF staff commited on
Commit
fe41a26
1 Parent(s): 4ee9af4

Delete trailing empty example (#4)

Browse files

- Do not yield trailing empty example (36bc69a0d29d2d3c432f9decca7c7c34dff0a2fd)
- Delete legacy dataset_infos.json (225df9f30b27e7c9fcc144a3483e6b905eadc5e7)
- Fix num_examples metadata in dataset card (33647c6133a2550bbbe73b7b8869c34bdafb2c77)

Files changed (3) hide show
  1. README.md +8 -8
  2. bc2gm_corpus.py +6 -5
  3. dataset_infos.json +0 -1
README.md CHANGED
@@ -19,6 +19,7 @@ task_ids:
19
  - named-entity-recognition
20
  pretty_name: Bc2GmCorpus
21
  dataset_info:
 
22
  features:
23
  - name: id
24
  dtype: string
@@ -31,19 +32,18 @@ dataset_info:
31
  '0': O
32
  '1': B-GENE
33
  '2': I-GENE
34
- config_name: bc2gm_corpus
35
  splits:
36
  - name: train
37
- num_bytes: 6095172
38
- num_examples: 12501
39
  - name: validation
40
- num_bytes: 1215951
41
- num_examples: 2501
42
  - name: test
43
- num_bytes: 2454621
44
- num_examples: 5001
45
  download_size: 4636753
46
- dataset_size: 9765744
47
  ---
48
 
49
  # Dataset Card for bc2gm_corpus
 
19
  - named-entity-recognition
20
  pretty_name: Bc2GmCorpus
21
  dataset_info:
22
+ config_name: bc2gm_corpus
23
  features:
24
  - name: id
25
  dtype: string
 
32
  '0': O
33
  '1': B-GENE
34
  '2': I-GENE
 
35
  splits:
36
  - name: train
37
+ num_bytes: 6095123
38
+ num_examples: 12500
39
  - name: validation
40
+ num_bytes: 1215919
41
+ num_examples: 2500
42
  - name: test
43
+ num_bytes: 2454589
44
+ num_examples: 5000
45
  download_size: 4636753
46
+ dataset_size: 9765631
47
  ---
48
 
49
  # Dataset Card for bc2gm_corpus
bc2gm_corpus.py CHANGED
@@ -135,8 +135,9 @@ class Bc2gmCorpus(datasets.GeneratorBasedBuilder):
135
  tokens.append(splits[0])
136
  ner_tags.append(splits[1].rstrip())
137
  # last example
138
- yield guid, {
139
- "id": str(guid),
140
- "tokens": tokens,
141
- "ner_tags": ner_tags,
142
- }
 
 
135
  tokens.append(splits[0])
136
  ner_tags.append(splits[1].rstrip())
137
  # last example
138
+ if tokens:
139
+ yield guid, {
140
+ "id": str(guid),
141
+ "tokens": tokens,
142
+ "ner_tags": ner_tags,
143
+ }
dataset_infos.json DELETED
@@ -1 +0,0 @@
1
- {"bc2gm_corpus": {"description": "Nineteen teams presented results for the Gene Mention Task at the BioCreative II Workshop. \nIn this task participants designed systems to identify substrings in sentences corresponding to gene name mentions. \nA variety of different methods were used and the results varied with a highest achieved F1 score of 0.8721. \nHere we present brief descriptions of all the methods used and a statistical analysis of the results. \nWe also demonstrate that, by combining the results from all submissions, an F score of 0.9066 is feasible, \nand furthermore that the best result makes use of the lowest scoring submissions.\n\nFor more details, see: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2559986/\n\nThe original dataset can be downloaded from: https://biocreative.bioinformatics.udel.edu/resources/corpora/biocreative-ii-corpus/\nThis dataset has been converted to CoNLL format for NER using the following tool: https://github.com/spyysalo/standoff2conll\n", "citation": "@article{smith2008overview,\n title={Overview of BioCreative II gene mention recognition},\n author={Smith, Larry and Tanabe, Lorraine K and nee Ando, Rie Johnson and Kuo, Cheng-Ju and Chung, I-Fang and Hsu, Chun-Nan and Lin, Yu-Shi and Klinger, Roman and Friedrich, Christoph M and Ganchev, Kuzman and others},\n journal={Genome biology},\n volume={9},\n number={S2},\n pages={S2},\n year={2008},\n publisher={Springer}\n}\n", "homepage": "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2559986/", "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-GENE", "I-GENE"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "bc2gm_corpus", "config_name": "bc2gm_corpus", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 6095172, "num_examples": 12501, "dataset_name": "bc2gm_corpus"}, "validation": {"name": "validation", "num_bytes": 1215951, "num_examples": 2501, "dataset_name": "bc2gm_corpus"}, "test": {"name": "test", "num_bytes": 2454621, "num_examples": 5001, "dataset_name": "bc2gm_corpus"}}, "download_checksums": {"https://github.com/spyysalo/bc2gm-corpus/raw/master/conll/train.tsv": {"num_bytes": 2894093, "checksum": "07f696560252dc5a3d47a5cea1ce36b7434865131b5bc4b3a6d1fb02a382ce10"}, "https://github.com/spyysalo/bc2gm-corpus/raw/master/conll/devel.tsv": {"num_bytes": 577641, "checksum": "639fe423c00beeb33e83ef71e90af765c6d9cde61f52df0fbbb9d624302f5437"}, "https://github.com/spyysalo/bc2gm-corpus/raw/master/conll/test.tsv": {"num_bytes": 1165019, "checksum": "ac7745e40d97ffdf603aae661da37fa6065a7e2f9067ea1f47bfae3e5bf5d583"}}, "download_size": 4636753, "post_processing_size": null, "dataset_size": 9765744, "size_in_bytes": 14402497}}