Datasets:
Tasks:
Token Classification
Modalities:
Text
Sub-tasks:
named-entity-recognition
Languages:
Estonian
Size:
100K - 1M
ArXiv:
License:
Add data files, loading script and update README.md
Browse filesFiles changed (33)
- README.md+218-1
- data/NoisyNER_labelset1_all.tsvAdded
- data/NoisyNER_labelset1_dev.tsvAdded
- data/NoisyNER_labelset1_test.tsvAdded
- data/NoisyNER_labelset1_train.tsvAdded
- data/NoisyNER_labelset2_all.tsvAdded
- data/NoisyNER_labelset2_dev.tsvAdded
- data/NoisyNER_labelset2_test.tsvAdded
- data/NoisyNER_labelset2_train.tsvAdded
- data/NoisyNER_labelset3_all.tsvAdded
- data/NoisyNER_labelset3_dev.tsvAdded
- data/NoisyNER_labelset3_test.tsvAdded
- data/NoisyNER_labelset3_train.tsvAdded
- data/NoisyNER_labelset4_all.tsvAdded
- data/NoisyNER_labelset4_dev.tsvAdded
- data/NoisyNER_labelset4_test.tsvAdded
- data/NoisyNER_labelset4_train.tsvAdded
- data/NoisyNER_labelset5_all.tsvAdded
- data/NoisyNER_labelset5_dev.tsvAdded
- data/NoisyNER_labelset5_test.tsvAdded
- data/NoisyNER_labelset5_train.tsvAdded
- data/NoisyNER_labelset6_all.tsvAdded
- data/NoisyNER_labelset6_dev.tsvAdded
- data/NoisyNER_labelset6_test.tsvAdded
- data/NoisyNER_labelset6_train.tsvAdded
- data/NoisyNER_labelset7_all.tsvAdded
- data/NoisyNER_labelset7_dev.tsvAdded
- data/NoisyNER_labelset7_test.tsvAdded
- data/NoisyNER_labelset7_train.tsvAdded
- data/estner_clean_dev.tsvAdded
- data/estner_clean_test.tsvAdded
- data/estner_clean_train.tsvAdded
- noisyner.pyAdded+199
123---license: cc-by-nc-4.0---123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220---annotations_creators:- expert-generatedlanguage:- etlanguage_creators:- foundlicense:- cc-by-nc-4.0multilinguality:- monolingualpaperswithcode_id: noisynerpretty_name: NoisyNERsize_categories:- 10K<n<100Ksource_datasets:- originaltags:- newspapers- 1997-2009task_categories:- token-classificationtask_ids:- named-entity-recognition---# Dataset Card for NoisyNER## Table of Contents- [Table of Contents](#table-of-contents)- [Dataset Description](#dataset-description)- [Dataset Summary](#dataset-summary)- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)- [Languages](#languages)- [Dataset Structure](#dataset-structure)- [Data Instances](#data-instances)- [Data Fields](#data-fields)- [Data Splits](#data-splits)- [Dataset Creation](#dataset-creation)- [Curation Rationale](#curation-rationale)- [Source Data](#source-data)- [Annotations](#annotations)- [Personal and Sensitive Information](#personal-and-sensitive-information)- [Considerations for Using the Data](#considerations-for-using-the-data)- [Social Impact of Dataset](#social-impact-of-dataset)- [Discussion of Biases](#discussion-of-biases)- [Other Known Limitations](#other-known-limitations)- [Additional Information](#additional-information)- [Dataset Curators](#dataset-curators)- [Licensing Information](#licensing-information)- [Citation Information](#citation-information)- [Contributions](#contributions)## Dataset Description- **Repository:** [Estonian NER corpus](https://doi.org/10.15155/1-00-0000-0000-0000-00073L), [NoisyNER dataset](https://github.com/uds-lsv/NoisyNER)- **Paper:** [Named Entity Recognition in Estonian](https://aclanthology.org/W13-2412/), [Analysing the Noise Model Error for Realistic Noisy Label Data](https://ojs.aaai.org/index.php/AAAI/article/view/16938)- **Dataset:** NoisyNER- **Domain:** News### Dataset SummaryNoisyNER is a dataset for the evaluation of methods to handle noisy labels when training machine learning models.- Entity Types: `PER`, `ORG`, `LOC`It is from the NLP/Information Extraction domain and was created through a realistic distant supervision technique. Some highlights and interesting aspects of the data are:- Seven sets of labels with differing noise patterns to evaluate different noise levels on the same instances- Full parallel clean labels available to compute upper performance bounds or study scenarios where a small amount of gold-standard data can be leveraged- Skewed label distribution (typical for Named Entity Recognition tasks)- For some label sets: noise level higher than the true label probability- Sequential dependencies between the labelsFor more details on the dataset and its creation process, please refer to the original author's publication https://ojs.aaai.org/index.php/AAAI/article/view/16938 (published at AAAI'21).This dataset is based on the Estonian NER corpus. For more details see https://aclanthology.org/W13-2412/### Supported Tasks and Leaderboards[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)### LanguagesThe language data in NoisyNER is in Estonian (BCP-47 et)## Dataset Structure### Data InstancesAn example of 'train' looks as follows.```{'id': '0','tokens': ['Tallinna', 'õhusaaste', 'suureneb', '.'],'lemmas': ['Tallinn+0', 'õhu_saaste+0', 'suurene+b', '.'],'grammar': ['_H_ sg g', '_S_ sg n', '_V_ b', '_Z_'],'ner_tags': [5, 0, 0, 0]}```### Data FieldsThe data fields are the same among all splits.- `id`: a `string` feature.- `tokens`: a `list` of `string` features.- `lemmas`: a `list` of `string` features.- `grammar`: a `list` of `string` features.- `ner_tags`: a `list` of classification labels (`int`). Full tagset with indices:```python{'O': 0, 'B-PER': 1, 'I-PER': 2, 'B-ORG': 3, 'I-ORG': 4, 'B-LOC': 5, 'I-LOC': 6}```### Data SplitsThe splits are the same across all configurations.|train|validation|test||----:|---------:|---:||11365| 1480|1433|## Dataset Creation### Curation Rationale[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)### Source Data#### Initial Data Collection and NormalizationTkachenko et al (2013) collected 572 news stories published in the local online newspapers [Delfi](http://delfi.ee/) and [Postimees](http://postimees.ee/) between 1997 and 2009. Selected articles cover both local and international news on a range of topics including politics, economics and sports. The raw text was preprocessed using the morphological disambiguator t3mesta ([Kaalep andVaino, 1998](https://www.cl.ut.ee/yllitised/kk_yhest_1998.pdf)) provided by [Filosoft](http://www.filosoft.ee/). The processing steps involve tokenization, lemmatization, part-of-speech tagging, grammatical and morphological analysis.#### Who are the source language producers?[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)### Annotations#### Annotation processAccording to Tkachenko et al (2013) one of the authors manually tagged the corpus and the other author examined the tags, after which conflicting cases were resolved.The total size of the corpus is 184,638 tokens. Tkachenko et al (2013) provide the following number of named entities in the corpus:| | PER | LOC | ORG | Total ||--------|------|------|------|-------|| All | 5762 | 5711 | 3938 | 15411 || Unique | 3588 | 1589 | 1987 | 7164 |Hedderich et al (2021) obtained the noisy labels through a distant supervision/automatic annotation approach. They extracted lists of named entities from Wikidata and matched them against words in the text via the ANEA tool ([Hedderich, Lange, and Klakow 2021](https://arxiv.org/abs/2102.13129)). They also used heuristic functions to correct errors caused by non-complete lists of entities,grammatical complexities of Estonian that do not allow simple string matching or entity lists in conflict with each other. For instance, they normalized the grammatical form of a word or excluded certain high false-positive words. They provide seven sets of labels that differ in the noise process. This results in 8 different configurations, when added to the original split with clean labels.#### Who are the annotators?[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)### Personal and Sensitive Information[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)## Considerations for Using the Data### Social Impact of Dataset[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)### Discussion of Biases[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)### Other Known Limitations[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)## Additional Information### Dataset Curators[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)### Licensing Information[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)### Citation Information```@inproceedings{tkachenko-etal-2013-named,title = "Named Entity Recognition in {E}stonian",author = "Tkachenko, Alexander andPetmanson, Timo andLaur, Sven",booktitle = "Proceedings of the 4th Biennial International Workshop on {B}alto-{S}lavic Natural Language Processing",month = aug,year = "2013",address = "Sofia, Bulgaria",publisher = "Association for Computational Linguistics",url = "https://aclanthology.org/W13-2412",pages = "78--83",}@article{Hedderich_Zhu_Klakow_2021,title={Analysing the Noise Model Error for Realistic Noisy Label Data},author={Hedderich, Michael A. and Zhu, Dawei and Klakow, Dietrich},volume={35},url={https://ojs.aaai.org/index.php/AAAI/article/view/16938},number={9},journal={Proceedings of the AAAI Conference on Artificial Intelligence},year={2021},month={May},pages={7675-7684},}```### ContributionsThanks to [@phucdev](https://github.com/phucdev) for adding this dataset.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199import datasets
logger = datasets.logging.get_logger(__name__)
# Find for instance the citation on arxiv or on the dataset repo/website_CITATION = """\@inproceedings{hedderich2021analysing, title={Analysing the Noise Model Error for Realistic Noisy Label Data}, author={Hedderich, Michael A and Zhu, Dawei and Klakow, Dietrich}, booktitle={Proceedings of the AAAI Conference on Artificial Intelligence}, volume={35}, number={9}, pages={7675--7684}, year={2021}}@inproceedings{tkachenko-etal-2013-named, title = "Named Entity Recognition in {E}stonian", author = "Tkachenko, Alexander and Petmanson, Timo and Laur, Sven", booktitle = "Proceedings of the 4th Biennial International Workshop on {B}alto-{S}lavic Natural Language Processing", year = "2013", publisher = "Association for Computational Linguistics", url = "https://www.aclweb.org/anthology/W13-2412",}"""
# You can copy an official description_DESCRIPTION = """\NoisyNER is a dataset for the evaluation of methods to handle noisy labels when training machine learning models. It is from the NLP/Information Extraction domain and was created through a realistic distant supervision technique. Some highlights and interesting aspects of the data are:- Seven sets of labels with differing noise patterns to evaluate different noise levels on the same instances- Full parallel clean labels available to compute upper performance bounds or study scenarios where a small amount of gold-standard data can be leveraged- Skewed label distribution (typical for Named Entity Recognition tasks)- For some label sets: noise level higher than the true label probability- Sequential dependencies between the labels
For more details on the dataset and its creation process, please refer to our publication https://ojs.aaai.org/index.php/AAAI/article/view/16938 (published at AAAI'21)."""
_HOMEPAGE = "https://github.com/uds-lsv/NoisyNER"
_LICENSE = "The original dataset is licensed under CC-BY-NC. We provide our noisy labels under CC-BY 4.0."
_URL = "https://huggingface.co/datasets/phuctrg/noisyner/raw/main/data"
class NoisyNER(datasets.GeneratorBasedBuilder): """ NoisyNER is a dataset for the evaluation of methods to handle noisy labels when training machine learning models. """
VERSION = datasets.Version("1.0.0") BUILDER_CONFIGS = [ datasets.BuilderConfig( name="estner_clean", version=VERSION, description="EstNER dataset with clean labels" ), datasets.BuilderConfig( name="NoisyNER_labelset1", version=VERSION, description="NoisyNER dataset label set 1 " "with automatic annotation via distant supervision based ANEA tool with no heuristics" ), datasets.BuilderConfig( name="NoisyNER_labelset2", version=VERSION, description="NoisyNER dataset label set 2 " "with automatic annotation via distant supervision based ANEA tool and " "applying Estonian lemmatization to normalize the words" ), datasets.BuilderConfig( name="NoisyNER_labelset3", version=VERSION, description="NoisyNER dataset label set 3 " "with automatic annotation via distant supervision based ANEA tool and " "splitting person entity names in the list, i.e. both first and last names can be matched " "separately. Person names must have a minimum length of 4. Also, lemmatization" ), datasets.BuilderConfig( name="NoisyNER_labelset4", version=VERSION, description="NoisyNER dataset label set 4 " "with automatic annotation via distant supervision based ANEA tool and if entity names from " "two different lists match the same word, location entities are preferred. " "Also, lemmatization." ), datasets.BuilderConfig( name="NoisyNER_labelset5", version=VERSION, description="NoisyNER dataset label set 5 " "with automatic annotation via distant supervision based ANEA tool and " "Locations preferred, lemmatization, splitting names with minimum length 4." ), datasets.BuilderConfig( name="NoisyNER_labelset6", version=VERSION, description="NoisyNER dataset label set 6 " "with automatic annotation via distant supervision based ANEA tool and " "removing the entity names 'kohta', 'teine', 'naine' and 'mees' from the list of person names " "(high false positive rate). Also, all of label set 5." ), datasets.BuilderConfig( name="NoisyNER_labelset7", version=VERSION, description="NoisyNER dataset label set 7 " "with automatic annotation via distant supervision based ANEA tool and using alternative, " "alias names for organizations. Using additionally the identifiers Q82794, Q3957, Q7930989, " "Q5119 and Q11881845 for locations and Q1572070 and Q7278 for organizations. " "Also, all of label set 6." ), ]
DEFAULT_CONFIG_NAME = "estner_clean"
def _info(self): features = datasets.Features( { "id": datasets.Value("string"), "tokens": datasets.Sequence(datasets.Value("string")), "lemmas": datasets.Sequence(datasets.Value("string")), "grammar": datasets.Sequence(datasets.Value("string")), "ner_tags": datasets.Sequence( datasets.features.ClassLabel( names=[ "O", "B-PER", "I-PER", "B-ORG", "I-ORG", "B-LOC", "I-LOC" ] ) ), } ) return datasets.DatasetInfo( # This is the description that will appear on the datasets page. description=_DESCRIPTION, # This defines the different columns of the dataset and their types features=features, # Here we define them above because they are different between the two configurations # If there's a common (input, target) tuple from the features, uncomment supervised_keys line below and # specify them. They'll be used if as_supervised=True in builder.as_dataset. # supervised_keys=("sentence", "label"), # Homepage of the dataset for documentation homepage=_HOMEPAGE, # License for the dataset if available license=_LICENSE, # Citation for the dataset citation=_CITATION, )
def _split_generators(self, dl_manager): _URLS = { str(datasets.Split.TRAIN): f'{_URL}/{self.config.name}_train.tsv', str(datasets.Split.VALIDATION): f'{_URL}/{self.config.name}_dev.tsv', str(datasets.Split.TEST): f'{_URL}/{self.config.name}_test.tsv', }
downloaded_files = dl_manager.download_and_extract(_URLS)
return [datasets.SplitGenerator(name=i, gen_kwargs={"filepath": downloaded_files[str(i)]}) for i in [datasets.Split.TRAIN, datasets.Split.VALIDATION, datasets.Split.TEST]]
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators` def _generate_examples(self, filepath): logger.info("⏳ Generating examples from = %s", filepath) # The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example. with open(filepath, encoding="utf-8") as f: guid = 0 tokens = [] lemmas = [] grammar_infos = [] ner_tags = [] for line in f: if line in ["--", "", "\n", "--\n"]: if tokens: yield guid, { "id": str(guid), "tokens": tokens, "lemmas": lemmas, "grammar": grammar_infos, "ner_tags": ner_tags, } guid += 1 tokens = [] lemmas = [] grammar_infos = [] ner_tags = [] else: splits = line.split("\t") tokens.append(splits[0]) lemmas.append(splits[1]) grammar_infos.append(splits[2]) ner_tags.append(splits[3].rstrip()) # last example if tokens: yield guid, { "id": str(guid), "tokens": tokens, "lemmas": lemmas, "grammar": grammar_infos, "ner_tags": ner_tags, }README.md+218-1
data/NoisyNER_labelset1_all.tsvAdded
data/NoisyNER_labelset1_dev.tsvAdded
data/NoisyNER_labelset1_test.tsvAdded
data/NoisyNER_labelset1_train.tsvAdded
data/NoisyNER_labelset2_all.tsvAdded
data/NoisyNER_labelset2_dev.tsvAdded
data/NoisyNER_labelset2_test.tsvAdded
data/NoisyNER_labelset2_train.tsvAdded
data/NoisyNER_labelset3_all.tsvAdded
data/NoisyNER_labelset3_dev.tsvAdded
data/NoisyNER_labelset3_test.tsvAdded
data/NoisyNER_labelset3_train.tsvAdded
data/NoisyNER_labelset4_all.tsvAdded
data/NoisyNER_labelset4_dev.tsvAdded
data/NoisyNER_labelset4_test.tsvAdded
data/NoisyNER_labelset4_train.tsvAdded
data/NoisyNER_labelset5_all.tsvAdded
data/NoisyNER_labelset5_dev.tsvAdded
data/NoisyNER_labelset5_test.tsvAdded
data/NoisyNER_labelset5_train.tsvAdded
data/NoisyNER_labelset6_all.tsvAdded
data/NoisyNER_labelset6_dev.tsvAdded
data/NoisyNER_labelset6_test.tsvAdded
data/NoisyNER_labelset6_train.tsvAdded
data/NoisyNER_labelset7_all.tsvAdded
data/NoisyNER_labelset7_dev.tsvAdded
data/NoisyNER_labelset7_test.tsvAdded
data/NoisyNER_labelset7_train.tsvAdded
data/estner_clean_dev.tsvAdded
data/estner_clean_test.tsvAdded
data/estner_clean_train.tsvAdded
noisyner.pyAdded+199