system HF staff commited on
Commit
4b43724
0 Parent(s):

Update files from the datasets library (from 1.2.0)

Browse files

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

Files changed (5) hide show
  1. .gitattributes +27 -0
  2. README.md +168 -0
  3. dataset_infos.json +1 -0
  4. dummy/1.1.0/dummy_data.zip +3 -0
  5. wrbsc.py +143 -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,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language_creators:
5
+ - found
6
+ languages:
7
+ - pl
8
+ licenses:
9
+ - cc-by-sa-3-0
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 1K<n<10K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - text-classification
18
+ task_ids:
19
+ - semantic-similarity-classification
20
+ ---
21
+
22
+ # Dataset Card for wrbsc
23
+
24
+ ## Table of Contents
25
+ - [Dataset Description](#dataset-description)
26
+ - [Dataset Summary](#dataset-summary)
27
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
28
+ - [Languages](#languages)
29
+ - [Dataset Structure](#dataset-structure)
30
+ - [Data Instances](#data-instances)
31
+ - [Data Fields](#data-instances)
32
+ - [Data Splits](#data-instances)
33
+ - [Dataset Creation](#dataset-creation)
34
+ - [Curation Rationale](#curation-rationale)
35
+ - [Source Data](#source-data)
36
+ - [Annotations](#annotations)
37
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
38
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
39
+ - [Social Impact of Dataset](#social-impact-of-dataset)
40
+ - [Discussion of Biases](#discussion-of-biases)
41
+ - [Other Known Limitations](#other-known-limitations)
42
+ - [Additional Information](#additional-information)
43
+ - [Dataset Curators](#dataset-curators)
44
+ - [Licensing Information](#licensing-information)
45
+ - [Citation Information](#citation-information)
46
+
47
+ ## Dataset Description
48
+
49
+ - **Homepage:** https://clarin-pl.eu/dspace/handle/11321/305
50
+ - **Repository:** https://clarin-pl.eu/dspace/handle/11321/305
51
+ - **Paper:** [Needs More Information]
52
+ - **Leaderboard:** [Needs More Information]
53
+ - **Point of Contact:** [Needs More Information]
54
+
55
+ ### Dataset Summary
56
+
57
+ WUT Relations Between Sentences Corpus contains 2827 pairs of related sentences. Relationships are derived from Cross-document Structure Theory (CST), which enables multi-document summarization through identification of cross-document rhetorical relationships within a cluster of related documents. Every relation was marked by at least 3 annotators.
58
+
59
+ ### Supported Tasks and Leaderboards
60
+
61
+ [Needs More Information]
62
+
63
+ ### Languages
64
+
65
+ Polish
66
+
67
+ ## Dataset Structure
68
+
69
+ ### Data Instances
70
+ An example contains two related sentences and a class representing the type of relationship between those sentences.
71
+
72
+ ```
73
+ {'relationship': 0,
74
+ 'sentence1': 'Znajdujące się w Biurze Bezpieczeństwa Narodowego akta Komisji Weryfikacyjnej WSI zostały przewiezione do siedziby Służby Kontrwywiadu Wojskowego.',
75
+ 'sentence2': '2008-07-03: Wywiezienie akt dotyczących WSI – sprawa dla prokuratury?'}
76
+ ```
77
+
78
+ ### Data Fields
79
+
80
+ - `sentence1`: the first sentence being compared (`string`)
81
+ - `sentence2`: the second sentence being compared (`string`)
82
+ - `relationship`: the type of relationship between those sentences. Can be one of 16 classes listed below:
83
+ - `Krzyżowanie_się`: crossing
84
+ - `Tło_historyczne`: historical background
85
+ - `Źródło`: source
86
+ - `Dalsze_informacje`: additional information
87
+ - `Zawieranie`: inclusion
88
+ - `Opis`: description
89
+ - `Uszczegółowienie`: further detail
90
+ - `Parafraza`: paraphrase
91
+ - `Spełnienie`: fulfillment
92
+ - `Mowa_zależna`: passive voice
93
+ - `Zmiana_poglądu`: change of opinion
94
+ - `Streszczenie`: summarization
95
+ - `Tożsamość`: identity
96
+ - `Sprzeczność`: conflict
97
+ - `Modalność`: modality
98
+ - `Cytowanie`: quotation
99
+
100
+ ### Data Splits
101
+
102
+ Single train split
103
+
104
+ ## Dataset Creation
105
+
106
+ ### Curation Rationale
107
+
108
+ [Needs More Information]
109
+
110
+ ### Source Data
111
+
112
+ #### Initial Data Collection and Normalization
113
+
114
+ [Needs More Information]
115
+
116
+ #### Who are the source language producers?
117
+
118
+ [Needs More Information]
119
+
120
+ ### Annotations
121
+
122
+ #### Annotation process
123
+
124
+ [Needs More Information]
125
+
126
+ #### Who are the annotators?
127
+
128
+ [Needs More Information]
129
+
130
+ ### Personal and Sensitive Information
131
+
132
+ [Needs More Information]
133
+
134
+ ## Considerations for Using the Data
135
+
136
+ ### Social Impact of Dataset
137
+
138
+ [Needs More Information]
139
+
140
+ ### Discussion of Biases
141
+
142
+ [Needs More Information]
143
+
144
+ ### Other Known Limitations
145
+
146
+ [Needs More Information]
147
+
148
+ ## Additional Information
149
+
150
+ ### Dataset Curators
151
+
152
+ [Needs More Information]
153
+
154
+ ### Licensing Information
155
+
156
+ Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
157
+
158
+ ### Citation Information
159
+ ```
160
+ @misc{11321/305,
161
+ title = {{WUT} Relations Between Sentences Corpus},
162
+ author = {Oleksy, Marcin and Fikus, Dominika and Wolski, Micha{\l} and Podbielska, Ma{\l}gorzata and Turek, Agnieszka and Kędzia, Pawe{\l}},
163
+ url = {http://hdl.handle.net/11321/305},
164
+ note = {{CLARIN}-{PL} digital repository},
165
+ copyright = {Attribution-{ShareAlike} 3.0 Unported ({CC} {BY}-{SA} 3.0)},
166
+ year = {2016}
167
+ }
168
+ ```
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"default": {"description": "WUT Relations Between Sentences Corpus contains 2827 pairs of related sentences.\nRelationships are derived from Cross-document Structure Theory (CST), which enables multi-document summarization through identification of cross-document rhetorical relationships within a cluster of related documents.\nEvery relation was marked by at least 3 annotators.\n", "citation": "@misc{11321/305,\n title = {{WUT} Relations Between Sentences Corpus},\n author = {Oleksy, Marcin and Fikus, Dominika and Wolski, Michal and Podbielska, Malgorzata and Turek, Agnieszka and K\u0119dzia, Pawel},\n url = {http://hdl.handle.net/11321/305},\n note = {{CLARIN}-{PL} digital repository},\n copyright = {Attribution-{ShareAlike} 3.0 Unported ({CC} {BY}-{SA} 3.0)},\n year = {2016}\n}\n", "homepage": "https://clarin-pl.eu/dspace/handle/11321/305", "license": "Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)", "features": {"sentence1": {"dtype": "string", "id": null, "_type": "Value"}, "sentence2": {"dtype": "string", "id": null, "_type": "Value"}, "relationship": {"num_classes": 16, "names": ["Krzy\u017cowanie_si\u0119", "T\u0142o_historyczne", "\u0179r\u00f3d\u0142o", "Dalsze_informacje", "Zawieranie", "Opis", "Uszczeg\u00f3\u0142owienie", "Parafraza", "Spe\u0142nienie", "Mowa_zale\u017cna", "Zmiana_pogl\u0105du", "Streszczenie", "To\u017csamo\u015b\u0107", "Sprzeczno\u015b\u0107", "Modalno\u015b\u0107", "Cytowanie"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "wrbsc", "config_name": "default", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 779881, "num_examples": 2827, "dataset_name": "wrbsc"}}, "download_checksums": {"https://clarin-pl.eu/dspace/bitstream/handle/11321/305/sem_rels-betw-sents.csv": {"num_bytes": 1273815, "checksum": "ad1219235c06a39f007762d0c9ff0fc513c90fb9437f2a5b503d230e51a2419e"}}, "download_size": 1273815, "post_processing_size": null, "dataset_size": 779881, "size_in_bytes": 2053696}}
dummy/1.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:837cf75fd6327ece7fbe070d0fde4b1372540c7bcc0dccc25e24c3e2a945ece6
3
+ size 1637
wrbsc.py ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
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
+ """WUT Relations Between Sentences Corpus"""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import csv
20
+
21
+ import datasets
22
+
23
+
24
+ # TODO: Add BibTeX citation
25
+ # Find for instance the citation on arxiv or on the dataset repo/website
26
+ _CITATION = """\
27
+ @misc{11321/305,
28
+ title = {{WUT} Relations Between Sentences Corpus},
29
+ author = {Oleksy, Marcin and Fikus, Dominika and Wolski, Michal and Podbielska, Malgorzata and Turek, Agnieszka and Kędzia, Pawel},
30
+ url = {http://hdl.handle.net/11321/305},
31
+ note = {{CLARIN}-{PL} digital repository},
32
+ copyright = {Attribution-{ShareAlike} 3.0 Unported ({CC} {BY}-{SA} 3.0)},
33
+ year = {2016}
34
+ }
35
+ """
36
+
37
+ # TODO: Add description of the dataset here
38
+ # You can copy an official description
39
+ _DESCRIPTION = """\
40
+ WUT Relations Between Sentences Corpus contains 2827 pairs of related sentences.
41
+ Relationships are derived from Cross-document Structure Theory (CST), which enables multi-document summarization through identification of cross-document rhetorical relationships within a cluster of related documents.
42
+ Every relation was marked by at least 3 annotators.
43
+ """
44
+
45
+ # TODO: Add a link to an official homepage for the dataset here
46
+ _HOMEPAGE = "https://clarin-pl.eu/dspace/handle/11321/305"
47
+
48
+ # TODO: Add the licence for the dataset here if you can find it
49
+ _LICENSE = "Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)"
50
+
51
+ # TODO: Add link to the official dataset URLs here
52
+ # The HuggingFace dataset library don't host the datasets but only point to the original files
53
+ # This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
54
+ _URL = "https://clarin-pl.eu/dspace/bitstream/handle/11321/305/sem_rels-betw-sents.csv"
55
+
56
+
57
+ # TODO: Name of the dataset usually match the script name with CamelCase instead of snake_case
58
+ class Wrbsc(datasets.GeneratorBasedBuilder):
59
+ """WUT Relations Between Sentences Corpus"""
60
+
61
+ VERSION = datasets.Version("1.1.0")
62
+
63
+ def _info(self):
64
+ # TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
65
+ features = datasets.Features(
66
+ {
67
+ "sentence1": datasets.Value("string"),
68
+ "sentence2": datasets.Value("string"),
69
+ "relationship": datasets.ClassLabel(
70
+ names=[
71
+ "Krzyżowanie_się",
72
+ "Tło_historyczne",
73
+ "Źródło",
74
+ "Dalsze_informacje",
75
+ "Zawieranie",
76
+ "Opis",
77
+ "Uszczegółowienie",
78
+ "Parafraza",
79
+ "Spełnienie",
80
+ "Mowa_zależna",
81
+ "Zmiana_poglądu",
82
+ "Streszczenie",
83
+ "Tożsamość",
84
+ "Sprzeczność",
85
+ "Modalność",
86
+ "Cytowanie",
87
+ ]
88
+ ),
89
+ }
90
+ )
91
+ return datasets.DatasetInfo(
92
+ # This is the description that will appear on the datasets page.
93
+ description=_DESCRIPTION,
94
+ # This defines the different columns of the dataset and their types
95
+ features=features, # Here we define them above because they are different between the two configurations
96
+ # If there's a common (input, target) tuple from the features,
97
+ # specify them here. They'll be used if as_supervised=True in
98
+ # builder.as_dataset.
99
+ supervised_keys=None,
100
+ # Homepage of the dataset for documentation
101
+ homepage=_HOMEPAGE,
102
+ # License for the dataset if available
103
+ license=_LICENSE,
104
+ # Citation for the dataset
105
+ citation=_CITATION,
106
+ )
107
+
108
+ def _split_generators(self, dl_manager):
109
+ """Returns SplitGenerators."""
110
+ # TODO: This method is tasked with downloading/extracting the data and defining the splits depending on the configuration
111
+ # If several configurations are possible (listed in BUILDER_CONFIGS), the configuration selected by the user is in self.config.name
112
+
113
+ # dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLs
114
+ # It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
115
+ # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
116
+ filepath = dl_manager.download(_URL)
117
+ return [
118
+ datasets.SplitGenerator(
119
+ name=datasets.Split.TRAIN,
120
+ # These kwargs will be passed to _generate_examples
121
+ gen_kwargs={
122
+ "filepath": filepath,
123
+ "split": "train",
124
+ },
125
+ ),
126
+ ]
127
+
128
+ def _generate_examples(self, filepath, split):
129
+ """ Yields examples. """
130
+ # TODO: This method will receive as arguments the `gen_kwargs` defined in the previous `_split_generators` method.
131
+ # It is in charge of opening the given file and yielding (key, example) tuples from the dataset
132
+ # The key is not important, it's more here for legacy reason (legacy from tfds)
133
+
134
+ with open(filepath, encoding="utf-8") as f:
135
+ reader = csv.DictReader(
136
+ f, delimiter="\t", fieldnames=["0", "1", "s1", "s2", "r", "2"], quoting=csv.QUOTE_NONE
137
+ )
138
+ for idx, row in enumerate(reader):
139
+ yield idx, {
140
+ "sentence1": row["s1"][1:-1],
141
+ "sentence2": row["s2"][1:-1],
142
+ "relationship": row["r"],
143
+ }