Datasets:
Tasks:
Token Classification
Sub-tasks:
named-entity-recognition
Languages:
English
Size:
10K - 100K
License:
Commit
·
1c691e8
0
Parent(s):
Update files from the datasets library (from 1.5.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.5.0
- .gitattributes +27 -0
- README.md +186 -0
- conllpp.py +228 -0
- dataset_infos.json +1 -0
- dummy/conllpp/1.0.0/dummy_data.zip +3 -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,186 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
annotations_creators:
|
| 3 |
+
- expert-generated
|
| 4 |
+
language_creators:
|
| 5 |
+
- found
|
| 6 |
+
languages:
|
| 7 |
+
- en
|
| 8 |
+
licenses:
|
| 9 |
+
- unknown
|
| 10 |
+
multilinguality:
|
| 11 |
+
- monolingual
|
| 12 |
+
size_categories:
|
| 13 |
+
- 10K<n<100K
|
| 14 |
+
source_datasets:
|
| 15 |
+
- extended|conll2003
|
| 16 |
+
task_categories:
|
| 17 |
+
- structure-prediction
|
| 18 |
+
task_ids:
|
| 19 |
+
- named-entity-recognition
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
# Dataset Card for "conllpp"
|
| 23 |
+
|
| 24 |
+
## Table of Contents
|
| 25 |
+
- [Dataset Card for conllpp](#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 |
+
- [Contributions](#contributions)
|
| 53 |
+
|
| 54 |
+
## Dataset Description
|
| 55 |
+
|
| 56 |
+
- **Homepage:** [Github](https://github.com/ZihanWangKi/CrossWeigh)
|
| 57 |
+
- **Repository:** [Github](https://github.com/ZihanWangKi/CrossWeigh)
|
| 58 |
+
- **Paper:** [Aclweb](https://www.aclweb.org/anthology/D19-1519)
|
| 59 |
+
- **Leaderboard:**
|
| 60 |
+
- **Point of Contact:**
|
| 61 |
+
|
| 62 |
+
### Dataset Summary
|
| 63 |
+
|
| 64 |
+
CoNLLpp is a corrected version of the CoNLL2003 NER dataset where labels of 5.38% of the sentences in the test set
|
| 65 |
+
have been manually corrected. The training set and development set from CoNLL2003 is included for completeness. One
|
| 66 |
+
correction on the test set for example, is:
|
| 67 |
+
|
| 68 |
+
```
|
| 69 |
+
{
|
| 70 |
+
"tokens": ["SOCCER", "-", "JAPAN", "GET", "LUCKY", "WIN", ",", "CHINA", "IN", "SURPRISE", "DEFEAT", "."],
|
| 71 |
+
"original_ner_tags_in_conll2003": ["O", "O", "B-LOC", "O", "O", "O", "O", "B-PER", "O", "O", "O", "O"],
|
| 72 |
+
"corrected_ner_tags_in_conllpp": ["O", "O", "B-LOC", "O", "O", "O", "O", "B-LOC", "O", "O", "O", "O"],
|
| 73 |
+
}
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
### Supported Tasks and Leaderboards
|
| 77 |
+
|
| 78 |
+
[More Information Needed]
|
| 79 |
+
|
| 80 |
+
### Languages
|
| 81 |
+
|
| 82 |
+
[More Information Needed]
|
| 83 |
+
|
| 84 |
+
## Dataset Structure
|
| 85 |
+
|
| 86 |
+
We show detailed information for up to 5 configurations of the dataset.
|
| 87 |
+
|
| 88 |
+
### Data Instances
|
| 89 |
+
|
| 90 |
+
#### conllpp
|
| 91 |
+
|
| 92 |
+
- **Size of downloaded dataset files:** 4.63 MB
|
| 93 |
+
- **Size of the generated dataset:** 9.78 MB
|
| 94 |
+
- **Total amount of disk used:** 14.41 MB
|
| 95 |
+
|
| 96 |
+
An example of 'train' looks as follows.
|
| 97 |
+
```
|
| 98 |
+
This example was too long and was cropped:
|
| 99 |
+
|
| 100 |
+
{
|
| 101 |
+
"chunk_tags": [11, 12, 12, 21, 13, 11, 11, 21, 13, 11, 12, 13, 11, 21, 22, 11, 12, 17, 11, 21, 17, 11, 12, 12, 21, 22, 22, 13, 11, 0],
|
| 102 |
+
"id": "0",
|
| 103 |
+
"ner_tags": [0, 3, 4, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
| 104 |
+
"pos_tags": [12, 22, 22, 38, 15, 22, 28, 38, 15, 16, 21, 35, 24, 35, 37, 16, 21, 15, 24, 41, 15, 16, 21, 21, 20, 37, 40, 35, 21, 7],
|
| 105 |
+
"tokens": ["The", "European", "Commission", "said", "on", "Thursday", "it", "disagreed", "with", "German", "advice", "to", "consumers", "to", "shun", "British", "lamb", "until", "scientists", "determine", "whether", "mad", "cow", "disease", "can", "be", "transmitted", "to", "sheep", "."]
|
| 106 |
+
}
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
### Data Fields
|
| 110 |
+
|
| 111 |
+
The data fields are the same among all splits.
|
| 112 |
+
|
| 113 |
+
#### conllpp
|
| 114 |
+
- `id`: a `string` feature.
|
| 115 |
+
- `tokens`: a `list` of `string` features.
|
| 116 |
+
- `pos_tags`: a `list` of classification labels, with possible values including `"` (0), `''` (1), `#` (2), `$` (3), `(` (4).
|
| 117 |
+
- `chunk_tags`: a `list` of classification labels, with possible values including `O` (0), `B-ADJP` (1), `I-ADJP` (2), `B-ADVP` (3), `I-ADVP` (4).
|
| 118 |
+
- `ner_tags`: a `list` of classification labels, with possible values including `O` (0), `B-PER` (1), `I-PER` (2), `B-ORG` (3), `I-ORG` (4).
|
| 119 |
+
|
| 120 |
+
### Data Splits Sample Size
|
| 121 |
+
|
| 122 |
+
| name |train|validation|test|
|
| 123 |
+
|---------|----:|---------:|---:|
|
| 124 |
+
|conll2003|14041| 3250|3453|
|
| 125 |
+
|
| 126 |
+
## Dataset Creation
|
| 127 |
+
|
| 128 |
+
### Curation Rationale
|
| 129 |
+
|
| 130 |
+
[More Information Needed]
|
| 131 |
+
|
| 132 |
+
### Source Data
|
| 133 |
+
|
| 134 |
+
#### Initial Data Collection and Normalization
|
| 135 |
+
|
| 136 |
+
[More Information Needed]
|
| 137 |
+
|
| 138 |
+
#### Who are the source language producers?
|
| 139 |
+
|
| 140 |
+
[More Information Needed]
|
| 141 |
+
|
| 142 |
+
### Annotations
|
| 143 |
+
|
| 144 |
+
#### Annotation process
|
| 145 |
+
|
| 146 |
+
[More Information Needed]
|
| 147 |
+
|
| 148 |
+
#### Who are the annotators?
|
| 149 |
+
|
| 150 |
+
[More Information Needed]
|
| 151 |
+
|
| 152 |
+
### Personal and Sensitive Information
|
| 153 |
+
|
| 154 |
+
[More Information Needed]
|
| 155 |
+
|
| 156 |
+
## Considerations for Using the Data
|
| 157 |
+
|
| 158 |
+
### Social Impact of Dataset
|
| 159 |
+
|
| 160 |
+
[More Information Needed]
|
| 161 |
+
|
| 162 |
+
### Discussion of Biases
|
| 163 |
+
|
| 164 |
+
[More Information Needed]
|
| 165 |
+
|
| 166 |
+
### Other Known Limitations
|
| 167 |
+
|
| 168 |
+
[More Information Needed]
|
| 169 |
+
|
| 170 |
+
## Additional Information
|
| 171 |
+
|
| 172 |
+
### Dataset Curators
|
| 173 |
+
|
| 174 |
+
[More Information Needed]
|
| 175 |
+
|
| 176 |
+
### Licensing Information
|
| 177 |
+
|
| 178 |
+
[More Information Needed]
|
| 179 |
+
|
| 180 |
+
### Citation Information
|
| 181 |
+
|
| 182 |
+
[More Information Needed]
|
| 183 |
+
|
| 184 |
+
### Contributions
|
| 185 |
+
|
| 186 |
+
Thanks to [@ZihanWangKi](https://github.com/ZihanWangKi) for adding this dataset.
|
conllpp.py
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
"""CrossWeigh: Training Named Entity Tagger from Imperfect Annotations"""
|
| 18 |
+
|
| 19 |
+
import logging
|
| 20 |
+
|
| 21 |
+
import datasets
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
_CITATION = """\
|
| 25 |
+
@inproceedings{wang2019crossweigh,
|
| 26 |
+
title={CrossWeigh: Training Named Entity Tagger from Imperfect Annotations},
|
| 27 |
+
author={Wang, Zihan and Shang, Jingbo and Liu, Liyuan and Lu, Lihao and Liu, Jiacheng and Han, Jiawei},
|
| 28 |
+
booktitle={Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)},
|
| 29 |
+
pages={5157--5166},
|
| 30 |
+
year={2019}
|
| 31 |
+
}
|
| 32 |
+
"""
|
| 33 |
+
|
| 34 |
+
_DESCRIPTION = """\
|
| 35 |
+
CoNLLpp is a corrected version of the CoNLL2003 NER dataset where labels of 5.38% of the sentences in the test set
|
| 36 |
+
have been manually corrected. The training set and development set are included for completeness.
|
| 37 |
+
For more details see https://www.aclweb.org/anthology/D19-1519/ and https://github.com/ZihanWangKi/CrossWeigh
|
| 38 |
+
"""
|
| 39 |
+
|
| 40 |
+
_URL = "https://github.com/ZihanWangKi/CrossWeigh/raw/master/data/"
|
| 41 |
+
_TRAINING_FILE = "conllpp_train.txt"
|
| 42 |
+
_DEV_FILE = "conllpp_dev.txt"
|
| 43 |
+
_TEST_FILE = "conllpp_test.txt"
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
class ConllppConfig(datasets.BuilderConfig):
|
| 47 |
+
"""BuilderConfig for Conll2003"""
|
| 48 |
+
|
| 49 |
+
def __init__(self, **kwargs):
|
| 50 |
+
"""BuilderConfig forConll2003.
|
| 51 |
+
Args:
|
| 52 |
+
**kwargs: keyword arguments forwarded to super.
|
| 53 |
+
"""
|
| 54 |
+
super(ConllppConfig, self).__init__(**kwargs)
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
class Conllpp(datasets.GeneratorBasedBuilder):
|
| 58 |
+
"""Conllpp dataset."""
|
| 59 |
+
|
| 60 |
+
BUILDER_CONFIGS = [
|
| 61 |
+
ConllppConfig(name="conllpp", version=datasets.Version("1.0.0"), description="Conllpp dataset"),
|
| 62 |
+
]
|
| 63 |
+
|
| 64 |
+
def _info(self):
|
| 65 |
+
return datasets.DatasetInfo(
|
| 66 |
+
description=_DESCRIPTION,
|
| 67 |
+
features=datasets.Features(
|
| 68 |
+
{
|
| 69 |
+
"id": datasets.Value("string"),
|
| 70 |
+
"tokens": datasets.Sequence(datasets.Value("string")),
|
| 71 |
+
"pos_tags": datasets.Sequence(
|
| 72 |
+
datasets.features.ClassLabel(
|
| 73 |
+
names=[
|
| 74 |
+
'"',
|
| 75 |
+
"''",
|
| 76 |
+
"#",
|
| 77 |
+
"$",
|
| 78 |
+
"(",
|
| 79 |
+
")",
|
| 80 |
+
",",
|
| 81 |
+
".",
|
| 82 |
+
":",
|
| 83 |
+
"``",
|
| 84 |
+
"CC",
|
| 85 |
+
"CD",
|
| 86 |
+
"DT",
|
| 87 |
+
"EX",
|
| 88 |
+
"FW",
|
| 89 |
+
"IN",
|
| 90 |
+
"JJ",
|
| 91 |
+
"JJR",
|
| 92 |
+
"JJS",
|
| 93 |
+
"LS",
|
| 94 |
+
"MD",
|
| 95 |
+
"NN",
|
| 96 |
+
"NNP",
|
| 97 |
+
"NNPS",
|
| 98 |
+
"NNS",
|
| 99 |
+
"NN|SYM",
|
| 100 |
+
"PDT",
|
| 101 |
+
"POS",
|
| 102 |
+
"PRP",
|
| 103 |
+
"PRP$",
|
| 104 |
+
"RB",
|
| 105 |
+
"RBR",
|
| 106 |
+
"RBS",
|
| 107 |
+
"RP",
|
| 108 |
+
"SYM",
|
| 109 |
+
"TO",
|
| 110 |
+
"UH",
|
| 111 |
+
"VB",
|
| 112 |
+
"VBD",
|
| 113 |
+
"VBG",
|
| 114 |
+
"VBN",
|
| 115 |
+
"VBP",
|
| 116 |
+
"VBZ",
|
| 117 |
+
"WDT",
|
| 118 |
+
"WP",
|
| 119 |
+
"WP$",
|
| 120 |
+
"WRB",
|
| 121 |
+
]
|
| 122 |
+
)
|
| 123 |
+
),
|
| 124 |
+
"chunk_tags": datasets.Sequence(
|
| 125 |
+
datasets.features.ClassLabel(
|
| 126 |
+
names=[
|
| 127 |
+
"O",
|
| 128 |
+
"B-ADJP",
|
| 129 |
+
"I-ADJP",
|
| 130 |
+
"B-ADVP",
|
| 131 |
+
"I-ADVP",
|
| 132 |
+
"B-CONJP",
|
| 133 |
+
"I-CONJP",
|
| 134 |
+
"B-INTJ",
|
| 135 |
+
"I-INTJ",
|
| 136 |
+
"B-LST",
|
| 137 |
+
"I-LST",
|
| 138 |
+
"B-NP",
|
| 139 |
+
"I-NP",
|
| 140 |
+
"B-PP",
|
| 141 |
+
"I-PP",
|
| 142 |
+
"B-PRT",
|
| 143 |
+
"I-PRT",
|
| 144 |
+
"B-SBAR",
|
| 145 |
+
"I-SBAR",
|
| 146 |
+
"B-UCP",
|
| 147 |
+
"I-UCP",
|
| 148 |
+
"B-VP",
|
| 149 |
+
"I-VP",
|
| 150 |
+
]
|
| 151 |
+
)
|
| 152 |
+
),
|
| 153 |
+
"ner_tags": datasets.Sequence(
|
| 154 |
+
datasets.features.ClassLabel(
|
| 155 |
+
names=[
|
| 156 |
+
"O",
|
| 157 |
+
"B-PER",
|
| 158 |
+
"I-PER",
|
| 159 |
+
"B-ORG",
|
| 160 |
+
"I-ORG",
|
| 161 |
+
"B-LOC",
|
| 162 |
+
"I-LOC",
|
| 163 |
+
"B-MISC",
|
| 164 |
+
"I-MISC",
|
| 165 |
+
]
|
| 166 |
+
)
|
| 167 |
+
),
|
| 168 |
+
}
|
| 169 |
+
),
|
| 170 |
+
supervised_keys=None,
|
| 171 |
+
homepage="https://github.com/ZihanWangKi/CrossWeigh",
|
| 172 |
+
citation=_CITATION,
|
| 173 |
+
)
|
| 174 |
+
|
| 175 |
+
def _split_generators(self, dl_manager):
|
| 176 |
+
"""Returns SplitGenerators."""
|
| 177 |
+
urls_to_download = {
|
| 178 |
+
"train": f"{_URL}{_TRAINING_FILE}",
|
| 179 |
+
"dev": f"{_URL}{_DEV_FILE}",
|
| 180 |
+
"test": f"{_URL}{_TEST_FILE}",
|
| 181 |
+
}
|
| 182 |
+
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
| 183 |
+
|
| 184 |
+
return [
|
| 185 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["train"]}),
|
| 186 |
+
datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": downloaded_files["dev"]}),
|
| 187 |
+
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": downloaded_files["test"]}),
|
| 188 |
+
]
|
| 189 |
+
|
| 190 |
+
def _generate_examples(self, filepath):
|
| 191 |
+
logging.info("⏳ Generating examples from = %s", filepath)
|
| 192 |
+
with open(filepath, encoding="utf-8") as f:
|
| 193 |
+
guid = 0
|
| 194 |
+
tokens = []
|
| 195 |
+
pos_tags = []
|
| 196 |
+
chunk_tags = []
|
| 197 |
+
ner_tags = []
|
| 198 |
+
for line in f:
|
| 199 |
+
if line.startswith("-DOCSTART-") or line == "" or line == "\n":
|
| 200 |
+
if tokens:
|
| 201 |
+
yield guid, {
|
| 202 |
+
"id": str(guid),
|
| 203 |
+
"tokens": tokens,
|
| 204 |
+
"pos_tags": pos_tags,
|
| 205 |
+
"chunk_tags": chunk_tags,
|
| 206 |
+
"ner_tags": ner_tags,
|
| 207 |
+
}
|
| 208 |
+
guid += 1
|
| 209 |
+
tokens = []
|
| 210 |
+
pos_tags = []
|
| 211 |
+
chunk_tags = []
|
| 212 |
+
ner_tags = []
|
| 213 |
+
else:
|
| 214 |
+
# conll2003 tokens are space separated
|
| 215 |
+
splits = line.split(" ")
|
| 216 |
+
tokens.append(splits[0])
|
| 217 |
+
pos_tags.append(splits[1])
|
| 218 |
+
chunk_tags.append(splits[2])
|
| 219 |
+
ner_tags.append(splits[3].rstrip())
|
| 220 |
+
# last example
|
| 221 |
+
if tokens:
|
| 222 |
+
yield guid, {
|
| 223 |
+
"id": str(guid),
|
| 224 |
+
"tokens": tokens,
|
| 225 |
+
"pos_tags": pos_tags,
|
| 226 |
+
"chunk_tags": chunk_tags,
|
| 227 |
+
"ner_tags": ner_tags,
|
| 228 |
+
}
|
dataset_infos.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"conllpp": {"description": "CoNLLpp is a corrected version of the CoNLL2003 NER dataset where labels of 5.38% of the sentences in the test set\nhave been manually corrected. The training set and development set are included for completeness.\nFor more details see https://www.aclweb.org/anthology/D19-1519/ and https://github.com/ZihanWangKi/CrossWeigh\n", "citation": "@inproceedings{wang2019crossweigh,\n title={CrossWeigh: Training Named Entity Tagger from Imperfect Annotations},\n author={Wang, Zihan and Shang, Jingbo and Liu, Liyuan and Lu, Lihao and Liu, Jiacheng and Han, Jiawei},\n booktitle={Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)},\n pages={5157--5166},\n year={2019}\n}\n", "homepage": "https://github.com/ZihanWangKi/CrossWeigh", "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": "conllpp", "config_name": "conllpp", "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": "conllpp"}, "validation": {"name": "validation", "num_bytes": 1739247, "num_examples": 3250, "dataset_name": "conllpp"}, "test": {"name": "test", "num_bytes": 1582078, "num_examples": 3453, "dataset_name": "conllpp"}}, "download_checksums": {"https://github.com/ZihanWangKi/CrossWeigh/raw/master/data/conllpp_train.txt": {"num_bytes": 3283420, "checksum": "213953b5522fb7924802d883e50f027b2c6ffb5d4d0e63368ed82909f9b60423"}, "https://github.com/ZihanWangKi/CrossWeigh/raw/master/data/conllpp_dev.txt": {"num_bytes": 827443, "checksum": "c02eb19809eafb83998326a0481942eb37d96f31826ae387cfe8773699969f5b"}, "https://github.com/ZihanWangKi/CrossWeigh/raw/master/data/conllpp_test.txt": {"num_bytes": 748737, "checksum": "4eb3b5114787d0df24087e9c9dfc956abf4cfd5e201bc1056b48ff4f7b37c0e8"}}, "download_size": 4859600, "post_processing_size": null, "dataset_size": 10252718, "size_in_bytes": 15112318}}
|
dummy/conllpp/1.0.0/dummy_data.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b53f19f1b8d133350c8ec695e940e6846814ec64e3896b1cb886b78c25509246
|
| 3 |
+
size 696
|