Joanna Baran commited on
Commit
0b74fe6
·
1 Parent(s): 4446cf1

initial commit

Browse files
.gitattributes CHANGED
@@ -53,3 +53,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
53
  *.jpg filter=lfs diff=lfs merge=lfs -text
54
  *.jpeg filter=lfs diff=lfs merge=lfs -text
55
  *.webp filter=lfs diff=lfs merge=lfs -text
 
 
53
  *.jpg filter=lfs diff=lfs merge=lfs -text
54
  *.jpeg filter=lfs diff=lfs merge=lfs -text
55
  *.webp filter=lfs diff=lfs merge=lfs -text
56
+ *.jsonl filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,11 +1,161 @@
1
  ---
2
  license: cc
3
  task_categories:
4
- - text-classification
5
  language:
6
- - pl
7
- - en
8
  pretty_name: Cross-Document Structure Theory datasets
9
  size_categories:
10
- - 1K<n<10K
11
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc
3
  task_categories:
4
+ - text-classification
5
  language:
6
+ - pl
7
+ - en
8
  pretty_name: Cross-Document Structure Theory datasets
9
  size_categories:
10
+ - 1K<n<10K
11
+ ---
12
+
13
+ # Cross Document Structure Theory datasets
14
+
15
+ ## Table of Contents
16
+
17
+ - [Dataset Description](#dataset-description)
18
+ - [Dataset Summary](#dataset-summary)
19
+ - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
20
+ - [Languages](#languages)
21
+ - [Dataset Structure](#dataset-structure)
22
+ - [Data Instances](#data-instances)
23
+ - [Data Fields](#data-fields)
24
+ - [Data Splits](#data-splits)
25
+ - [Dataset Creation](#dataset-creation)
26
+ - [Curation Rationale](#curation-rationale)
27
+ - [Source Data](#source-data)
28
+ - [Annotations](#annotations)
29
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
30
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
31
+ - [Social Impact of Dataset](#social-impact-of-dataset)
32
+ - [Discussion of Biases](#discussion-of-biases)
33
+ - [Other Known Limitations](#other-known-limitations)
34
+ - [Additional Information](#additional-information)
35
+ - [Dataset Curators](#dataset-curators)
36
+ - [Licensing Information](#licensing-information)
37
+ - [Citation Information](#citation-information)
38
+ - [Contributions](#contributions)
39
+
40
+ ## Dataset Description
41
+
42
+ - **Homepage:**
43
+ - **Repository:**
44
+ - **Paper:**
45
+ - **Point of Contact:** arkadiusz.janz@pwr.edu.pl
46
+
47
+ ### Dataset Summary
48
+
49
+ Collection of sentence pairs annotated for the Cross-Document Structure Theory (CST) task.
50
+ It consists of 3 distinct datasets, manually annotated based on plWordNet-4.5:
51
+
52
+ - WUT
53
+ - PODCAST
54
+ - SNLI
55
+ - WNLI
56
+
57
+ ### Supported Tasks and Leaderboards
58
+
59
+ [More Information Needed]
60
+
61
+ ### Languages
62
+
63
+ Polish language, PL
64
+ English language, EN
65
+
66
+ ## Dataset Structure
67
+
68
+ ### Data Instances
69
+
70
+ Data are structured in JSONL format, each single text sample is divided by sentence.
71
+
72
+ ```
73
+ {
74
+ "id": 0,
75
+ "sentence_1": "According to the television coverage of the royal wedding, the bride looked beautiful.",
76
+ "sentence_2": "The bride looked exceptionally beautiful.",
77
+ "cst": [
78
+ {
79
+ "supertype": "overlap",
80
+ "type": "attribution",
81
+ "knowledge": "text"
82
+ },
83
+ {
84
+ "supertype": "overlap",
85
+ "type": "elaboration",
86
+ "knowledge": "text"
87
+ }
88
+ ]
89
+ }
90
+ ```
91
+
92
+ ### Data Fields
93
+
94
+ Description of json keys:
95
+
96
+ - `id`: identifier of the sentence pair
97
+ - `sentence_1`: first sentence
98
+ - `sentence_2`: second sentence
99
+ - `cst`: list of CST labels
100
+ - `supertype`: relation supertype
101
+ - `type`: specific relation type
102
+ - `knowledge`: premise knowledge source
103
+
104
+ ### Data Splits
105
+
106
+ We do not specify an exact data split for training and evaluation.
107
+
108
+ ## Dataset Creation
109
+
110
+ ### Curation Rationale
111
+
112
+ [More Information Needed]
113
+
114
+ ### Source Data
115
+
116
+ #### Initial Data Collection, Normalization and Post-processing
117
+
118
+ [More Information Needed]
119
+
120
+ ### Annotations
121
+
122
+ ![Obraz](typology_cst.png)
123
+
124
+ #### Annotation process
125
+
126
+ [More Information Needed]
127
+
128
+ #### Who are the annotators?
129
+
130
+ - professional linguists (mention all people involved)
131
+
132
+ ### Personal and Sensitive Information
133
+
134
+ The datasets do not contain any personal or sensitive information.
135
+
136
+ ## Considerations for Using the Data
137
+
138
+ ### Discussion of Biases
139
+
140
+ [More Information Needed]
141
+
142
+ ### Other Known Limitations
143
+
144
+ [More Information Needed]
145
+
146
+ ## Additional Information
147
+
148
+ ### Dataset Curators
149
+
150
+ Arkadiusz Janz (arkadiusz.janz@pwr.edu.pl)
151
+
152
+ ### Licensing Information
153
+
154
+ WUT [CC-BY 2.5](https://creativecommons.org/licenses/by/2.5/)
155
+ PODCAST [CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)
156
+ SNLI [CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)
157
+ WNLI [CC-BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)
158
+
159
+ ### Citation Information
160
+
161
+ [More Information Needed]
cst_directed_datasets.py ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ import json
15
+
16
+ import datasets
17
+
18
+ logger = datasets.logging.get_logger(__name__)
19
+
20
+ _DESCRIPTION = """\
21
+ Data for Polish CST task annotated manually
22
+ """
23
+
24
+ _BASE_URL = "https://huggingface.co/datasets/clarin-knext/WUT_pl/resolve/main/data/"
25
+
26
+ _DATASET_NAME = [
27
+ "wut_pl",
28
+ "wut_en",
29
+ "podcast_pl",
30
+ "podcast_en",
31
+ "snli_pl",
32
+ "snli_en",
33
+ "wnli_pl",
34
+ "wnli_en",
35
+ ]
36
+
37
+ _URLS = {
38
+ dataset: f"{_BASE_URL}{dataset}_cst_directed_{lang}.jsonl"
39
+ for dataset, lang in (dataset_name.split('_') for dataset_name in _DATASET_NAME)
40
+ }
41
+
42
+
43
+ class CSTDirectedDatasetBuilderConfig(datasets.BuilderConfig):
44
+ def __init__(
45
+ self,
46
+ data_url: str,
47
+ name: str,
48
+ **kwargs,
49
+ ):
50
+ super(CSTDirectedDatasetBuilderConfig, self).__init__(
51
+ name=name,
52
+ version=datasets.Version("1.0.0"),
53
+ **kwargs,
54
+ )
55
+
56
+ self.name = name
57
+ self.data_url = data_url
58
+ if self.name not in _DATASET_NAME:
59
+ raise ValueError(
60
+ f"Config name `{self.name}` is not available. Enter one of: {_DATASET_NAME}"
61
+ )
62
+
63
+
64
+ class CSTDirectedDataset(datasets.GeneratorBasedBuilder):
65
+ """Polish WSD training data"""
66
+
67
+ BUILDER_CONFIGS = [
68
+ CSTDirectedDatasetBuilderConfig(
69
+ name=dataset,
70
+ data_url=_URLS[dataset],
71
+ description=f"Dataset {dataset} with CST annotation including relation direction.",
72
+ )
73
+ for dataset in _DATASET_NAME
74
+ ]
75
+
76
+ DEFAULT_CONFIG_NAME = "podcast_en"
77
+
78
+ def _info(self) -> datasets.DatasetInfo:
79
+ features = {
80
+ "id": datasets.Value("int32"),
81
+ "sentence_1": datasets.Value("string"),
82
+ "sentence_2": datasets.Value("string"),
83
+ "cst": datasets.features.Sequence(
84
+ dict(
85
+ {
86
+ "supertype": datasets.Value("string"),
87
+ "type": datasets.Value("string"),
88
+ "knowledge": datasets.Value("string"),
89
+ }
90
+ )
91
+ ),
92
+ }
93
+
94
+ return datasets.DatasetInfo(
95
+ description=_DESCRIPTION,
96
+ features=datasets.Features(features),
97
+ supervised_keys=None,
98
+ # license=_LICENSE,
99
+ # citation=_CITATION,
100
+ )
101
+
102
+ def _split_generators(self, dl_manager):
103
+ filepath = dl_manager.download_and_extract(self.config.data_url)
104
+
105
+ return [
106
+ datasets.SplitGenerator(
107
+ name=datasets.Split.TRAIN,
108
+ gen_kwargs={
109
+ "filepath": filepath,
110
+ },
111
+ ),
112
+ ]
113
+
114
+ def _generate_examples(self, filepath: str):
115
+ key_iter = 0
116
+ with open(filepath, encoding="utf-8") as f:
117
+ for data in (json.loads(line) for line in f):
118
+ yield key_iter, data
119
+ key_iter += 1
data/podcast_cst_directed_en.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fb6d3482b18571e88437abb1bdbca66bbcead483fedd404b9da8eb718b248aad
3
+ size 2622625
data/podcast_cst_directed_pl.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:24de2c031b1623103188dbd1a1fa70ecbe93e312bb5696650eb6e8a5af6e0527
3
+ size 2617347
data/snli_cst_directed_en.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e861a39aa85e94d1c00567e806f287eb3ef708ac6ec39b92b211a8a9bf9097bb
3
+ size 267605
data/snli_cst_directed_pl.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d0bec4963ad9f8c1193dc36b90b8739f8d244a737354ca4db428f32985294b29
3
+ size 278564
data/wut_cst_directed_en.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e6364fdca2a82e2de17ca07dacf2c2cfc667328e098f4771aa00b0cabf559e7
3
+ size 504969
data/wut_cst_directed_pl.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fc07dca3edb3561774fdc39f982322bfef35f48a2b460fa1e8fcdbf2cce5092a
3
+ size 513012
typology_cst.png ADDED

Git LFS Details

  • SHA256: 482a0f357ae76176bc37bff676b116bcbc4c02668b9b16fd714642655a95a7ad
  • Pointer size: 131 Bytes
  • Size of remote file: 161 kB