Datasets:
Suzen Fylke
commited on
Commit
•
3cbc6d5
1
Parent(s):
7533c49
Add sv data and loading script
Browse files
README.md
ADDED
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- expert-generated
|
4 |
+
language:
|
5 |
+
- sv
|
6 |
+
language_creators:
|
7 |
+
- expert-generated
|
8 |
+
license:
|
9 |
+
- cc-by-4.0
|
10 |
+
multilinguality:
|
11 |
+
- monolingual
|
12 |
+
pretty_name: kelly
|
13 |
+
size_categories:
|
14 |
+
- 1K<n<10K
|
15 |
+
source_datasets: []
|
16 |
+
tags:
|
17 |
+
- lexicon
|
18 |
+
- swedish
|
19 |
+
- CEFR
|
20 |
+
task_categories:
|
21 |
+
- text-classification
|
22 |
+
task_ids:
|
23 |
+
- text-scoring
|
24 |
+
---
|
25 |
+
|
26 |
+
# Dataset Card for Kelly
|
27 |
+
|
28 |
+
Keywords for Language Learning for Young and adults alike
|
29 |
+
|
30 |
+
## Table of Contents
|
31 |
+
- [Table of Contents](#table-of-contents)
|
32 |
+
- [Dataset Description](#dataset-description)
|
33 |
+
- [Dataset Summary](#dataset-summary)
|
34 |
+
- [Languages](#languages)
|
35 |
+
- [Dataset Structure](#dataset-structure)
|
36 |
+
- [Data Instances](#data-instances)
|
37 |
+
- [Data Fields](#data-fields)
|
38 |
+
- [Data Splits](#data-splits)
|
39 |
+
- [Additional Information](#additional-information)
|
40 |
+
- [Licensing Information](#licensing-information)
|
41 |
+
- [Citation Information](#citation-information)
|
42 |
+
- [Contributions](#contributions)
|
43 |
+
|
44 |
+
## Dataset Description
|
45 |
+
|
46 |
+
- **Homepage:** https://spraakbanken.gu.se/en/resources/kelly
|
47 |
+
- **Paper:** https://link.springer.com/article/10.1007/s10579-013-9251-2
|
48 |
+
|
49 |
+
### Dataset Summary
|
50 |
+
|
51 |
+
The Swedish Kelly list is a freely available frequency-based vocabulary list
|
52 |
+
that comprises general-purpose language of modern Swedish. The list was
|
53 |
+
generated from a large web-acquired corpus (SweWAC) of 114 million words
|
54 |
+
dating from the 2010s. It is adapted to the needs of language learners and
|
55 |
+
contains 8,425 most frequent lemmas that cover 80% of SweWAC.
|
56 |
+
|
57 |
+
Please refer to the article [Corpus-based approaches for the creation of a frequency
|
58 |
+
based vocabulary list in the EU project KELLY – issues on reliability, validity and
|
59 |
+
coverage](https://gup.ub.gu.se/publication/148533?lang=en) for information about how
|
60 |
+
the dataset was created.
|
61 |
+
|
62 |
+
### Languages
|
63 |
+
|
64 |
+
Swedish (sv-SE)
|
65 |
+
|
66 |
+
## Dataset Structure
|
67 |
+
|
68 |
+
### Data Instances
|
69 |
+
|
70 |
+
Here is a sample of the data:
|
71 |
+
|
72 |
+
```python
|
73 |
+
{
|
74 |
+
'id': '190',
|
75 |
+
'raw_frequency': 117835.0,
|
76 |
+
'relative_frequency': 1033.61,
|
77 |
+
'cefr_level': 'A1',
|
78 |
+
'source': 'SweWaC',
|
79 |
+
'marker': 'en',
|
80 |
+
'lemma': 'dag',
|
81 |
+
'pos': 'noun-en',
|
82 |
+
'examples': 'e.g. god dag'
|
83 |
+
}
|
84 |
+
```
|
85 |
+
|
86 |
+
This can be understood as:
|
87 |
+
|
88 |
+
> The common noun "dag" ("day") has a rank of 190 in the list. It was used 117,835
|
89 |
+
times in SweWaC, meaning it occured 1033.61 times per million words. This word
|
90 |
+
is among the most important vocabulary words for Swedish language learners and
|
91 |
+
should be learned at the A1 CEFR level. An example usage of this word is the
|
92 |
+
phrase "god dag" ("good day").
|
93 |
+
|
94 |
+
|
95 |
+
### Data Fields
|
96 |
+
|
97 |
+
- `id`: The row number for the data entry, starting at 1. Generally corresponds
|
98 |
+
to the rank of the word.
|
99 |
+
- `raw_frequency`: The raw frequency of the word or -1.0 if not available.
|
100 |
+
- `relative_frequency`: The relative frequency of the word measured in
|
101 |
+
number of occurences per million words or -1.0 if not available.
|
102 |
+
- `cefr_level`: The CEFR level (A1, A2, B1, B2, C1, C2) of the word.
|
103 |
+
- `source`: Whether the word came from SweWAC, translation lists (T2), or
|
104 |
+
was manually added (manual).
|
105 |
+
- `marker`: The grammatical marker of the word, if any, such as an article or
|
106 |
+
infinitive marker.
|
107 |
+
- `lemma`: The lemma of the word, sometimes provided with its spelling or
|
108 |
+
stylistic variants.
|
109 |
+
- `pos`: The word's part-of-speech.
|
110 |
+
- `examples`: Usage examples and comments. Only available for some of the words.
|
111 |
+
|
112 |
+
Manual entries were prepended to the list, giving them a higher rank than they
|
113 |
+
might otherwise have had. For example, the manual entry "Göteborg ("Gothenberg")
|
114 |
+
has a rank of 20, while the first non-manual entry "och" ("and") has a rank of
|
115 |
+
87. However, a conjunction and common stopword is far more likely to occur than
|
116 |
+
the name of a city.
|
117 |
+
|
118 |
+
Additionally, manually entries hav a recoreded relative frequency of `1000000`.
|
119 |
+
|
120 |
+
### Data Splits
|
121 |
+
|
122 |
+
There is a single split, `train`.
|
123 |
+
|
124 |
+
## Additional Information
|
125 |
+
|
126 |
+
### Licensing Information
|
127 |
+
|
128 |
+
[CC BY 4.0](https://creativecommons.org/licenses/by/4.0)
|
129 |
+
|
130 |
+
### Citation Information
|
131 |
+
|
132 |
+
Please cite the authors if you use this dataset in your work:
|
133 |
+
|
134 |
+
```bibtex
|
135 |
+
@article{Kilgarriff2013,
|
136 |
+
doi = {10.1007/s10579-013-9251-2},
|
137 |
+
url = {https://doi.org/10.1007/s10579-013-9251-2},
|
138 |
+
year = {2013},
|
139 |
+
month = sep,
|
140 |
+
publisher = {Springer Science and Business Media {LLC}},
|
141 |
+
volume = {48},
|
142 |
+
number = {1},
|
143 |
+
pages = {121--163},
|
144 |
+
author = {Adam Kilgarriff and Frieda Charalabopoulou and Maria Gavrilidou and Janne Bondi Johannessen and Saussan Khalil and Sofie Johansson Kokkinakis and Robert Lew and Serge Sharoff and Ravikiran Vadlapudi and Elena Volodina},
|
145 |
+
title = {Corpus-based vocabulary lists for language learners for nine languages},
|
146 |
+
journal = {Language Resources and Evaluation}
|
147 |
+
}
|
148 |
+
```
|
149 |
+
|
150 |
+
### Contributions
|
151 |
+
|
152 |
+
Thanks to [@spraakbanken](https://github.com/spraakbanken) for creating this dataset
|
153 |
+
and to [@codesue](https://github.com/codesue) for adding it.
|
kelly.py
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""
|
2 |
+
The dataset loading script for the codesue/kelly dataset.
|
3 |
+
"""
|
4 |
+
|
5 |
+
import csv
|
6 |
+
|
7 |
+
import datasets
|
8 |
+
|
9 |
+
_CITATION = """\
|
10 |
+
@article{Kilgarriff2013,
|
11 |
+
doi = {10.1007/s10579-013-9251-2},
|
12 |
+
url = {https://doi.org/10.1007/s10579-013-9251-2},
|
13 |
+
year = {2013},
|
14 |
+
month = sep,
|
15 |
+
publisher = {Springer Science and Business Media {LLC}},
|
16 |
+
volume = {48},
|
17 |
+
number = {1},
|
18 |
+
pages = {121--163},
|
19 |
+
author = {Adam Kilgarriff and Frieda Charalabopoulou and Maria Gavrilidou and Janne Bondi Johannessen and Saussan Khalil and Sofie Johansson Kokkinakis and Robert Lew and Serge Sharoff and Ravikiran Vadlapudi and Elena Volodina},
|
20 |
+
title = {Corpus-based vocabulary lists for language learners for nine languages},
|
21 |
+
journal = {Language Resources and Evaluation}
|
22 |
+
}
|
23 |
+
"""
|
24 |
+
|
25 |
+
_DESCRIPTION = """\
|
26 |
+
The Swedish Kelly list is a freely available frequency-based vocabulary list \
|
27 |
+
that comprises general-purpose language of modern Swedish. The list was \
|
28 |
+
generated from a large web-acquired corpus (SweWAC) of 114 million words \
|
29 |
+
dating from the 2010s. It is adapted to the needs of language learners \
|
30 |
+
and contains 8,425 most frequent lemmas that cover 80% of SweWAC.
|
31 |
+
"""
|
32 |
+
|
33 |
+
_HOMEPAGE = "https://spraakbanken.gu.se/en/resources/kelly"
|
34 |
+
|
35 |
+
_LICENSE = "CC BY 4.0"
|
36 |
+
|
37 |
+
_URLS = {
|
38 |
+
"csv": "sv.csv",
|
39 |
+
}
|
40 |
+
|
41 |
+
|
42 |
+
class Kelly(datasets.GeneratorBasedBuilder):
|
43 |
+
"""Kelly: Keywords for Language Learning for Young and adults alike"""
|
44 |
+
|
45 |
+
VERSION = datasets.Version("1.0.0")
|
46 |
+
|
47 |
+
def _info(self):
|
48 |
+
features = datasets.Features(
|
49 |
+
{
|
50 |
+
"id": datasets.Value("string"),
|
51 |
+
"raw_frequency": datasets.Value("float64"),
|
52 |
+
"relative_frequency": datasets.Value("float64"),
|
53 |
+
"cefr_level": datasets.Value("string"),
|
54 |
+
"source": datasets.Value("string"),
|
55 |
+
"marker": datasets.Value("string"),
|
56 |
+
"lemma": datasets.Value("string"),
|
57 |
+
"class": datasets.Value("string"),
|
58 |
+
"examples": datasets.Value("string"),
|
59 |
+
}
|
60 |
+
)
|
61 |
+
|
62 |
+
return datasets.DatasetInfo(
|
63 |
+
description=_DESCRIPTION,
|
64 |
+
features=features,
|
65 |
+
homepage=_HOMEPAGE,
|
66 |
+
license=_LICENSE,
|
67 |
+
citation=_CITATION,
|
68 |
+
)
|
69 |
+
|
70 |
+
def _split_generators(self, dl_manager):
|
71 |
+
data_path = dl_manager.download_and_extract(_URLS["csv"])
|
72 |
+
return [
|
73 |
+
datasets.SplitGenerator(
|
74 |
+
name=datasets.Split.TRAIN,
|
75 |
+
gen_kwargs={
|
76 |
+
"filepath": data_path,
|
77 |
+
},
|
78 |
+
),
|
79 |
+
]
|
80 |
+
|
81 |
+
def _generate_examples(self, filepath):
|
82 |
+
"""Generate text2log dataset examples."""
|
83 |
+
with open(filepath, encoding="utf-8") as csv_file:
|
84 |
+
csv_reader = csv.reader(
|
85 |
+
csv_file, quotechar='"', delimiter=",", quoting=csv.QUOTE_ALL, skipinitialspace=True
|
86 |
+
)
|
87 |
+
next(csv_reader)
|
88 |
+
for key, row in enumerate(csv_reader):
|
89 |
+
a, b, c, d, e, f, g, h, i = row
|
90 |
+
yield key, {
|
91 |
+
"id": a,
|
92 |
+
"raw_frequency": b or "-1",
|
93 |
+
"relative_frequency": c or "-1",
|
94 |
+
"cefr_level": d,
|
95 |
+
"source": e,
|
96 |
+
"marker": f,
|
97 |
+
"lemma": g,
|
98 |
+
"class": h,
|
99 |
+
"examples": i,
|
100 |
+
}
|
sv.csv
ADDED
The diff for this file is too large to render.
See raw diff
|
|