titae commited on
Commit
49523f8
1 Parent(s): 13be8be

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +78 -1
README.md CHANGED
@@ -9,4 +9,81 @@ language:
9
  pretty_name: Norwegian Idioms
10
  size_categories:
11
  - 1K<n<10K
12
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  pretty_name: Norwegian Idioms
10
  size_categories:
11
  - 1K<n<10K
12
+ license: cc0-1.0
13
+ ---
14
+
15
+ # Norwegian idioms
16
+
17
+ 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.
18
+ There are 3455 Bokmål idioms and 88 Nynorsk idioms. In the future, we want to add more Nynorsk idioms.
19
+
20
+ ## Idiom completion as an NLP task
21
+
22
+
23
+ In `idiom_dataset.json` 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).
24
+
25
+ This dataset can be used to measure a generative language models' ability to complete well known idioms, or as a masked language modelling task.
26
+
27
+ It can be loaded as a Datasets dataset like this:
28
+ ```python
29
+ from datasets import Dataset
30
+ import pandas as pd
31
+
32
+ df = pd.read_json("idiom_dataset.json")
33
+ ds = Dataset.from_pandas(df)
34
+ ```
35
+ The dataset has the columns "idiom_start", "accepted_completions" and "language".
36
+ There are 3245 rows, 156 of which there are more than one accepted completion.
37
+
38
+
39
+ ## Idioms
40
+ `all_idioms_freq.json` contain all the idioms and their frequency in the online library as key,value pairs
41
+ `nno_idioms_freq.json` contain the Nynorsk idioms and their frequency in the online library as key,value pairs
42
+ `nob_idioms_freq.json` contain the Bokmål idioms and their frequency in the online library as key,value pairs
43
+
44
+
45
+ ## Idiom graphs
46
+ There is considerable linguistic overlap between the idioms. For example, though there are 3537 unique idioms, there are only 796 unique starter words.
47
+ 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 start node to a leaf node.
48
+ Example:
49
+ ```json
50
+ "alt": {
51
+ "er": {
52
+ "bare": {
53
+ "fryd": {
54
+ "og": {
55
+ "gammen": {}
56
+ }
57
+ }
58
+ },
59
+ "klappet": {
60
+ "og": {
61
+ "klart": {}
62
+ }
63
+ },
64
+ "såre": {
65
+ "vel": {}
66
+ }
67
+ },
68
+ "går": {
69
+ "sin": {
70
+ "vante": {
71
+ "gang": {}
72
+ }
73
+ }
74
+ },
75
+ ```
76
+ Here is a tree where "alt" is a 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.
77
+ These trees can be found at `all_idioms_sequence_graph.json`, `nno_idioms_sequence_graph.json` and `nob_idioms_sequence_graph.json`.
78
+
79
+ Flat versions of the trees (where consecutive nodes/words with only one child are merged into word sequences) can be found at `all_idioms_flat_sequence_graph.json`, `nno_idioms_flat_sequence_graph.json` and `nob_idioms_flat_sequence_graph.json`.
80
+ Example:
81
+ ```json
82
+ "alt": {
83
+ "er": {
84
+ "bare fryd og gammen": "",
85
+ "klappet og klart": "",
86
+ "såre vel": ""
87
+ },
88
+ "går sin vante gang": "",
89
+ ```