system HF staff commited on
Commit
c9635d4
1 Parent(s): 9b32634

Update files from the datasets library (from 1.18.0)

Browse files

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

Files changed (3) hide show
  1. README.md +16 -2
  2. conll2003.py +11 -9
  3. dataset_infos.json +1 -1
README.md CHANGED
@@ -6,7 +6,7 @@ language_creators:
6
  languages:
7
  - en
8
  licenses:
9
- - unknown
10
  multilinguality:
11
  - monolingual
12
  size_categories:
@@ -196,7 +196,21 @@ The data fields are the same among all splits.
196
 
197
  ### Licensing Information
198
 
199
- [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
 
201
  ### Citation Information
202
 
 
6
  languages:
7
  - en
8
  licenses:
9
+ - other
10
  multilinguality:
11
  - monolingual
12
  size_categories:
 
196
 
197
  ### Licensing Information
198
 
199
+ From the [CoNLL2003 shared task](https://www.clips.uantwerpen.be/conll2003/ner/) page:
200
+
201
+ > The English data is a collection of news wire articles from the Reuters Corpus. The annotation has been done by people of the University of Antwerp. Because of copyright reasons we only make available the annotations. In order to build the complete data sets you will need access to the Reuters Corpus. It can be obtained for research purposes without any charge from NIST.
202
+
203
+ The copyrights are defined below, from the [Reuters Corpus page](https://trec.nist.gov/data/reuters/reuters.html):
204
+
205
+ > The stories in the Reuters Corpus are under the copyright of Reuters Ltd and/or Thomson Reuters, and their use is governed by the following agreements:
206
+ >
207
+ > [Organizational agreement](https://trec.nist.gov/data/reuters/org_appl_reuters_v4.html)
208
+ >
209
+ > This agreement must be signed by the person responsible for the data at your organization, and sent to NIST.
210
+ >
211
+ > [Individual agreement](https://trec.nist.gov/data/reuters/ind_appl_reuters_v4.html)
212
+ >
213
+ > This agreement must be signed by all researchers using the Reuters Corpus at your organization, and kept on file at your organization.
214
 
215
  ### Citation Information
216
 
conll2003.py CHANGED
@@ -16,6 +16,8 @@
16
  # Lint as: python3
17
  """Introduction to the CoNLL-2003 Shared Task: Language-Independent Named Entity Recognition"""
18
 
 
 
19
  import datasets
20
 
21
 
@@ -50,7 +52,7 @@ tagging scheme, whereas the original dataset uses IOB1.
50
  For more details see https://www.clips.uantwerpen.be/conll2003/ner/ and https://www.aclweb.org/anthology/W03-0419
51
  """
52
 
53
- _URL = "https://github.com/davidsbatista/NER-datasets/raw/master/CONLL2003/"
54
  _TRAINING_FILE = "train.txt"
55
  _DEV_FILE = "valid.txt"
56
  _TEST_FILE = "test.txt"
@@ -188,17 +190,17 @@ class Conll2003(datasets.GeneratorBasedBuilder):
188
 
189
  def _split_generators(self, dl_manager):
190
  """Returns SplitGenerators."""
191
- urls_to_download = {
192
- "train": f"{_URL}{_TRAINING_FILE}",
193
- "dev": f"{_URL}{_DEV_FILE}",
194
- "test": f"{_URL}{_TEST_FILE}",
 
195
  }
196
- downloaded_files = dl_manager.download_and_extract(urls_to_download)
197
 
198
  return [
199
- datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["train"]}),
200
- datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": downloaded_files["dev"]}),
201
- datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": downloaded_files["test"]}),
202
  ]
203
 
204
  def _generate_examples(self, filepath):
 
16
  # Lint as: python3
17
  """Introduction to the CoNLL-2003 Shared Task: Language-Independent Named Entity Recognition"""
18
 
19
+ import os
20
+
21
  import datasets
22
 
23
 
 
52
  For more details see https://www.clips.uantwerpen.be/conll2003/ner/ and https://www.aclweb.org/anthology/W03-0419
53
  """
54
 
55
+ _URL = "https://data.deepai.org/conll2003.zip"
56
  _TRAINING_FILE = "train.txt"
57
  _DEV_FILE = "valid.txt"
58
  _TEST_FILE = "test.txt"
 
190
 
191
  def _split_generators(self, dl_manager):
192
  """Returns SplitGenerators."""
193
+ downloaded_file = dl_manager.download_and_extract(_URL)
194
+ data_files = {
195
+ "train": os.path.join(downloaded_file, _TRAINING_FILE),
196
+ "dev": os.path.join(downloaded_file, _DEV_FILE),
197
+ "test": os.path.join(downloaded_file, _TEST_FILE),
198
  }
 
199
 
200
  return [
201
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": data_files["train"]}),
202
+ datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": data_files["dev"]}),
203
+ datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": data_files["test"]}),
204
  ]
205
 
206
  def _generate_examples(self, filepath):
dataset_infos.json CHANGED
@@ -1 +1 @@
1
- {"conll2003": {"description": "The shared task of CoNLL-2003 concerns language-independent named entity recognition. We will concentrate on\nfour types of named entities: persons, locations, organizations and names of miscellaneous entities that do\nnot belong to the previous three groups.\n\nThe CoNLL-2003 shared task data files contain four columns separated by a single space. Each word has been put on\na separate line and there is an empty line after each sentence. The first item on each line is a word, the second\na part-of-speech (POS) tag, the third a syntactic chunk tag and the fourth the named entity tag. The chunk tags\nand the named entity tags have the format I-TYPE which means that the word is inside a phrase of type TYPE. Only\nif two phrases of the same type immediately follow each other, the first word of the second phrase will have tag\nB-TYPE to show that it starts a new phrase. A word with tag O is not part of a phrase. Note the dataset uses IOB2\ntagging scheme, whereas the original dataset uses IOB1.\n\nFor more details see https://www.clips.uantwerpen.be/conll2003/ner/ and https://www.aclweb.org/anthology/W03-0419\n", "citation": "@inproceedings{tjong-kim-sang-de-meulder-2003-introduction,\n title = \"Introduction to the {C}o{NLL}-2003 Shared Task: Language-Independent Named Entity Recognition\",\n author = \"Tjong Kim Sang, Erik F. and\n De Meulder, Fien\",\n booktitle = \"Proceedings of the Seventh Conference on Natural Language Learning at {HLT}-{NAACL} 2003\",\n year = \"2003\",\n url = \"https://www.aclweb.org/anthology/W03-0419\",\n pages = \"142--147\",\n}\n", "homepage": "https://www.aclweb.org/anthology/W03-0419/", "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": 47, "names": ["\"", "''", "#", "$", "(", ")", ",", ".", ":", "``", "CC", "CD", "DT", "EX", "FW", "IN", "JJ", "JJR", "JJS", "LS", "MD", "NN", "NNP", "NNPS", "NNS", "NN|SYM", "PDT", "POS", "PRP", "PRP$", "RB", "RBR", "RBS", "RP", "SYM", "TO", "UH", "VB", "VBD", "VBG", "VBN", "VBP", "VBZ", "WDT", "WP", "WP$", "WRB"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}, "chunk_tags": {"feature": {"num_classes": 23, "names": ["O", "B-ADJP", "I-ADJP", "B-ADVP", "I-ADVP", "B-CONJP", "I-CONJP", "B-INTJ", "I-INTJ", "B-LST", "I-LST", "B-NP", "I-NP", "B-PP", "I-PP", "B-PRT", "I-PRT", "B-SBAR", "I-SBAR", "B-UCP", "I-UCP", "B-VP", "I-VP"], "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": "conll2003", "config_name": "conll2003", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 6931393, "num_examples": 14041, "dataset_name": "conll2003"}, "validation": {"name": "validation", "num_bytes": 1739247, "num_examples": 3250, "dataset_name": "conll2003"}, "test": {"name": "test", "num_bytes": 1582078, "num_examples": 3453, "dataset_name": "conll2003"}}, "download_checksums": {"https://github.com/davidsbatista/NER-datasets/raw/master/CONLL2003/train.txt": {"num_bytes": 3283418, "checksum": "c99b26852dabf57ca9d30a0e892b84544cc8962003151e14a71077c55dc66db5"}, "https://github.com/davidsbatista/NER-datasets/raw/master/CONLL2003/valid.txt": {"num_bytes": 827441, "checksum": "f1f6469322876887de1d04acd43c59b02f59d5b02acf42c027132fa1bf349cb2"}, "https://github.com/davidsbatista/NER-datasets/raw/master/CONLL2003/test.txt": {"num_bytes": 748093, "checksum": "82e0c72d262f86ad3e78b15c5d980bbf87cb205aa4bf6d2d97643f463f8d7ff7"}}, "download_size": 4858952, "post_processing_size": null, "dataset_size": 10252718, "size_in_bytes": 15111670}}
 
1
+ {"conll2003": {"description": "The shared task of CoNLL-2003 concerns language-independent named entity recognition. We will concentrate on\nfour types of named entities: persons, locations, organizations and names of miscellaneous entities that do\nnot belong to the previous three groups.\n\nThe CoNLL-2003 shared task data files contain four columns separated by a single space. Each word has been put on\na separate line and there is an empty line after each sentence. The first item on each line is a word, the second\na part-of-speech (POS) tag, the third a syntactic chunk tag and the fourth the named entity tag. The chunk tags\nand the named entity tags have the format I-TYPE which means that the word is inside a phrase of type TYPE. Only\nif two phrases of the same type immediately follow each other, the first word of the second phrase will have tag\nB-TYPE to show that it starts a new phrase. A word with tag O is not part of a phrase. Note the dataset uses IOB2\ntagging scheme, whereas the original dataset uses IOB1.\n\nFor more details see https://www.clips.uantwerpen.be/conll2003/ner/ and https://www.aclweb.org/anthology/W03-0419\n", "citation": "@inproceedings{tjong-kim-sang-de-meulder-2003-introduction,\n title = \"Introduction to the {C}o{NLL}-2003 Shared Task: Language-Independent Named Entity Recognition\",\n author = \"Tjong Kim Sang, Erik F. and\n De Meulder, Fien\",\n booktitle = \"Proceedings of the Seventh Conference on Natural Language Learning at {HLT}-{NAACL} 2003\",\n year = \"2003\",\n url = \"https://www.aclweb.org/anthology/W03-0419\",\n pages = \"142--147\",\n}\n", "homepage": "https://www.aclweb.org/anthology/W03-0419/", "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": 47, "names": ["\"", "''", "#", "$", "(", ")", ",", ".", ":", "``", "CC", "CD", "DT", "EX", "FW", "IN", "JJ", "JJR", "JJS", "LS", "MD", "NN", "NNP", "NNPS", "NNS", "NN|SYM", "PDT", "POS", "PRP", "PRP$", "RB", "RBR", "RBS", "RP", "SYM", "TO", "UH", "VB", "VBD", "VBG", "VBN", "VBP", "VBZ", "WDT", "WP", "WP$", "WRB"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}, "chunk_tags": {"feature": {"num_classes": 23, "names": ["O", "B-ADJP", "I-ADJP", "B-ADVP", "I-ADVP", "B-CONJP", "I-CONJP", "B-INTJ", "I-INTJ", "B-LST", "I-LST", "B-NP", "I-NP", "B-PP", "I-PP", "B-PRT", "I-PRT", "B-SBAR", "I-SBAR", "B-UCP", "I-UCP", "B-VP", "I-VP"], "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, "task_templates": null, "builder_name": "conll2003", "config_name": "conll2003", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 6931418, "num_examples": 14042, "dataset_name": "conll2003"}, "validation": {"name": "validation", "num_bytes": 1739271, "num_examples": 3251, "dataset_name": "conll2003"}, "test": {"name": "test", "num_bytes": 1582102, "num_examples": 3454, "dataset_name": "conll2003"}}, "download_checksums": {"https://data.deepai.org/conll2003.zip": {"num_bytes": 982975, "checksum": "96a104d174ddae7558bab603f19382c5fe02ff1da5c077a7f3ce2ced1578a2c3"}}, "download_size": 982975, "post_processing_size": null, "dataset_size": 10252791, "size_in_bytes": 11235766}}