Tom Aarsen commited on
Commit
e93ba6f
1 Parent(s): f272d85

Appy patch - ignore last (empty) tokens

Browse files
Files changed (3) hide show
  1. README.md +17 -17
  2. conll2002.py +10 -9
  3. dataset_infos.json +1 -1
README.md CHANGED
@@ -21,6 +21,9 @@ task_ids:
21
  - part-of-speech
22
  paperswithcode_id: conll-2002
23
  pretty_name: CoNLL-2002
 
 
 
24
  dataset_info:
25
  - config_name: es
26
  features:
@@ -107,16 +110,16 @@ dataset_info:
107
  '8': I-MISC
108
  splits:
109
  - name: train
110
- num_bytes: 6672173
111
- num_examples: 8324
112
  - name: validation
113
- num_bytes: 1333784
114
- num_examples: 1916
115
  - name: test
116
- num_bytes: 1294156
117
- num_examples: 1518
118
  download_size: 4140690
119
- dataset_size: 9300113
120
  - config_name: nl
121
  features:
122
  - name: id
@@ -154,19 +157,16 @@ dataset_info:
154
  '8': I-MISC
155
  splits:
156
  - name: train
157
- num_bytes: 5308959
158
- num_examples: 15807
159
  - name: validation
160
- num_bytes: 994298
161
- num_examples: 2896
162
  - name: test
163
- num_bytes: 1808862
164
- num_examples: 5196
165
  download_size: 3642241
166
- dataset_size: 8112119
167
- config_names:
168
- - es
169
- - nl
170
  ---
171
 
172
  # Dataset Card for CoNLL-2002
 
21
  - part-of-speech
22
  paperswithcode_id: conll-2002
23
  pretty_name: CoNLL-2002
24
+ config_names:
25
+ - es
26
+ - nl
27
  dataset_info:
28
  - config_name: es
29
  features:
 
110
  '8': I-MISC
111
  splits:
112
  - name: train
113
+ num_bytes: 6672133
114
+ num_examples: 8323
115
  - name: validation
116
+ num_bytes: 1333744
117
+ num_examples: 1915
118
  - name: test
119
+ num_bytes: 1294116
120
+ num_examples: 1517
121
  download_size: 4140690
122
+ dataset_size: 9299993
123
  - config_name: nl
124
  features:
125
  - name: id
 
157
  '8': I-MISC
158
  splits:
159
  - name: train
160
+ num_bytes: 5308898
161
+ num_examples: 15806
162
  - name: validation
163
+ num_bytes: 994258
164
+ num_examples: 2895
165
  - name: test
166
+ num_bytes: 1808822
167
+ num_examples: 5195
168
  download_size: 3642241
169
+ dataset_size: 8111978
 
 
 
170
  ---
171
 
172
  # Dataset Card for CoNLL-2002
conll2002.py CHANGED
@@ -75,8 +75,8 @@ class Conll2002(datasets.GeneratorBasedBuilder):
75
  """Conll2002 dataset."""
76
 
77
  BUILDER_CONFIGS = [
78
- Conll2002Config(name="es", version=datasets.Version("1.0.0"), description="Conll2002 Spanish dataset"),
79
- Conll2002Config(name="nl", version=datasets.Version("1.0.0"), description="Conll2002 Dutch dataset"),
80
  ]
81
 
82
  def _info(self):
@@ -219,10 +219,11 @@ class Conll2002(datasets.GeneratorBasedBuilder):
219
  tokens.append(splits[0])
220
  pos_tags.append(splits[1])
221
  ner_tags.append(splits[2].rstrip())
222
- # last example
223
- yield guid, {
224
- "id": str(guid),
225
- "tokens": tokens,
226
- "pos_tags": pos_tags,
227
- "ner_tags": ner_tags,
228
- }
 
 
75
  """Conll2002 dataset."""
76
 
77
  BUILDER_CONFIGS = [
78
+ Conll2002Config(name="es", version=datasets.Version("1.0.1"), description="Conll2002 Spanish dataset"),
79
+ Conll2002Config(name="nl", version=datasets.Version("1.0.1"), description="Conll2002 Dutch dataset"),
80
  ]
81
 
82
  def _info(self):
 
219
  tokens.append(splits[0])
220
  pos_tags.append(splits[1])
221
  ner_tags.append(splits[2].rstrip())
222
+ if tokens:
223
+ # last example
224
+ yield guid, {
225
+ "id": str(guid),
226
+ "tokens": tokens,
227
+ "pos_tags": pos_tags,
228
+ "ner_tags": ner_tags,
229
+ }
dataset_infos.json CHANGED
@@ -1 +1 @@
1
- {"es": {"description": "Named entities are phrases that contain the names of persons, organizations, locations, times and quantities.\n\nExample:\n[PER Wolff] , currently a journalist in [LOC Argentina] , played with [PER Del Bosque] in the final years of the seventies in [ORG Real Madrid] .\n\nThe shared task of CoNLL-2002 concerns language-independent named entity recognition.\nWe will concentrate on four types of named entities: persons, locations, organizations and names of miscellaneous entities that do not belong to the previous three groups.\nThe participants of the shared task will be offered training and test data for at least two languages.\nThey will use the data for developing a named-entity recognition system that includes a machine learning component.\nInformation sources other than the training data may be used in this shared task.\nWe are especially interested in methods that can use additional unannotated data for improving their performance (for example co-training).\n\nThe train/validation/test sets are available in Spanish and Dutch.\n\nFor more details see https://www.clips.uantwerpen.be/conll2002/ner/ and https://www.aclweb.org/anthology/W02-2024/\n", "citation": "@inproceedings{tjong-kim-sang-2002-introduction,\n title = \"Introduction to the {C}o{NLL}-2002 Shared Task: Language-Independent Named Entity Recognition\",\n author = \"Tjong Kim Sang, Erik F.\",\n booktitle = \"{COLING}-02: The 6th Conference on Natural Language Learning 2002 ({C}o{NLL}-2002)\",\n year = \"2002\",\n url = \"https://www.aclweb.org/anthology/W02-2024\",\n}\n", "homepage": "https://www.aclweb.org/anthology/W02-2024/", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "tokens": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "pos_tags": {"feature": {"num_classes": 60, "names": ["AO", "AQ", "CC", "CS", "DA", "DE", "DD", "DI", "DN", "DP", "DT", "Faa", "Fat", "Fc", "Fd", "Fe", "Fg", "Fh", "Fia", "Fit", "Fp", "Fpa", "Fpt", "Fs", "Ft", "Fx", "Fz", "I", "NC", "NP", "P0", "PD", "PI", "PN", "PP", "PR", "PT", "PX", "RG", "RN", "SP", "VAI", "VAM", "VAN", "VAP", "VAS", "VMG", "VMI", "VMM", "VMN", "VMP", "VMS", "VSG", "VSI", "VSM", "VSN", "VSP", "VSS", "Y", "Z"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}, "ner_tags": {"feature": {"num_classes": 9, "names": ["O", "B-PER", "I-PER", "B-ORG", "I-ORG", "B-LOC", "I-LOC", "B-MISC", "I-MISC"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "conll2002", "config_name": "es", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 6672173, "num_examples": 8324, "dataset_name": "conll2002"}, "validation": {"name": "validation", "num_bytes": 1333784, "num_examples": 1916, "dataset_name": "conll2002"}, "test": {"name": "test", "num_bytes": 1294156, "num_examples": 1518, "dataset_name": "conll2002"}}, "download_checksums": {"https://raw.githubusercontent.com/teropa/nlp/master/resources/corpora/conll2002/esp.train": {"num_bytes": 2970825, "checksum": "a20d95cab7d88a19a86f8c1ad6329325c99fbd9529ed978cbd7e31d4b01b4008"}, "https://raw.githubusercontent.com/teropa/nlp/master/resources/corpora/conll2002/esp.testa": {"num_bytes": 594058, "checksum": "85c17793b77881c53d19017d9d0f1e6fb98b7ddcab54a5f24b05ed1793103c87"}, "https://raw.githubusercontent.com/teropa/nlp/master/resources/corpora/conll2002/esp.testb": {"num_bytes": 575807, "checksum": "1f8f7a392c6d4979a5592a5794eed43d7869b46da6851bbcde99714149f1d016"}}, "download_size": 4140690, "post_processing_size": null, "dataset_size": 9300113, "size_in_bytes": 13440803}, "nl": {"description": "Named entities are phrases that contain the names of persons, organizations, locations, times and quantities.\n\nExample:\n[PER Wolff] , currently a journalist in [LOC Argentina] , played with [PER Del Bosque] in the final years of the seventies in [ORG Real Madrid] .\n\nThe shared task of CoNLL-2002 concerns language-independent named entity recognition.\nWe will concentrate on four types of named entities: persons, locations, organizations and names of miscellaneous entities that do not belong to the previous three groups.\nThe participants of the shared task will be offered training and test data for at least two languages.\nThey will use the data for developing a named-entity recognition system that includes a machine learning component.\nInformation sources other than the training data may be used in this shared task.\nWe are especially interested in methods that can use additional unannotated data for improving their performance (for example co-training).\n\nThe train/validation/test sets are available in Spanish and Dutch.\n\nFor more details see https://www.clips.uantwerpen.be/conll2002/ner/ and https://www.aclweb.org/anthology/W02-2024/\n", "citation": "@inproceedings{tjong-kim-sang-2002-introduction,\n title = \"Introduction to the {C}o{NLL}-2002 Shared Task: Language-Independent Named Entity Recognition\",\n author = \"Tjong Kim Sang, Erik F.\",\n booktitle = \"{COLING}-02: The 6th Conference on Natural Language Learning 2002 ({C}o{NLL}-2002)\",\n year = \"2002\",\n url = \"https://www.aclweb.org/anthology/W02-2024\",\n}\n", "homepage": "https://www.aclweb.org/anthology/W02-2024/", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "tokens": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "pos_tags": {"feature": {"num_classes": 12, "names": ["Adj", "Adv", "Art", "Conj", "Int", "Misc", "N", "Num", "Prep", "Pron", "Punc", "V"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}, "ner_tags": {"feature": {"num_classes": 9, "names": ["O", "B-PER", "I-PER", "B-ORG", "I-ORG", "B-LOC", "I-LOC", "B-MISC", "I-MISC"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "conll2002", "config_name": "nl", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 5308959, "num_examples": 15807, "dataset_name": "conll2002"}, "validation": {"name": "validation", "num_bytes": 994298, "num_examples": 2896, "dataset_name": "conll2002"}, "test": {"name": "test", "num_bytes": 1808862, "num_examples": 5196, "dataset_name": "conll2002"}}, "download_checksums": {"https://raw.githubusercontent.com/teropa/nlp/master/resources/corpora/conll2002/ned.train": {"num_bytes": 2377174, "checksum": "0a419dcb356b62c8cff38515675550b3d5dbea9f45a1c4956328dbd5cc7fcdbc"}, "https://raw.githubusercontent.com/teropa/nlp/master/resources/corpora/conll2002/ned.testa": {"num_bytes": 450785, "checksum": "51259d4bfe52462f211d3d0b67173a7ecbfa296e199f6c6bd0895f4c78155057"}, "https://raw.githubusercontent.com/teropa/nlp/master/resources/corpora/conll2002/ned.testb": {"num_bytes": 814282, "checksum": "2aa748edb82e6f9c4d82e57a4bed69ded18cfa4803122c75070335d513517488"}}, "download_size": 3642241, "post_processing_size": null, "dataset_size": 8112119, "size_in_bytes": 11754360}}
 
1
+ {"es": {"description": "Named entities are phrases that contain the names of persons, organizations, locations, times and quantities.\n\nExample:\n[PER Wolff] , currently a journalist in [LOC Argentina] , played with [PER Del Bosque] in the final years of the seventies in [ORG Real Madrid] .\n\nThe shared task of CoNLL-2002 concerns language-independent named entity recognition.\nWe will concentrate on four types of named entities: persons, locations, organizations and names of miscellaneous entities that do not belong to the previous three groups.\nThe participants of the shared task will be offered training and test data for at least two languages.\nThey will use the data for developing a named-entity recognition system that includes a machine learning component.\nInformation sources other than the training data may be used in this shared task.\nWe are especially interested in methods that can use additional unannotated data for improving their performance (for example co-training).\n\nThe train/validation/test sets are available in Spanish and Dutch.\n\nFor more details see https://www.clips.uantwerpen.be/conll2002/ner/ and https://www.aclweb.org/anthology/W02-2024/\n", "citation": "@inproceedings{tjong-kim-sang-2002-introduction,\n title = \"Introduction to the {C}o{NLL}-2002 Shared Task: Language-Independent Named Entity Recognition\",\n author = \"Tjong Kim Sang, Erik F.\",\n booktitle = \"{COLING}-02: The 6th Conference on Natural Language Learning 2002 ({C}o{NLL}-2002)\",\n year = \"2002\",\n url = \"https://www.aclweb.org/anthology/W02-2024\",\n}\n", "homepage": "https://www.aclweb.org/anthology/W02-2024/", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "tokens": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "pos_tags": {"feature": {"num_classes": 60, "names": ["AO", "AQ", "CC", "CS", "DA", "DE", "DD", "DI", "DN", "DP", "DT", "Faa", "Fat", "Fc", "Fd", "Fe", "Fg", "Fh", "Fia", "Fit", "Fp", "Fpa", "Fpt", "Fs", "Ft", "Fx", "Fz", "I", "NC", "NP", "P0", "PD", "PI", "PN", "PP", "PR", "PT", "PX", "RG", "RN", "SP", "VAI", "VAM", "VAN", "VAP", "VAS", "VMG", "VMI", "VMM", "VMN", "VMP", "VMS", "VSG", "VSI", "VSM", "VSN", "VSP", "VSS", "Y", "Z"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}, "ner_tags": {"feature": {"num_classes": 9, "names": ["O", "B-PER", "I-PER", "B-ORG", "I-ORG", "B-LOC", "I-LOC", "B-MISC", "I-MISC"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "conll2002", "config_name": "es", "version": {"version_str": "1.0.1", "major": 1, "minor": 0, "patch": 1}, "splits": {"train": {"name": "train", "num_bytes": 6672133, "num_examples": 8323, "dataset_name": "conll2002"}, "validation": {"name": "validation", "num_bytes": 1333744, "num_examples": 1915, "dataset_name": "conll2002"}, "test": {"name": "test", "num_bytes": 1294116, "num_examples": 1517, "dataset_name": "conll2002"}}, "download_checksums": {"https://raw.githubusercontent.com/teropa/nlp/master/resources/corpora/conll2002/esp.train": {"num_bytes": 2970825, "checksum": "a20d95cab7d88a19a86f8c1ad6329325c99fbd9529ed978cbd7e31d4b01b4008"}, "https://raw.githubusercontent.com/teropa/nlp/master/resources/corpora/conll2002/esp.testa": {"num_bytes": 594058, "checksum": "85c17793b77881c53d19017d9d0f1e6fb98b7ddcab54a5f24b05ed1793103c87"}, "https://raw.githubusercontent.com/teropa/nlp/master/resources/corpora/conll2002/esp.testb": {"num_bytes": 575807, "checksum": "1f8f7a392c6d4979a5592a5794eed43d7869b46da6851bbcde99714149f1d016"}}, "download_size": 4140690, "post_processing_size": null, "dataset_size": 9299993}, "nl": {"description": "Named entities are phrases that contain the names of persons, organizations, locations, times and quantities.\n\nExample:\n[PER Wolff] , currently a journalist in [LOC Argentina] , played with [PER Del Bosque] in the final years of the seventies in [ORG Real Madrid] .\n\nThe shared task of CoNLL-2002 concerns language-independent named entity recognition.\nWe will concentrate on four types of named entities: persons, locations, organizations and names of miscellaneous entities that do not belong to the previous three groups.\nThe participants of the shared task will be offered training and test data for at least two languages.\nThey will use the data for developing a named-entity recognition system that includes a machine learning component.\nInformation sources other than the training data may be used in this shared task.\nWe are especially interested in methods that can use additional unannotated data for improving their performance (for example co-training).\n\nThe train/validation/test sets are available in Spanish and Dutch.\n\nFor more details see https://www.clips.uantwerpen.be/conll2002/ner/ and https://www.aclweb.org/anthology/W02-2024/\n", "citation": "@inproceedings{tjong-kim-sang-2002-introduction,\n title = \"Introduction to the {C}o{NLL}-2002 Shared Task: Language-Independent Named Entity Recognition\",\n author = \"Tjong Kim Sang, Erik F.\",\n booktitle = \"{COLING}-02: The 6th Conference on Natural Language Learning 2002 ({C}o{NLL}-2002)\",\n year = \"2002\",\n url = \"https://www.aclweb.org/anthology/W02-2024\",\n}\n", "homepage": "https://www.aclweb.org/anthology/W02-2024/", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "tokens": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "pos_tags": {"feature": {"num_classes": 12, "names": ["Adj", "Adv", "Art", "Conj", "Int", "Misc", "N", "Num", "Prep", "Pron", "Punc", "V"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}, "ner_tags": {"feature": {"num_classes": 9, "names": ["O", "B-PER", "I-PER", "B-ORG", "I-ORG", "B-LOC", "I-LOC", "B-MISC", "I-MISC"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "conll2002", "config_name": "nl", "version": {"version_str": "1.0.1", "major": 1, "minor": 0, "patch": 1}, "splits": {"train": {"name": "train", "num_bytes": 5308898, "num_examples": 15806, "dataset_name": "conll2002"}, "validation": {"name": "validation", "num_bytes": 994258, "num_examples": 2895, "dataset_name": "conll2002"}, "test": {"name": "test", "num_bytes": 1808822, "num_examples": 5195, "dataset_name": "conll2002"}}, "download_checksums": {"https://raw.githubusercontent.com/teropa/nlp/master/resources/corpora/conll2002/ned.train": {"num_bytes": 2377174, "checksum": "0a419dcb356b62c8cff38515675550b3d5dbea9f45a1c4956328dbd5cc7fcdbc"}, "https://raw.githubusercontent.com/teropa/nlp/master/resources/corpora/conll2002/ned.testa": {"num_bytes": 450785, "checksum": "51259d4bfe52462f211d3d0b67173a7ecbfa296e199f6c6bd0895f4c78155057"}, "https://raw.githubusercontent.com/teropa/nlp/master/resources/corpora/conll2002/ned.testb": {"num_bytes": 814282, "checksum": "2aa748edb82e6f9c4d82e57a4bed69ded18cfa4803122c75070335d513517488"}}, "download_size": 3642241, "post_processing_size": null, "dataset_size": 8111978, "size_in_bytes": 11754219}}