Datasets:

Languages:
Swedish
Multilinguality:
monolingual
Size Categories:
1K<n<10K
Annotations Creators:
crowdsourced
Source Datasets:
extended|other-sts-b
ArXiv:
Tags:
License:
system HF staff commited on
Commit
50d10a8
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

.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,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - crowdsourced
4
+ language_creators:
5
+ - crowdsourced
6
+ - machine-generated
7
+ languages:
8
+ - sv
9
+ licenses:
10
+ - unknown
11
+ multilinguality:
12
+ - monolingual
13
+ size_categories:
14
+ - 1K<n<10K
15
+ source_datasets:
16
+ - extended|other-sts-b
17
+ task_categories:
18
+ - text-scoring
19
+ task_ids:
20
+ - semantic-similarity-scoring
21
+ ---
22
+
23
+ # Dataset Card for Swedish Machine Translated STS-B
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:** [stsb-mt-sv homepage](https://github.com/timpal0l/sts-benchmark-swedish)
51
+ - **Repository:** [stsb-mt-sv repository](https://github.com/timpal0l/sts-benchmark-swedish)
52
+ - **Paper:** [Why Not Simply Translate? A First Swedish Evaluation Benchmark for Semantic Similarity
53
+ ](https://arxiv.org/abs/2009.03116)
54
+ - **Point of Contact:** [Tim Isbister](mailto:timisbisters@gmail.com)
55
+
56
+ ### Dataset Summary
57
+
58
+ This dataset is a Swedish machine translated version for semantic textual similarity.
59
+
60
+ ### Supported Tasks and Leaderboards
61
+
62
+ This dataset can be used to evaluate text similarity on Swedish.
63
+
64
+ ### Languages
65
+
66
+ The text in the dataset is in Swedish. The associated BCP-47 code is `sv`.
67
+
68
+ ## Dataset Structure
69
+
70
+ ### Data Instances
71
+
72
+ What a sample looks like:
73
+ ```
74
+ {'score': '4.2',
75
+ 'sentence1': 'Undrar om jultomten kommer i år pga Corona..?',
76
+ 'sentence2': 'Jag undrar om jultomen kommer hit i år med tanke på covid-19',
77
+ }
78
+ ```
79
+
80
+ ### Data Fields
81
+
82
+ - `score`: a float representing the semantic similarity score. Where 0.0 is the lowest score and 5.0 is the highest.
83
+ - `sentence1`: a string representing a text
84
+ - `sentence2`: another string to compare the semantic with
85
+
86
+ ### Data Splits
87
+
88
+ The data is split into a training, validation and test set. The final split sizes are as follow:
89
+
90
+ | Train | Valid | Test |
91
+ | ------ | ----- | ---- |
92
+ | 5749 | 1500 | 1379 |
93
+
94
+ ## Dataset Creation
95
+
96
+ ### Curation Rationale
97
+
98
+ ### Source Data
99
+
100
+ #### Initial Data Collection and Normalization
101
+
102
+ #### Who are the source language producers?
103
+
104
+ ### Annotations
105
+
106
+ #### Annotation process
107
+
108
+ #### Who are the annotators?
109
+
110
+ ### Personal and Sensitive Information
111
+
112
+ ## Considerations for Using the Data
113
+
114
+ ### Social Impact of Dataset
115
+
116
+ ### Discussion of Biases
117
+
118
+ ### Other Known Limitations
119
+
120
+ ## Additional Information
121
+
122
+ ### Dataset Curators
123
+
124
+ The machine translated version were put together by @timpal0l
125
+
126
+ ### Licensing Information
127
+
128
+ ### Citation Information
129
+
130
+ ```
131
+ @article{isbister2020not,
132
+ title={Why Not Simply Translate? A First Swedish Evaluation Benchmark for Semantic Similarity},
133
+ author={Isbister, Tim and Sahlgren, Magnus},
134
+ journal={arXiv preprint arXiv:2009.03116},
135
+ year={2020}
136
+ }
137
+ ```
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"plain_text": {"description": "Machine translated Swedish version of the original STS-B (http://ixa2.si.ehu.eus/stswiki)", "citation": "@article{isbister2020not,\n title={Why Not Simply Translate? A First Swedish Evaluation Benchmark for Semantic Similarity},\n author={Isbister, Tim and Sahlgren, Magnus},\n journal={arXiv preprint arXiv:2009.03116},\n year={2020}\n}\n", "homepage": "https://github.com/timpal0l/sts-benchmark-swedish", "license": "", "features": {"sentence1": {"dtype": "string", "id": null, "_type": "Value"}, "sentence2": {"dtype": "string", "id": null, "_type": "Value"}, "score": {"dtype": "float32", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "stsb_mt_sv", "config_name": "plain_text", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"test": {"name": "test", "num_bytes": 171823, "num_examples": 1379, "dataset_name": "stsb_mt_sv"}, "validation": {"name": "validation", "num_bytes": 218843, "num_examples": 1500, "dataset_name": "stsb_mt_sv"}, "train": {"name": "train", "num_bytes": 772847, "num_examples": 5749, "dataset_name": "stsb_mt_sv"}}, "download_checksums": {"https://raw.githubusercontent.com/timpal0l/sts-benchmark-swedish/master/data/stsb-mt-sv.zip": {"num_bytes": 383047, "checksum": "f7f941887a6fea53efa4379c0a5338ee0ea0b704debabbd2dd8dec9c2ef4891f"}}, "download_size": 383047, "post_processing_size": null, "dataset_size": 1163513, "size_in_bytes": 1546560}}
dummy/plain_text/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:350ac3546ce3803fc8603d0da0a08475742a883ba5fb0c4046f923b3e9877b3a
3
+ size 1250
stsb_mt_sv.py ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 The TensorFlow Datasets Authors and the 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
+
18
+ from __future__ import absolute_import, division, print_function
19
+
20
+ import csv
21
+ import os
22
+
23
+ import datasets
24
+
25
+
26
+ _DOWNLOAD_URL = "https://raw.githubusercontent.com/timpal0l/sts-benchmark-swedish/master/data/stsb-mt-sv.zip"
27
+ _TRAIN_FILE = "train-sv.tsv"
28
+ _VAL_FILE = "dev-sv.tsv"
29
+ _TEST_FILE = "test-sv.tsv"
30
+
31
+ _CITATION = """\
32
+ @article{isbister2020not,
33
+ title={Why Not Simply Translate? A First Swedish Evaluation Benchmark for Semantic Similarity},
34
+ author={Isbister, Tim and Sahlgren, Magnus},
35
+ journal={arXiv preprint arXiv:2009.03116},
36
+ year={2020}
37
+ }
38
+ """
39
+
40
+ _DESCRIPTION = "Machine translated Swedish version of the original STS-B (http://ixa2.si.ehu.eus/stswiki)"
41
+
42
+
43
+ class StsbMtSv(datasets.GeneratorBasedBuilder):
44
+ BUILDER_CONFIGS = [
45
+ datasets.BuilderConfig(
46
+ name="plain_text",
47
+ version=datasets.Version("1.0.0", ""),
48
+ description="Plain text import of the Swedish Machine Translated STS-B",
49
+ )
50
+ ]
51
+
52
+ def _info(self):
53
+ return datasets.DatasetInfo(
54
+ description=_DESCRIPTION,
55
+ features=datasets.Features(
56
+ {
57
+ "sentence1": datasets.Value("string"),
58
+ "sentence2": datasets.Value("string"),
59
+ "score": datasets.Value("float"),
60
+ }
61
+ ),
62
+ supervised_keys=None,
63
+ homepage="https://github.com/timpal0l/sts-benchmark-swedish",
64
+ citation=_CITATION,
65
+ )
66
+
67
+ def _split_generators(self, dl_manager):
68
+ dl_dir = dl_manager.download_and_extract(_DOWNLOAD_URL)
69
+ return [
70
+ datasets.SplitGenerator(
71
+ name=datasets.Split.TEST,
72
+ gen_kwargs={"filepath": os.path.join(dl_dir, _TEST_FILE)},
73
+ ),
74
+ datasets.SplitGenerator(
75
+ name=datasets.Split.VALIDATION,
76
+ gen_kwargs={"filepath": os.path.join(dl_dir, _VAL_FILE)},
77
+ ),
78
+ datasets.SplitGenerator(
79
+ name=datasets.Split.TRAIN,
80
+ gen_kwargs={"filepath": os.path.join(dl_dir, _TRAIN_FILE)},
81
+ ),
82
+ ]
83
+
84
+ def _generate_examples(self, filepath):
85
+ """This function returns the examples in the raw (text) form."""
86
+ with open(filepath, encoding="utf-8") as f:
87
+ reader = csv.DictReader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
88
+ for idx, row in enumerate(reader):
89
+ yield idx, {
90
+ "sentence1": row["sentence1"],
91
+ "sentence2": row["sentence2"],
92
+ "score": row["score"],
93
+ }