Restructure dataset and update readme
Browse files- README.md +12 -23
- data.jsonl +0 -0
- idiom_dataset.json +0 -0
- all_idioms_freq.json → idiom_freqs/all_idioms_freq.json +0 -0
- idiom_freqs/both_freqs.json +8 -0
- nno_idioms_freq.json → idiom_freqs/nno_idioms_freq.json +0 -0
- nob_idioms_freq.json → idiom_freqs/nob_idioms_freq.json +0 -0
- all_idioms_flat_sequence_graph.json → idiom_graphs/all_idioms_flat_sequence_graph.json +0 -0
- all_idioms_sequence_graph.json → idiom_graphs/all_idioms_sequence_graph.json +0 -0
- nno_idioms_flat_sequence_graph.json → idiom_graphs/nno_idioms_flat_sequence_graph.json +0 -0
- nno_idioms_sequence_graph.json → idiom_graphs/nno_idioms_sequence_graph.json +0 -0
- nob_idioms_flat_sequence_graph.json → idiom_graphs/nob_idioms_flat_sequence_graph.json +0 -0
- nob_idioms_sequence_graph.json → idiom_graphs/nob_idioms_sequence_graph.json +0 -0
README.md
CHANGED
@@ -10,7 +10,11 @@ pretty_name: Norwegian Idioms
|
|
10 |
size_categories:
|
11 |
- 1K<n<10K
|
12 |
license: cc0-1.0
|
13 |
-
|
|
|
|
|
|
|
|
|
14 |
---
|
15 |
|
16 |
# Norwegian idioms
|
@@ -18,33 +22,15 @@ viewer: false
|
|
18 |
This is a dataset that consists of 3537 Norwegian idioms and phrases that appear more than 100 times in the [online library](https://www.nb.no/search) of the National Library of Norway.
|
19 |
There are 3455 Bokmål idioms and 88 Nynorsk idioms. In the future, we want to add more Nynorsk idioms.
|
20 |
|
21 |
-
## Idioms
|
22 |
-
`all_idioms_freq.json` contain all the idioms and their frequency in the online library as key,value pairs
|
23 |
-
`nno_idioms_freq.json` contain the Nynorsk idioms and their frequency in the online library as key,value pairs
|
24 |
-
`nob_idioms_freq.json` contain the Bokmål idioms and their frequency in the online library as key,value pairs
|
25 |
-
|
26 |
## Idiom completion as an NLP task
|
27 |
-
|
28 |
|
29 |
This dataset can be used to measure a generative language models' ability to complete well known idioms, or as a masked language modelling task.
|
30 |
|
31 |
-
It can be loaded as a Datasets dataset like this:
|
32 |
-
```python
|
33 |
-
from datasets import Dataset
|
34 |
-
import pandas as pd
|
35 |
-
|
36 |
-
df = pd.read_json("idiom_dataset.json")
|
37 |
-
ds = Dataset.from_pandas(df)
|
38 |
-
```
|
39 |
-
The dataset has the columns "idiom_start", "accepted_completions" and "language".
|
40 |
-
There are 3245 rows, 156 of which there are more than one accepted completion.
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
|
46 |
## Idiom graphs
|
47 |
There is considerable linguistic overlap between the idioms. For example, though there are 3537 unique idioms, there are only 796 unique starter words.
|
|
|
48 |
We have arranged the idioms as trees, where the roots are the start words, and the idioms are found by following a path from a root node to a leaf node.
|
49 |
Example:
|
50 |
```json
|
@@ -73,11 +59,13 @@ Example:
|
|
73 |
}
|
74 |
}
|
75 |
},
|
|
|
76 |
```
|
77 |
Here is a tree where "alt" is the root, the idioms "alt er bare fryd og gammen", "alt er klappet og klart", "alt er såre vel" and "alt går sin vante gang" can be found by traversing the tree.
|
78 |
-
These trees can be found
|
79 |
|
80 |
-
|
|
|
81 |
Example:
|
82 |
```json
|
83 |
"alt": {
|
@@ -87,4 +75,5 @@ Example:
|
|
87 |
"såre vel": ""
|
88 |
},
|
89 |
"går sin vante gang": "",
|
|
|
90 |
```
|
|
|
10 |
size_categories:
|
11 |
- 1K<n<10K
|
12 |
license: cc0-1.0
|
13 |
+
configs:
|
14 |
+
- config_name: default
|
15 |
+
data_files:
|
16 |
+
- split: train
|
17 |
+
path: "data.jsonl"
|
18 |
---
|
19 |
|
20 |
# Norwegian idioms
|
|
|
22 |
This is a dataset that consists of 3537 Norwegian idioms and phrases that appear more than 100 times in the [online library](https://www.nb.no/search) of the National Library of Norway.
|
23 |
There are 3455 Bokmål idioms and 88 Nynorsk idioms. In the future, we want to add more Nynorsk idioms.
|
24 |
|
|
|
|
|
|
|
|
|
|
|
25 |
## Idiom completion as an NLP task
|
26 |
+
The idioms are split into idiom starts (the first N-1 words) and accepted completions (a list of possible last words to complete the idiom). Of the 3245 rows, there are 156 where there are more than one accepted completion.
|
27 |
|
28 |
This dataset can be used to measure a generative language models' ability to complete well known idioms, or as a masked language modelling task.
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
## Idiom graphs
|
32 |
There is considerable linguistic overlap between the idioms. For example, though there are 3537 unique idioms, there are only 796 unique starter words.
|
33 |
+
|
34 |
We have arranged the idioms as trees, where the roots are the start words, and the idioms are found by following a path from a root node to a leaf node.
|
35 |
Example:
|
36 |
```json
|
|
|
59 |
}
|
60 |
}
|
61 |
},
|
62 |
+
}
|
63 |
```
|
64 |
Here is a tree where "alt" is the root, the idioms "alt er bare fryd og gammen", "alt er klappet og klart", "alt er såre vel" and "alt går sin vante gang" can be found by traversing the tree.
|
65 |
+
These trees can be found in `idiom_graphs/`.
|
66 |
|
67 |
+
There are also flat versions of the trees (where consecutive nodes/words with only one child are merged into word sequences)
|
68 |
+
|
69 |
Example:
|
70 |
```json
|
71 |
"alt": {
|
|
|
75 |
"såre vel": ""
|
76 |
},
|
77 |
"går sin vante gang": "",
|
78 |
+
}
|
79 |
```
|
data.jsonl
ADDED
The diff for this file is too large to render.
See raw diff
|
|
idiom_dataset.json
DELETED
The diff for this file is too large to render.
See raw diff
|
|
all_idioms_freq.json → idiom_freqs/all_idioms_freq.json
RENAMED
File without changes
|
idiom_freqs/both_freqs.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"Alle gode ting er tre": 43525,
|
3 |
+
"Det beste er godt nok": 50250,
|
4 |
+
"Frende er frende verst": 4589,
|
5 |
+
"Hastverk er lastverk": 8524,
|
6 |
+
"Hovmod står for fall": 6184,
|
7 |
+
"Når enden er god, er allting godt": 5526
|
8 |
+
}
|
nno_idioms_freq.json → idiom_freqs/nno_idioms_freq.json
RENAMED
File without changes
|
nob_idioms_freq.json → idiom_freqs/nob_idioms_freq.json
RENAMED
File without changes
|
all_idioms_flat_sequence_graph.json → idiom_graphs/all_idioms_flat_sequence_graph.json
RENAMED
File without changes
|
all_idioms_sequence_graph.json → idiom_graphs/all_idioms_sequence_graph.json
RENAMED
File without changes
|
nno_idioms_flat_sequence_graph.json → idiom_graphs/nno_idioms_flat_sequence_graph.json
RENAMED
File without changes
|
nno_idioms_sequence_graph.json → idiom_graphs/nno_idioms_sequence_graph.json
RENAMED
File without changes
|
nob_idioms_flat_sequence_graph.json → idiom_graphs/nob_idioms_flat_sequence_graph.json
RENAMED
File without changes
|
nob_idioms_sequence_graph.json → idiom_graphs/nob_idioms_sequence_graph.json
RENAMED
File without changes
|