Datasets:
Tasks:
Token Classification
Sub-tasks:
named-entity-recognition
Languages:
Russian
Size:
10K<n<100K
License:
Add collection3 files
#1
by
pefimov
- opened
- README.md +164 -1
- collection3.py +111 -0
- data/test.txt +0 -0
- data/train.txt +0 -0
- data/valid.txt +0 -0
- dataset_infos.json +1 -0
README.md
CHANGED
@@ -1,3 +1,166 @@
|
|
1 |
---
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
annotations_creators:
|
3 |
+
- other
|
4 |
+
language:
|
5 |
+
- ru
|
6 |
+
language_creators:
|
7 |
+
- found
|
8 |
+
license:
|
9 |
+
- other
|
10 |
+
multilinguality:
|
11 |
+
- monolingual
|
12 |
+
pretty_name: Collection3
|
13 |
+
size_categories:
|
14 |
+
- 10K<n<100K
|
15 |
+
source_datasets: []
|
16 |
+
tags: []
|
17 |
+
task_categories:
|
18 |
+
- token-classification
|
19 |
+
task_ids:
|
20 |
+
- named-entity-recognition
|
21 |
---
|
22 |
+
|
23 |
+
# Dataset Card for Collection3
|
24 |
+
|
25 |
+
## Table of Contents
|
26 |
+
- [Dataset Description](#dataset-description)
|
27 |
+
- [Dataset Summary](#dataset-summary)
|
28 |
+
- [Supported Tasks](#supported-tasks-and-leaderboards)
|
29 |
+
- [Languages](#languages)
|
30 |
+
- [Dataset Structure](#dataset-structure)
|
31 |
+
- [Data Instances](#data-instances)
|
32 |
+
- [Data Fields](#data-instances)
|
33 |
+
- [Data Splits](#data-instances)
|
34 |
+
- [Dataset Creation](#dataset-creation)
|
35 |
+
- [Curation Rationale](#curation-rationale)
|
36 |
+
- [Source Data](#source-data)
|
37 |
+
- [Annotations](#annotations)
|
38 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
39 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
40 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
41 |
+
- [Discussion of Biases](#discussion-of-biases)
|
42 |
+
- [Other Known Limitations](#other-known-limitations)
|
43 |
+
- [Additional Information](#additional-information)
|
44 |
+
- [Dataset Curators](#dataset-curators)
|
45 |
+
- [Licensing Information](#licensing-information)
|
46 |
+
- [Citation Information](#citation-information)
|
47 |
+
|
48 |
+
## Dataset Description
|
49 |
+
|
50 |
+
- **Homepage:** [Collection3 homepage](http://labinform.ru/pub/named_entities/index.htm)
|
51 |
+
- **Repository:** [Needs More Information]
|
52 |
+
- **Paper:** [Two-stage approach in Russian named entity recognition](https://ieeexplore.ieee.org/document/7584769)
|
53 |
+
- **Leaderboard:** [Needs More Information]
|
54 |
+
- **Point of Contact:** [Needs More Information]
|
55 |
+
|
56 |
+
### Dataset Summary
|
57 |
+
|
58 |
+
Collection3 is a Russian dataset for named entity recognition annotated with LOC (location), PER (person), and ORG (organization) tags. Dataset is based on collection [Persons-1000](http://ai-center.botik.ru/Airec/index.php/ru/collections/28-persons-1000) originally containing 1000 news documents labeled only with names of persons.
|
59 |
+
|
60 |
+
Additional labels were obtained using guidelines similar to MUC-7 with web-based tool [Brat](http://brat.nlplab.org/) for collaborative text annotation.
|
61 |
+
|
62 |
+
Currently dataset contains 26K annotated named entities (11K Persons, 7K Locations and 8K Organizations).
|
63 |
+
|
64 |
+
Conversion to the IOB2 format and splitting into train, validation and test sets was done by [DeepPavlov team](http://files.deeppavlov.ai/deeppavlov_data/collection3_v2.tar.gz).
|
65 |
+
|
66 |
+
### Supported Tasks and Leaderboards
|
67 |
+
|
68 |
+
[Needs More Information]
|
69 |
+
|
70 |
+
### Languages
|
71 |
+
|
72 |
+
Russian
|
73 |
+
|
74 |
+
## Dataset Structure
|
75 |
+
|
76 |
+
### Data Instances
|
77 |
+
|
78 |
+
An example of 'train' looks as follows.
|
79 |
+
|
80 |
+
```
|
81 |
+
{
|
82 |
+
"id": "851",
|
83 |
+
"ner_tags": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 2, 0, 0, 0],
|
84 |
+
"tokens": ['Главный', 'архитектор', 'программного', 'обеспечения', '(', 'ПО', ')', 'американского', 'высокотехнологичного', 'гиганта', 'Microsoft', 'Рэй', 'Оззи', 'покидает', 'компанию', '.']
|
85 |
+
}
|
86 |
+
```
|
87 |
+
|
88 |
+
### Data Fields
|
89 |
+
|
90 |
+
- id: a string feature.
|
91 |
+
- tokens: a list of string features.
|
92 |
+
- ner_tags: a list of classification labels (int). Full tagset with indices:
|
93 |
+
```
|
94 |
+
{'O': 0, 'B-PER': 1, 'I-PER': 2, 'B-ORG': 3, 'I-ORG': 4, 'B-LOC': 5, 'I-LOC': 6}
|
95 |
+
```
|
96 |
+
|
97 |
+
### Data Splits
|
98 |
+
|
99 |
+
|name|train|validation|test|
|
100 |
+
|---------|----:|---------:|---:|
|
101 |
+
|Collection3|9301|2153|1922|
|
102 |
+
|
103 |
+
## Dataset Creation
|
104 |
+
|
105 |
+
### Curation Rationale
|
106 |
+
|
107 |
+
[Needs More Information]
|
108 |
+
|
109 |
+
### Source Data
|
110 |
+
|
111 |
+
#### Initial Data Collection and Normalization
|
112 |
+
|
113 |
+
[Needs More Information]
|
114 |
+
|
115 |
+
#### Who are the source language producers?
|
116 |
+
|
117 |
+
[Needs More Information]
|
118 |
+
|
119 |
+
### Annotations
|
120 |
+
|
121 |
+
#### Annotation process
|
122 |
+
|
123 |
+
[Needs More Information]
|
124 |
+
|
125 |
+
#### Who are the annotators?
|
126 |
+
|
127 |
+
[Needs More Information]
|
128 |
+
|
129 |
+
### Personal and Sensitive Information
|
130 |
+
|
131 |
+
[Needs More Information]
|
132 |
+
|
133 |
+
## Considerations for Using the Data
|
134 |
+
|
135 |
+
### Social Impact of Dataset
|
136 |
+
|
137 |
+
[Needs More Information]
|
138 |
+
|
139 |
+
### Discussion of Biases
|
140 |
+
|
141 |
+
[Needs More Information]
|
142 |
+
|
143 |
+
### Other Known Limitations
|
144 |
+
|
145 |
+
[Needs More Information]
|
146 |
+
|
147 |
+
## Additional Information
|
148 |
+
|
149 |
+
### Dataset Curators
|
150 |
+
|
151 |
+
[Needs More Information]
|
152 |
+
|
153 |
+
### Licensing Information
|
154 |
+
|
155 |
+
[Needs More Information]
|
156 |
+
|
157 |
+
### Citation Information
|
158 |
+
```
|
159 |
+
@inproceedings{mozharova-loukachevitch-2016-two-stage-russian-ner,
|
160 |
+
author={Mozharova, Valerie and Loukachevitch, Natalia},
|
161 |
+
booktitle={2016 International FRUCT Conference on Intelligence, Social Media and Web (ISMW FRUCT)},
|
162 |
+
title={Two-stage approach in Russian named entity recognition},
|
163 |
+
year={2016},
|
164 |
+
pages={1-6},
|
165 |
+
doi={10.1109/FRUCT.2016.7584769}}
|
166 |
+
```
|
collection3.py
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""Collection3: Russian dataset for named entity recognition"""
|
2 |
+
|
3 |
+
import os
|
4 |
+
|
5 |
+
import datasets
|
6 |
+
|
7 |
+
|
8 |
+
logger = datasets.logging.get_logger(__name__)
|
9 |
+
|
10 |
+
|
11 |
+
_CITATION = """\
|
12 |
+
@inproceedings{mozharova-loukachevitch-2016-two-stage-russian-ner,
|
13 |
+
author={Mozharova, Valerie and Loukachevitch, Natalia},
|
14 |
+
booktitle={2016 International FRUCT Conference on Intelligence, Social Media and Web (ISMW FRUCT)},
|
15 |
+
title={Two-stage approach in Russian named entity recognition},
|
16 |
+
year={2016},
|
17 |
+
pages={1-6},
|
18 |
+
doi={10.1109/FRUCT.2016.7584769}}
|
19 |
+
"""
|
20 |
+
|
21 |
+
_DESCRIPTION = """\
|
22 |
+
Collection3 is a Russian dataset for named entity recognition annotated with LOC (location), PER (person), and ORG (organization) tags.
|
23 |
+
|
24 |
+
Dataset is based on collection Persons-1000 originally containing 1000 news documents labeled only with names of persons.
|
25 |
+
Additional labels were added by Valerie Mozharova and Natalia Loukachevitch.
|
26 |
+
Conversion to the IOB2 format and splitting into train, validation and test sets was done by DeepPavlov team.
|
27 |
+
|
28 |
+
For more details see https://ieeexplore.ieee.org/document/7584769 and http://labinform.ru/pub/named_entities/index.htm
|
29 |
+
"""
|
30 |
+
|
31 |
+
_TRAINING_FILE = "train.txt"
|
32 |
+
_DEV_FILE = "valid.txt"
|
33 |
+
_TEST_FILE = "test.txt"
|
34 |
+
|
35 |
+
|
36 |
+
class Collection3(datasets.GeneratorBasedBuilder):
|
37 |
+
"""Collection3 dataset."""
|
38 |
+
|
39 |
+
BUILDER_CONFIGS = [
|
40 |
+
datasets.BuilderConfig(name="collection3", version=datasets.Version("1.0.0"), description=_DESCRIPTION)
|
41 |
+
]
|
42 |
+
|
43 |
+
def _info(self):
|
44 |
+
return datasets.DatasetInfo(
|
45 |
+
description=_DESCRIPTION,
|
46 |
+
features=datasets.Features(
|
47 |
+
{
|
48 |
+
"id": datasets.Value("string"),
|
49 |
+
"tokens": datasets.Sequence(datasets.Value("string")),
|
50 |
+
"ner_tags": datasets.Sequence(
|
51 |
+
datasets.features.ClassLabel(
|
52 |
+
names=[
|
53 |
+
"O",
|
54 |
+
"B-PER",
|
55 |
+
"I-PER",
|
56 |
+
"B-ORG",
|
57 |
+
"I-ORG",
|
58 |
+
"B-LOC",
|
59 |
+
"I-LOC",
|
60 |
+
]
|
61 |
+
)
|
62 |
+
),
|
63 |
+
}
|
64 |
+
),
|
65 |
+
supervised_keys=None,
|
66 |
+
homepage="http://labinform.ru/pub/named_entities/index.htm",
|
67 |
+
citation=_CITATION,
|
68 |
+
)
|
69 |
+
|
70 |
+
def _split_generators(self, dl_manager):
|
71 |
+
"""Returns SplitGenerators."""
|
72 |
+
data_files = {
|
73 |
+
"train": os.path.join('data', _TRAINING_FILE),
|
74 |
+
"dev": os.path.join('data', _DEV_FILE),
|
75 |
+
"test": os.path.join('data', _TEST_FILE),
|
76 |
+
}
|
77 |
+
|
78 |
+
return [
|
79 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": data_files["train"]}),
|
80 |
+
datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": data_files["dev"]}),
|
81 |
+
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": data_files["test"]}),
|
82 |
+
]
|
83 |
+
|
84 |
+
def _generate_examples(self, filepath):
|
85 |
+
logger.info("⏳ Generating examples from = %s", filepath)
|
86 |
+
with open(filepath, encoding="utf-8") as f:
|
87 |
+
guid = 0
|
88 |
+
tokens = []
|
89 |
+
ner_tags = []
|
90 |
+
for line in f:
|
91 |
+
if line.startswith("<DOCSTART>") or line == "" or line == "\n":
|
92 |
+
if tokens:
|
93 |
+
yield guid, {
|
94 |
+
"id": str(guid),
|
95 |
+
"tokens": tokens,
|
96 |
+
"ner_tags": ner_tags,
|
97 |
+
}
|
98 |
+
guid += 1
|
99 |
+
tokens = []
|
100 |
+
ner_tags = []
|
101 |
+
else:
|
102 |
+
splits = line.split("\t")
|
103 |
+
tokens.append(splits[0])
|
104 |
+
ner_tags.append(splits[1].rstrip())
|
105 |
+
# last example
|
106 |
+
if tokens:
|
107 |
+
yield guid, {
|
108 |
+
"id": str(guid),
|
109 |
+
"tokens": tokens,
|
110 |
+
"ner_tags": ner_tags,
|
111 |
+
}
|
data/test.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
data/train.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
data/valid.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"collection3": {"description": "Collection3 is a Russian dataset for named entity recognition annotated with LOC (location), PER (person), and ORG (organization) tags.\n\nDataset is based on collection Persons-1000 originally containing 1000 news documents labeled only with names of persons.\nAdditional labels were added by Valerie Mozharova and Natalia Loukachevitch.\nConversion to the IOB2 format and splitting into train, validation and test sets was done by DeepPavlov team.\n\nFor more details see https://ieeexplore.ieee.org/document/7584769 and http://labinform.ru/pub/named_entities/index.htm\n", "citation": "@inproceedings{mozharova-loukachevitch-2016-two-stage-russian-ner,\n author={Mozharova, Valerie and Loukachevitch, Natalia},\n booktitle={2016 International FRUCT Conference on Intelligence, Social Media and Web (ISMW FRUCT)},\n title={Two-stage approach in Russian named entity recognition},\n year={2016},\n pages={1-6},\n doi={10.1109/FRUCT.2016.7584769}}\n", "homepage": "http://labinform.ru/pub/named_entities/index.htm", "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": 7, "names": ["O", "B-PER", "I-PER", "B-ORG", "I-ORG", "B-LOC", "I-LOC"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "collection3", "config_name": "collection3", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 4380572, "num_examples": 9301, "dataset_name": "collection3"}, "validation": {"name": "validation", "num_bytes": 1020695, "num_examples": 2153, "dataset_name": "collection3"}, "test": {"name": "test", "num_bytes": 935282, "num_examples": 1922, "dataset_name": "collection3"}}, "download_checksums": {}, "download_size": 0, "post_processing_size": null, "dataset_size": 6336549, "size_in_bytes": 6336549}}
|