asahi417 commited on
Commit
c4a7c25
1 Parent(s): a88ae7e
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ cache
README.md ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license:
5
+ - other
6
+ multilinguality:
7
+ - monolingual
8
+ size_categories:
9
+ - 1K<n<10K
10
+ pretty_name: SemEval2012 task 2 Relational Similarity
11
+ ---
12
+ # Dataset Card for "relbert/semeval2012_relational_similarity_v3"
13
+ ## Dataset Description
14
+ - **Repository:** [RelBERT](https://github.com/asahi417/relbert)
15
+ - **Paper:** [https://aclanthology.org/S12-1047/](https://aclanthology.org/S12-1047/)
16
+ - **Dataset:** SemEval2012: Relational Similarity
17
+
18
+ ### Dataset Summary
19
+
20
+ ***IMPORTANT***: This is the same dataset as [relbert/semeval2012_relational_similarity](https://huggingface.co/datasets/relbert/semeval2012_relational_similarity),
21
+ but with a different dataset construction.
22
+
23
+ Relational similarity dataset from [SemEval2012 task 2](https://aclanthology.org/S12-1047/), compiled to fine-tune [RelBERT](https://github.com/asahi417/relbert) model.
24
+ The dataset contains a list of positive and negative word pair from 89 pre-defined relations.
25
+ The relation types are constructed on top of following 10 parent relation types.
26
+ ```shell
27
+ {
28
+ 1: "Class Inclusion", # Hypernym
29
+ 2: "Part-Whole", # Meronym, Substance Meronym
30
+ 3: "Similar", # Synonym, Co-hypornym
31
+ 4: "Contrast", # Antonym
32
+ 5: "Attribute", # Attribute, Event
33
+ 6: "Non Attribute",
34
+ 7: "Case Relation",
35
+ 8: "Cause-Purpose",
36
+ 9: "Space-Time",
37
+ 10: "Representation"
38
+ }
39
+ ```
40
+ Each of the parent relation is further grouped into child relation types where the definition can be found [here](https://drive.google.com/file/d/0BzcZKTSeYL8VenY0QkVpZVpxYnc/view?resourcekey=0-ZP-UARfJj39PcLroibHPHw).
41
+
42
+
43
+ ## Dataset Structure
44
+ ### Data Instances
45
+ An example of `train` looks as follows.
46
+ ```
47
+ {
48
+ 'relation_type': '8d',
49
+ 'positives': [ [ "breathe", "live" ], [ "study", "learn" ], [ "speak", "communicate" ], ... ]
50
+ 'negatives': [ [ "starving", "hungry" ], [ "clean", "bathe" ], [ "hungry", "starving" ], ... ]
51
+ }
52
+ ```
53
+
54
+ ### Data Splits
55
+ | name |train|validation|
56
+ |---------|----:|---------:|
57
+ |semeval2012_relational_similarity| 89 | 89|
58
+
59
+
60
+ ### Number of Positive/Negative Word-pairs in each Split
61
+
62
+ | relation_type | level | positive (train) | negative (train) | positive (validation) | negative (validation) |
63
+ |:----------------|:-------------------|-------------------:|-------------------:|------------------------:|------------------------:|
64
+ | 1 | parent | 110 | 680 | 129 | 760 |
65
+ | 10 | parent | 60 | 730 | 66 | 823 |
66
+ | 10a | child | 10 | 780 | 14 | 875 |
67
+ | 10a | child_prototypical | 1 | 18 | 1 | 22 |
68
+ | 10b | child | 10 | 780 | 13 | 876 |
69
+ | 10b | child_prototypical | 1 | 16 | 1 | 19 |
70
+ | 10c | child | 10 | 780 | 11 | 878 |
71
+ | 10c | child_prototypical | 1 | 19 | 1 | 20 |
72
+ | 10d | child_prototypical | 1 | 18 | 1 | 18 |
73
+ | 10d | child | 10 | 780 | 10 | 879 |
74
+ | 10e | child | 10 | 780 | 8 | 881 |
75
+ | 10e | child_prototypical | 1 | 14 | 1 | 12 |
76
+ | 10f | child | 10 | 780 | 10 | 879 |
77
+ | 10f | child_prototypical | 1 | 18 | 1 | 18 |
78
+ | 1a | child | 10 | 780 | 14 | 875 |
79
+ | 1a | child_prototypical | 1 | 16 | 1 | 20 |
80
+ | 1b | child | 10 | 780 | 14 | 875 |
81
+ | 1b | child_prototypical | 1 | 16 | 1 | 20 |
82
+ | 1c | child_prototypical | 1 | 19 | 1 | 20 |
83
+ | 1c | child | 10 | 780 | 11 | 878 |
84
+ | 1d | child | 10 | 780 | 16 | 873 |
85
+ | 1d | child_prototypical | 1 | 16 | 1 | 22 |
86
+ | 1e | child | 10 | 780 | 8 | 881 |
87
+ | 1e | child_prototypical | 1 | 13 | 1 | 11 |
88
+ | 2 | parent | 100 | 690 | 117 | 772 |
89
+ | 2a | child | 10 | 780 | 15 | 874 |
90
+ | 2a | child_prototypical | 1 | 18 | 1 | 23 |
91
+ | 2b | child_prototypical | 1 | 15 | 1 | 16 |
92
+ | 2b | child | 10 | 780 | 11 | 878 |
93
+ | 2c | child | 10 | 780 | 13 | 876 |
94
+ | 2c | child_prototypical | 1 | 17 | 1 | 20 |
95
+ | 2d | child | 10 | 780 | 10 | 879 |
96
+ | 2d | child_prototypical | 1 | 17 | 1 | 17 |
97
+ | 2e | child | 10 | 780 | 11 | 878 |
98
+ | 2e | child_prototypical | 1 | 18 | 1 | 19 |
99
+ | 2f | child | 10 | 780 | 11 | 878 |
100
+ | 2f | child_prototypical | 1 | 21 | 1 | 22 |
101
+ | 2g | child | 10 | 780 | 16 | 873 |
102
+ | 2g | child_prototypical | 1 | 15 | 1 | 21 |
103
+ | 2h | child_prototypical | 1 | 18 | 1 | 19 |
104
+ | 2h | child | 10 | 780 | 11 | 878 |
105
+ | 2i | child | 10 | 780 | 9 | 880 |
106
+ | 2i | child_prototypical | 1 | 19 | 1 | 18 |
107
+ | 2j | child | 10 | 780 | 10 | 879 |
108
+ | 2j | child_prototypical | 1 | 20 | 1 | 20 |
109
+ | 3 | parent | 80 | 710 | 80 | 809 |
110
+ | 3a | child | 10 | 780 | 11 | 878 |
111
+ | 3a | child_prototypical | 1 | 18 | 1 | 19 |
112
+ | 3b | child | 10 | 780 | 11 | 878 |
113
+ | 3b | child_prototypical | 1 | 21 | 1 | 22 |
114
+ | 3c | child_prototypical | 1 | 17 | 1 | 19 |
115
+ | 3c | child | 10 | 780 | 12 | 877 |
116
+ | 3d | child | 10 | 780 | 14 | 875 |
117
+ | 3d | child_prototypical | 1 | 17 | 1 | 21 |
118
+ | 3e | child | 10 | 780 | 5 | 884 |
119
+ | 3e | child_prototypical | 1 | 21 | 1 | 16 |
120
+ | 3f | child | 10 | 780 | 11 | 878 |
121
+ | 3f | child_prototypical | 1 | 22 | 1 | 23 |
122
+ | 3g | child | 10 | 780 | 6 | 883 |
123
+ | 3g | child_prototypical | 1 | 20 | 1 | 16 |
124
+ | 3h | child_prototypical | 1 | 20 | 1 | 20 |
125
+ | 3h | child | 10 | 780 | 10 | 879 |
126
+ | 4 | parent | 80 | 710 | 82 | 807 |
127
+ | 4a | child | 10 | 780 | 11 | 878 |
128
+ | 4a | child_prototypical | 1 | 21 | 1 | 22 |
129
+ | 4b | child | 10 | 780 | 7 | 882 |
130
+ | 4b | child_prototypical | 1 | 16 | 1 | 13 |
131
+ | 4c | child | 10 | 780 | 12 | 877 |
132
+ | 4c | child_prototypical | 1 | 19 | 1 | 21 |
133
+ | 4d | child_prototypical | 1 | 15 | 1 | 9 |
134
+ | 4d | child | 10 | 780 | 4 | 885 |
135
+ | 4e | child | 10 | 780 | 12 | 877 |
136
+ | 4e | child_prototypical | 1 | 21 | 1 | 23 |
137
+ | 4f | child | 10 | 780 | 9 | 880 |
138
+ | 4f | child_prototypical | 1 | 21 | 1 | 20 |
139
+ | 4g | child | 10 | 780 | 15 | 874 |
140
+ | 4g | child_prototypical | 1 | 17 | 1 | 22 |
141
+ | 4h | child_prototypical | 1 | 20 | 1 | 22 |
142
+ | 4h | child | 10 | 780 | 12 | 877 |
143
+ | 5 | parent | 90 | 700 | 105 | 784 |
144
+ | 5a | child | 10 | 780 | 14 | 875 |
145
+ | 5a | child_prototypical | 1 | 17 | 1 | 21 |
146
+ | 5b | child_prototypical | 1 | 20 | 1 | 18 |
147
+ | 5b | child | 10 | 780 | 8 | 881 |
148
+ | 5c | child | 10 | 780 | 11 | 878 |
149
+ | 5c | child_prototypical | 1 | 18 | 1 | 19 |
150
+ | 5d | child | 10 | 780 | 15 | 874 |
151
+ | 5d | child_prototypical | 1 | 16 | 1 | 21 |
152
+ | 5e | child | 10 | 780 | 8 | 881 |
153
+ | 5e | child_prototypical | 1 | 20 | 1 | 18 |
154
+ | 5f | child | 10 | 780 | 11 | 878 |
155
+ | 5f | child_prototypical | 1 | 20 | 1 | 21 |
156
+ | 5g | child_prototypical | 1 | 21 | 1 | 20 |
157
+ | 5g | child | 10 | 780 | 9 | 880 |
158
+ | 5h | child | 10 | 780 | 15 | 874 |
159
+ | 5h | child_prototypical | 1 | 19 | 1 | 24 |
160
+ | 5i | child | 10 | 780 | 14 | 875 |
161
+ | 5i | child_prototypical | 1 | 19 | 1 | 23 |
162
+ | 6 | parent | 80 | 710 | 99 | 790 |
163
+ | 6a | child | 10 | 780 | 15 | 874 |
164
+ | 6a | child_prototypical | 1 | 17 | 1 | 22 |
165
+ | 6b | child_prototypical | 1 | 20 | 1 | 21 |
166
+ | 6b | child | 10 | 780 | 11 | 878 |
167
+ | 6c | child_prototypical | 1 | 20 | 1 | 23 |
168
+ | 6c | child | 10 | 780 | 13 | 876 |
169
+ | 6d | child | 10 | 780 | 10 | 879 |
170
+ | 6d | child_prototypical | 1 | 23 | 1 | 23 |
171
+ | 6e | child | 10 | 780 | 11 | 878 |
172
+ | 6e | child_prototypical | 1 | 20 | 1 | 21 |
173
+ | 6f | child | 10 | 780 | 12 | 877 |
174
+ | 6f | child_prototypical | 1 | 18 | 1 | 20 |
175
+ | 6g | child | 10 | 780 | 12 | 877 |
176
+ | 6g | child_prototypical | 1 | 17 | 1 | 19 |
177
+ | 6h | child_prototypical | 1 | 18 | 1 | 23 |
178
+ | 6h | child | 10 | 780 | 15 | 874 |
179
+ | 7 | parent | 80 | 710 | 91 | 798 |
180
+ | 7a | child | 10 | 780 | 14 | 875 |
181
+ | 7a | child_prototypical | 1 | 19 | 1 | 23 |
182
+ | 7b | child | 10 | 780 | 7 | 882 |
183
+ | 7b | child_prototypical | 1 | 15 | 1 | 12 |
184
+ | 7c | child | 10 | 780 | 11 | 878 |
185
+ | 7c | child_prototypical | 1 | 16 | 1 | 17 |
186
+ | 7d | child_prototypical | 1 | 19 | 1 | 23 |
187
+ | 7d | child | 10 | 780 | 14 | 875 |
188
+ | 7e | child_prototypical | 1 | 16 | 1 | 16 |
189
+ | 7e | child | 10 | 780 | 10 | 879 |
190
+ | 7f | child | 10 | 780 | 12 | 877 |
191
+ | 7f | child_prototypical | 1 | 15 | 1 | 17 |
192
+ | 7g | child | 10 | 780 | 9 | 880 |
193
+ | 7g | child_prototypical | 1 | 13 | 1 | 12 |
194
+ | 7h | child | 10 | 780 | 14 | 875 |
195
+ | 7h | child_prototypical | 1 | 14 | 1 | 18 |
196
+ | 8 | parent | 80 | 710 | 90 | 799 |
197
+ | 8a | child | 10 | 780 | 14 | 875 |
198
+ | 8a | child_prototypical | 1 | 16 | 1 | 20 |
199
+ | 8b | child_prototypical | 1 | 20 | 1 | 17 |
200
+ | 8b | child | 10 | 780 | 7 | 882 |
201
+ | 8c | child | 10 | 780 | 12 | 877 |
202
+ | 8c | child_prototypical | 1 | 15 | 1 | 17 |
203
+ | 8d | child | 10 | 780 | 13 | 876 |
204
+ | 8d | child_prototypical | 1 | 15 | 1 | 18 |
205
+ | 8e | child | 10 | 780 | 11 | 878 |
206
+ | 8e | child_prototypical | 1 | 15 | 1 | 16 |
207
+ | 8f | child | 10 | 780 | 12 | 877 |
208
+ | 8f | child_prototypical | 1 | 16 | 1 | 18 |
209
+ | 8g | child_prototypical | 1 | 12 | 1 | 9 |
210
+ | 8g | child | 10 | 780 | 7 | 882 |
211
+ | 8h | child | 10 | 780 | 14 | 875 |
212
+ | 8h | child_prototypical | 1 | 17 | 1 | 21 |
213
+ | 9 | parent | 90 | 700 | 96 | 793 |
214
+ | 9a | child | 10 | 780 | 14 | 875 |
215
+ | 9a | child_prototypical | 1 | 14 | 1 | 18 |
216
+ | 9b | child | 10 | 780 | 12 | 877 |
217
+ | 9b | child_prototypical | 1 | 18 | 1 | 20 |
218
+ | 9c | child | 10 | 780 | 7 | 882 |
219
+ | 9c | child_prototypical | 1 | 9 | 1 | 6 |
220
+ | 9d | child_prototypical | 1 | 22 | 1 | 21 |
221
+ | 9d | child | 10 | 780 | 9 | 880 |
222
+ | 9e | child | 10 | 780 | 8 | 881 |
223
+ | 9e | child_prototypical | 1 | 23 | 1 | 21 |
224
+ | 9f | child | 10 | 780 | 10 | 879 |
225
+ | 9f | child_prototypical | 1 | 18 | 1 | 18 |
226
+ | 9g | child | 10 | 780 | 14 | 875 |
227
+ | 9g | child_prototypical | 1 | 15 | 1 | 19 |
228
+ | 9h | child | 10 | 780 | 13 | 876 |
229
+ | 9h | child_prototypical | 1 | 18 | 1 | 21 |
230
+ | 9i | child | 10 | 780 | 9 | 880 |
231
+ | 9i | child_prototypical | 1 | 18 | 1 | 17 |
232
+
233
+ ### Citation Information
234
+ ```
235
+ @inproceedings{jurgens-etal-2012-semeval,
236
+ title = "{S}em{E}val-2012 Task 2: Measuring Degrees of Relational Similarity",
237
+ author = "Jurgens, David and
238
+ Mohammad, Saif and
239
+ Turney, Peter and
240
+ Holyoak, Keith",
241
+ booktitle = "*{SEM} 2012: The First Joint Conference on Lexical and Computational Semantics {--} Volume 1: Proceedings of the main conference and the shared task, and Volume 2: Proceedings of the Sixth International Workshop on Semantic Evaluation ({S}em{E}val 2012)",
242
+ month = "7-8 " # jun,
243
+ year = "2012",
244
+ address = "Montr{\'e}al, Canada",
245
+ publisher = "Association for Computational Linguistics",
246
+ url = "https://aclanthology.org/S12-1047",
247
+ pages = "356--364",
248
+ }
249
+ ```
dataset/train.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/valid.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
get_stats.py ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ from datasets import load_dataset
3
+
4
+ data = load_dataset('relbert/semeval2012_relational_similarity_v3')
5
+ stats = []
6
+ for k in data.keys():
7
+ for i in data[k]:
8
+ stats.append(
9
+ {
10
+ 'relation_type': i['relation_type'],
11
+ 'split': k,
12
+ 'positives': len(i['positives']),
13
+ 'negatives': len(i['negatives']),
14
+ 'level': i['level']
15
+ })
16
+ df = pd.DataFrame(stats)
17
+ df_train = df[df['split'] == 'train']
18
+ df_valid = df[df['split'] == 'validation']
19
+ stats = []
20
+ for (relation_type, level), r in df.groupby(['relation_type', 'level']):
21
+ _df_t = r[r['split'] == 'train']
22
+ _df_v = r[r['split'] == 'validation']
23
+ stats.append({
24
+ 'relation_type': relation_type,
25
+ 'level': level,
26
+ 'positive (train)': 0 if len(_df_t) == 0 else _df_t['positives'].values[0],
27
+ 'negative (train)': 0 if len(_df_t) == 0 else _df_t['negatives'].values[0],
28
+ 'positive (validation)': 0 if len(_df_v) == 0 else _df_v['positives'].values[0],
29
+ 'negative (validation)': 0 if len(_df_v) == 0 else _df_v['negatives'].values[0],
30
+ })
31
+
32
+ df = pd.DataFrame(stats).sort_values(by=['relation_type'])
33
+ df.index = df.pop('relation_type')
34
+ # sum_pairs = df.sum(0)
35
+ # df = df.T
36
+ # df['SUM'] = sum_pairs
37
+ # df = df.T
38
+
39
+ df.to_csv('stats.csv')
40
+ with open('stats.md', 'w') as f:
41
+ f.write(df.to_markdown())
42
+
43
+
44
+
process.py ADDED
@@ -0,0 +1,187 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import os
3
+ import tarfile
4
+ import zipfile
5
+ import gzip
6
+ import requests
7
+
8
+ from glob import glob
9
+ import gdown
10
+ from random import seed, shuffle
11
+
12
+
13
+ validation_ratio = 0.2
14
+ k = 10 # the 3rd level negative-distance ranking
15
+ m = 5 # the 3rd level negative-distance ranking
16
+ top_n = 10 # threshold of positive pairs in the 1st and 2nd relation
17
+ seed(42)
18
+
19
+
20
+ def wget(url, cache_dir: str = './cache', gdrive_filename: str = None):
21
+ """ wget and uncompress data_iterator """
22
+ os.makedirs(cache_dir, exist_ok=True)
23
+ if url.startswith('https://drive.google.com'):
24
+ assert gdrive_filename is not None, 'please provide fileaname for gdrive download'
25
+ gdown.download(url, f'{cache_dir}/{gdrive_filename}', quiet=False)
26
+ filename = gdrive_filename
27
+ else:
28
+ filename = os.path.basename(url)
29
+ with open(f'{cache_dir}/{filename}', "wb") as f:
30
+ r = requests.get(url)
31
+ f.write(r.content)
32
+ path = f'{cache_dir}/{filename}'
33
+
34
+ if path.endswith('.tar.gz') or path.endswith('.tgz') or path.endswith('.tar'):
35
+ if path.endswith('.tar'):
36
+ tar = tarfile.open(path)
37
+ else:
38
+ tar = tarfile.open(path, "r:gz")
39
+ tar.extractall(cache_dir)
40
+ tar.close()
41
+ os.remove(path)
42
+ elif path.endswith('.zip'):
43
+ with zipfile.ZipFile(path, 'r') as zip_ref:
44
+ zip_ref.extractall(cache_dir)
45
+ os.remove(path)
46
+ elif path.endswith('.gz'):
47
+ with gzip.open(path, 'rb') as f:
48
+ with open(path.replace('.gz', ''), 'wb') as f_write:
49
+ f_write.write(f.read())
50
+ os.remove(path)
51
+
52
+
53
+ def get_training_data():
54
+ """ Get RelBERT training data
55
+
56
+ Returns
57
+ -------
58
+ pairs: dictionary of list (positive pairs, negative pairs)
59
+ {'1b': [[0.6, ('office', 'desk'), ..], [[-0.1, ('aaa', 'bbb'), ...]]
60
+ """
61
+ cache_dir = 'cache'
62
+ os.makedirs(cache_dir, exist_ok=True)
63
+ remove_relation = None
64
+ path_answer = f'{cache_dir}/Phase2Answers'
65
+ path_scale = f'{cache_dir}/Phase2AnswersScaled'
66
+ url = 'https://drive.google.com/u/0/uc?id=0BzcZKTSeYL8VYWtHVmxUR3FyUmc&export=download'
67
+ filename = 'SemEval-2012-Platinum-Ratings.tar.gz'
68
+ if not (os.path.exists(path_scale) and os.path.exists(path_answer)):
69
+ wget(url, gdrive_filename=filename, cache_dir=cache_dir)
70
+ files_answer = [os.path.basename(i) for i in glob(f'{path_answer}/*.txt')]
71
+ files_scale = [os.path.basename(i) for i in glob(f'{path_scale}/*.txt')]
72
+ assert files_answer == files_scale, f'files are not matched: {files_scale} vs {files_answer}'
73
+ positives = {}
74
+ negatives = {}
75
+ positives_limit = {}
76
+ all_relation_type = {}
77
+ # score_range = [90.0, 88.7] # the absolute value of max/min prototypicality rating
78
+ for i in files_scale:
79
+ relation_id = i.split('-')[-1].replace('.txt', '')
80
+ if remove_relation and int(relation_id[:-1]) in remove_relation:
81
+ continue
82
+ with open(f'{path_answer}/{i}', 'r') as f:
83
+ lines_answer = [_l.replace('"', '').split('\t') for _l in f.read().split('\n')
84
+ if not _l.startswith('#') and len(_l)]
85
+ relation_type = list(set(list(zip(*lines_answer))[-1]))
86
+ assert len(relation_type) == 1, relation_type
87
+ relation_type = relation_type[0]
88
+ with open(f'{path_scale}/{i}', 'r') as f:
89
+ # list of tuple [score, ("a", "b")]
90
+ scales = [[float(_l[:5]), _l[6:].replace('"', '')] for _l in f.read().split('\n')
91
+ if not _l.startswith('#') and len(_l)]
92
+ scales = sorted(scales, key=lambda _x: _x[0])
93
+ # positive pairs are in the reverse order of prototypicality score
94
+ positive_pairs = [[s, tuple(p.split(':'))] for s, p in filter(lambda _x: _x[0] > 0, scales)]
95
+ positive_pairs = sorted(positive_pairs, key=lambda x: x[0], reverse=True)
96
+ positives[relation_id] = list(list(zip(*positive_pairs))[1])
97
+ positives_limit[relation_id] = list(list(zip(*positive_pairs[:min(top_n, len(positive_pairs))]))[1])
98
+ negatives[relation_id] = [tuple(p.split(':')) for s, p in filter(lambda _x: _x[0] < 0, scales)]
99
+ all_relation_type[relation_id] = relation_type
100
+ parent = list(set([i[:-1] for i in all_relation_type.keys()]))
101
+
102
+ # 1st level relation contrast (among parent relations)
103
+ relation_pairs_1st = []
104
+ relation_pairs_1st_validation = []
105
+ for p in parent:
106
+ child_positive = list(filter(lambda x: x.startswith(p), list(all_relation_type.keys())))
107
+ child_negative = list(filter(lambda x: not x.startswith(p), list(all_relation_type.keys())))
108
+ positive_pairs = []
109
+ negative_pairs = []
110
+ for c in child_positive:
111
+ positive_pairs += positives_limit[c]
112
+ for c in child_negative:
113
+ negative_pairs += positives_limit[c]
114
+
115
+ shuffle(positive_pairs)
116
+ positive_pairs_val = positive_pairs[:int(len(positive_pairs) * validation_ratio)]
117
+ positive_pairs_tra = positive_pairs[int(len(positive_pairs) * validation_ratio):]
118
+
119
+ shuffle(negative_pairs)
120
+ negative_pairs_val = positive_pairs[:int(len(negative_pairs) * validation_ratio)]
121
+ negative_pairs_tra = positive_pairs[int(len(negative_pairs) * validation_ratio):]
122
+
123
+ relation_pairs_1st += [{
124
+ "positives": positive_pairs_tra, "negatives": negative_pairs_tra, "relation_type": p, "level": "parent"
125
+ }]
126
+ relation_pairs_1st_validation += [{
127
+ "positives": positive_pairs_val, "negatives": negative_pairs_val, "relation_type": p, "level": "parent"
128
+ }]
129
+
130
+ # 2nd level relation contrast (among child relations) & 3rd level relation contrast (within child relations)
131
+ relation_pairs_2nd = []
132
+ relation_pairs_2nd_validation = []
133
+ for p in all_relation_type.keys():
134
+ positive_pairs = positives_limit[p]
135
+ negative_pairs = []
136
+ for n in all_relation_type.keys():
137
+ if p == n:
138
+ continue
139
+ negative_pairs += positives[n]
140
+
141
+ shuffle(positive_pairs)
142
+ positive_pairs_val = positive_pairs[:int(len(positive_pairs) * validation_ratio)]
143
+ positive_pairs_tra = positive_pairs[int(len(positive_pairs) * validation_ratio):]
144
+
145
+ shuffle(negative_pairs)
146
+ negative_pairs_val = positive_pairs[:int(len(negative_pairs) * validation_ratio)]
147
+ negative_pairs_tra = positive_pairs[int(len(negative_pairs) * validation_ratio):]
148
+
149
+ relation_pairs_2nd += [{
150
+ "positives": positive_pairs_tra, "negatives": negative_pairs_tra, "relation_type": p, "level": "child"
151
+ }]
152
+ relation_pairs_2nd_validation += [{
153
+ "positives": positive_pairs_val, "negatives": negative_pairs_val, "relation_type": p, "level": "child"
154
+ }]
155
+
156
+ relation_pairs_3rd = []
157
+ for p in all_relation_type.keys():
158
+ positive_pairs = positives[p]
159
+ negative_pairs = positive_pairs + negatives[p]
160
+ for n, anchor in enumerate(positive_pairs):
161
+ if n > m:
162
+ continue
163
+ for _n, posi in enumerate(positive_pairs):
164
+ if n < _n and len(negative_pairs) > _n + k:
165
+ relation_pairs_3rd += [{
166
+ "positives": [(anchor, posi)],
167
+ "negatives": [(anchor, neg) for neg in negative_pairs[_n+k:]],
168
+ "relation_type": p,
169
+ "level": "child_prototypical"
170
+ }]
171
+ shuffle(relation_pairs_3rd)
172
+ relation_pairs_3rd_validation = relation_pairs_3rd[:int(len(relation_pairs_3rd)*validation_ratio)]
173
+ relation_pairs_3rd = relation_pairs_3rd[int(len(relation_pairs_3rd) * validation_ratio):]
174
+
175
+ train = relation_pairs_1st + relation_pairs_2nd + relation_pairs_3rd
176
+ validation = relation_pairs_1st_validation + relation_pairs_2nd_validation + relation_pairs_3rd_validation
177
+ return train, validation
178
+
179
+
180
+ if __name__ == '__main__':
181
+ data_train, data_validation = get_training_data()
182
+ print(f"- training data : {len(data_train)}")
183
+ print(f"- validation data : {len(data_validation)}")
184
+ with open('dataset/train.jsonl', 'w') as f_writer:
185
+ f_writer.write('\n'.join([json.dumps(i) for i in data_train]))
186
+ with open('dataset/valid.jsonl', 'w') as f_writer:
187
+ f_writer.write('\n'.join([json.dumps(i) for i in data_validation]))
semeval2012_relational_similarity_v3.py ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import datasets
3
+
4
+
5
+ logger = datasets.logging.get_logger(__name__)
6
+ _DESCRIPTION = """[SemEVAL 2012 task 2: Relational Similarity](https://aclanthology.org/S12-1047/)"""
7
+ _NAME = "semeval2012_relational_similarity_v3"
8
+ _VERSION = "1.1.0"
9
+ _CITATION = """
10
+ @inproceedings{jurgens-etal-2012-semeval,
11
+ title = "{S}em{E}val-2012 Task 2: Measuring Degrees of Relational Similarity",
12
+ author = "Jurgens, David and
13
+ Mohammad, Saif and
14
+ Turney, Peter and
15
+ Holyoak, Keith",
16
+ booktitle = "*{SEM} 2012: The First Joint Conference on Lexical and Computational Semantics {--} Volume 1: Proceedings of the main conference and the shared task, and Volume 2: Proceedings of the Sixth International Workshop on Semantic Evaluation ({S}em{E}val 2012)",
17
+ month = "7-8 " # jun,
18
+ year = "2012",
19
+ address = "Montr{\'e}al, Canada",
20
+ publisher = "Association for Computational Linguistics",
21
+ url = "https://aclanthology.org/S12-1047",
22
+ pages = "356--364",
23
+ }
24
+ """
25
+
26
+ _HOME_PAGE = "https://github.com/asahi417/relbert"
27
+ _URL = f'https://huggingface.co/datasets/relbert/{_NAME}/raw/main/dataset'
28
+ _URLS = {
29
+ str(datasets.Split.TRAIN): [f'{_URL}/train.jsonl'],
30
+ str(datasets.Split.VALIDATION): [f'{_URL}/valid.jsonl'],
31
+ }
32
+
33
+
34
+ class SemEVAL2012RelationalSimilarityV3Config(datasets.BuilderConfig):
35
+ """BuilderConfig"""
36
+
37
+ def __init__(self, **kwargs):
38
+ """BuilderConfig.
39
+ Args:
40
+ **kwargs: keyword arguments forwarded to super.
41
+ """
42
+ super(SemEVAL2012RelationalSimilarityV3Config, self).__init__(**kwargs)
43
+
44
+
45
+ class SemEVAL2012RelationalSimilarityV3(datasets.GeneratorBasedBuilder):
46
+ """Dataset."""
47
+
48
+ BUILDER_CONFIGS = [
49
+ SemEVAL2012RelationalSimilarityV3Config(
50
+ name=_NAME, version=datasets.Version(_VERSION), description=_DESCRIPTION
51
+ ),
52
+ ]
53
+
54
+ def _split_generators(self, dl_manager):
55
+ downloaded_file = dl_manager.download_and_extract(_URLS)
56
+ return [datasets.SplitGenerator(name=i, gen_kwargs={"filepaths": downloaded_file[str(i)]})
57
+ for i in [datasets.Split.TRAIN, datasets.Split.VALIDATION]]
58
+
59
+ def _generate_examples(self, filepaths):
60
+ _key = 0
61
+ for filepath in filepaths:
62
+ logger.info(f"generating examples from = {filepath}")
63
+ with open(filepath, encoding="utf-8") as f:
64
+ _list = [i for i in f.read().split('\n') if len(i) > 0]
65
+ for i in _list:
66
+ data = json.loads(i)
67
+ yield _key, data
68
+ _key += 1
69
+
70
+ def _info(self):
71
+ return datasets.DatasetInfo(
72
+ description=_DESCRIPTION,
73
+ features=datasets.Features(
74
+ {
75
+ "level": datasets.Value("string"),
76
+ "relation_type": datasets.Value("string"),
77
+ "positives": datasets.Sequence(datasets.Sequence(datasets.Value("string"))),
78
+ "negatives": datasets.Sequence(datasets.Sequence(datasets.Value("string"))),
79
+ }
80
+ ),
81
+ supervised_keys=None,
82
+ homepage=_HOME_PAGE,
83
+ citation=_CITATION,
84
+ )
stats.csv ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ relation_type,level,positive (train),negative (train),positive (validation),negative (validation)
2
+ 1,parent,110,680,129,760
3
+ 10,parent,60,730,66,823
4
+ 10a,child,10,780,14,875
5
+ 10a,child_prototypical,1,18,1,22
6
+ 10b,child,10,780,13,876
7
+ 10b,child_prototypical,1,16,1,19
8
+ 10c,child,10,780,11,878
9
+ 10c,child_prototypical,1,19,1,20
10
+ 10d,child_prototypical,1,18,1,18
11
+ 10d,child,10,780,10,879
12
+ 10e,child,10,780,8,881
13
+ 10e,child_prototypical,1,14,1,12
14
+ 10f,child,10,780,10,879
15
+ 10f,child_prototypical,1,18,1,18
16
+ 1a,child,10,780,14,875
17
+ 1a,child_prototypical,1,16,1,20
18
+ 1b,child,10,780,14,875
19
+ 1b,child_prototypical,1,16,1,20
20
+ 1c,child_prototypical,1,19,1,20
21
+ 1c,child,10,780,11,878
22
+ 1d,child,10,780,16,873
23
+ 1d,child_prototypical,1,16,1,22
24
+ 1e,child,10,780,8,881
25
+ 1e,child_prototypical,1,13,1,11
26
+ 2,parent,100,690,117,772
27
+ 2a,child,10,780,15,874
28
+ 2a,child_prototypical,1,18,1,23
29
+ 2b,child_prototypical,1,15,1,16
30
+ 2b,child,10,780,11,878
31
+ 2c,child,10,780,13,876
32
+ 2c,child_prototypical,1,17,1,20
33
+ 2d,child,10,780,10,879
34
+ 2d,child_prototypical,1,17,1,17
35
+ 2e,child,10,780,11,878
36
+ 2e,child_prototypical,1,18,1,19
37
+ 2f,child,10,780,11,878
38
+ 2f,child_prototypical,1,21,1,22
39
+ 2g,child,10,780,16,873
40
+ 2g,child_prototypical,1,15,1,21
41
+ 2h,child_prototypical,1,18,1,19
42
+ 2h,child,10,780,11,878
43
+ 2i,child,10,780,9,880
44
+ 2i,child_prototypical,1,19,1,18
45
+ 2j,child,10,780,10,879
46
+ 2j,child_prototypical,1,20,1,20
47
+ 3,parent,80,710,80,809
48
+ 3a,child,10,780,11,878
49
+ 3a,child_prototypical,1,18,1,19
50
+ 3b,child,10,780,11,878
51
+ 3b,child_prototypical,1,21,1,22
52
+ 3c,child_prototypical,1,17,1,19
53
+ 3c,child,10,780,12,877
54
+ 3d,child,10,780,14,875
55
+ 3d,child_prototypical,1,17,1,21
56
+ 3e,child,10,780,5,884
57
+ 3e,child_prototypical,1,21,1,16
58
+ 3f,child,10,780,11,878
59
+ 3f,child_prototypical,1,22,1,23
60
+ 3g,child,10,780,6,883
61
+ 3g,child_prototypical,1,20,1,16
62
+ 3h,child_prototypical,1,20,1,20
63
+ 3h,child,10,780,10,879
64
+ 4,parent,80,710,82,807
65
+ 4a,child,10,780,11,878
66
+ 4a,child_prototypical,1,21,1,22
67
+ 4b,child,10,780,7,882
68
+ 4b,child_prototypical,1,16,1,13
69
+ 4c,child,10,780,12,877
70
+ 4c,child_prototypical,1,19,1,21
71
+ 4d,child_prototypical,1,15,1,9
72
+ 4d,child,10,780,4,885
73
+ 4e,child,10,780,12,877
74
+ 4e,child_prototypical,1,21,1,23
75
+ 4f,child,10,780,9,880
76
+ 4f,child_prototypical,1,21,1,20
77
+ 4g,child,10,780,15,874
78
+ 4g,child_prototypical,1,17,1,22
79
+ 4h,child_prototypical,1,20,1,22
80
+ 4h,child,10,780,12,877
81
+ 5,parent,90,700,105,784
82
+ 5a,child,10,780,14,875
83
+ 5a,child_prototypical,1,17,1,21
84
+ 5b,child_prototypical,1,20,1,18
85
+ 5b,child,10,780,8,881
86
+ 5c,child,10,780,11,878
87
+ 5c,child_prototypical,1,18,1,19
88
+ 5d,child,10,780,15,874
89
+ 5d,child_prototypical,1,16,1,21
90
+ 5e,child,10,780,8,881
91
+ 5e,child_prototypical,1,20,1,18
92
+ 5f,child,10,780,11,878
93
+ 5f,child_prototypical,1,20,1,21
94
+ 5g,child_prototypical,1,21,1,20
95
+ 5g,child,10,780,9,880
96
+ 5h,child,10,780,15,874
97
+ 5h,child_prototypical,1,19,1,24
98
+ 5i,child,10,780,14,875
99
+ 5i,child_prototypical,1,19,1,23
100
+ 6,parent,80,710,99,790
101
+ 6a,child,10,780,15,874
102
+ 6a,child_prototypical,1,17,1,22
103
+ 6b,child_prototypical,1,20,1,21
104
+ 6b,child,10,780,11,878
105
+ 6c,child_prototypical,1,20,1,23
106
+ 6c,child,10,780,13,876
107
+ 6d,child,10,780,10,879
108
+ 6d,child_prototypical,1,23,1,23
109
+ 6e,child,10,780,11,878
110
+ 6e,child_prototypical,1,20,1,21
111
+ 6f,child,10,780,12,877
112
+ 6f,child_prototypical,1,18,1,20
113
+ 6g,child,10,780,12,877
114
+ 6g,child_prototypical,1,17,1,19
115
+ 6h,child_prototypical,1,18,1,23
116
+ 6h,child,10,780,15,874
117
+ 7,parent,80,710,91,798
118
+ 7a,child,10,780,14,875
119
+ 7a,child_prototypical,1,19,1,23
120
+ 7b,child,10,780,7,882
121
+ 7b,child_prototypical,1,15,1,12
122
+ 7c,child,10,780,11,878
123
+ 7c,child_prototypical,1,16,1,17
124
+ 7d,child_prototypical,1,19,1,23
125
+ 7d,child,10,780,14,875
126
+ 7e,child_prototypical,1,16,1,16
127
+ 7e,child,10,780,10,879
128
+ 7f,child,10,780,12,877
129
+ 7f,child_prototypical,1,15,1,17
130
+ 7g,child,10,780,9,880
131
+ 7g,child_prototypical,1,13,1,12
132
+ 7h,child,10,780,14,875
133
+ 7h,child_prototypical,1,14,1,18
134
+ 8,parent,80,710,90,799
135
+ 8a,child,10,780,14,875
136
+ 8a,child_prototypical,1,16,1,20
137
+ 8b,child_prototypical,1,20,1,17
138
+ 8b,child,10,780,7,882
139
+ 8c,child,10,780,12,877
140
+ 8c,child_prototypical,1,15,1,17
141
+ 8d,child,10,780,13,876
142
+ 8d,child_prototypical,1,15,1,18
143
+ 8e,child,10,780,11,878
144
+ 8e,child_prototypical,1,15,1,16
145
+ 8f,child,10,780,12,877
146
+ 8f,child_prototypical,1,16,1,18
147
+ 8g,child_prototypical,1,12,1,9
148
+ 8g,child,10,780,7,882
149
+ 8h,child,10,780,14,875
150
+ 8h,child_prototypical,1,17,1,21
151
+ 9,parent,90,700,96,793
152
+ 9a,child,10,780,14,875
153
+ 9a,child_prototypical,1,14,1,18
154
+ 9b,child,10,780,12,877
155
+ 9b,child_prototypical,1,18,1,20
156
+ 9c,child,10,780,7,882
157
+ 9c,child_prototypical,1,9,1,6
158
+ 9d,child_prototypical,1,22,1,21
159
+ 9d,child,10,780,9,880
160
+ 9e,child,10,780,8,881
161
+ 9e,child_prototypical,1,23,1,21
162
+ 9f,child,10,780,10,879
163
+ 9f,child_prototypical,1,18,1,18
164
+ 9g,child,10,780,14,875
165
+ 9g,child_prototypical,1,15,1,19
166
+ 9h,child,10,780,13,876
167
+ 9h,child_prototypical,1,18,1,21
168
+ 9i,child,10,780,9,880
169
+ 9i,child_prototypical,1,18,1,17
stats.md ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ | relation_type | level | positive (train) | negative (train) | positive (validation) | negative (validation) |
2
+ |:----------------|:-------------------|-------------------:|-------------------:|------------------------:|------------------------:|
3
+ | 1 | parent | 110 | 680 | 129 | 760 |
4
+ | 10 | parent | 60 | 730 | 66 | 823 |
5
+ | 10a | child | 10 | 780 | 14 | 875 |
6
+ | 10a | child_prototypical | 1 | 18 | 1 | 22 |
7
+ | 10b | child | 10 | 780 | 13 | 876 |
8
+ | 10b | child_prototypical | 1 | 16 | 1 | 19 |
9
+ | 10c | child | 10 | 780 | 11 | 878 |
10
+ | 10c | child_prototypical | 1 | 19 | 1 | 20 |
11
+ | 10d | child_prototypical | 1 | 18 | 1 | 18 |
12
+ | 10d | child | 10 | 780 | 10 | 879 |
13
+ | 10e | child | 10 | 780 | 8 | 881 |
14
+ | 10e | child_prototypical | 1 | 14 | 1 | 12 |
15
+ | 10f | child | 10 | 780 | 10 | 879 |
16
+ | 10f | child_prototypical | 1 | 18 | 1 | 18 |
17
+ | 1a | child | 10 | 780 | 14 | 875 |
18
+ | 1a | child_prototypical | 1 | 16 | 1 | 20 |
19
+ | 1b | child | 10 | 780 | 14 | 875 |
20
+ | 1b | child_prototypical | 1 | 16 | 1 | 20 |
21
+ | 1c | child_prototypical | 1 | 19 | 1 | 20 |
22
+ | 1c | child | 10 | 780 | 11 | 878 |
23
+ | 1d | child | 10 | 780 | 16 | 873 |
24
+ | 1d | child_prototypical | 1 | 16 | 1 | 22 |
25
+ | 1e | child | 10 | 780 | 8 | 881 |
26
+ | 1e | child_prototypical | 1 | 13 | 1 | 11 |
27
+ | 2 | parent | 100 | 690 | 117 | 772 |
28
+ | 2a | child | 10 | 780 | 15 | 874 |
29
+ | 2a | child_prototypical | 1 | 18 | 1 | 23 |
30
+ | 2b | child_prototypical | 1 | 15 | 1 | 16 |
31
+ | 2b | child | 10 | 780 | 11 | 878 |
32
+ | 2c | child | 10 | 780 | 13 | 876 |
33
+ | 2c | child_prototypical | 1 | 17 | 1 | 20 |
34
+ | 2d | child | 10 | 780 | 10 | 879 |
35
+ | 2d | child_prototypical | 1 | 17 | 1 | 17 |
36
+ | 2e | child | 10 | 780 | 11 | 878 |
37
+ | 2e | child_prototypical | 1 | 18 | 1 | 19 |
38
+ | 2f | child | 10 | 780 | 11 | 878 |
39
+ | 2f | child_prototypical | 1 | 21 | 1 | 22 |
40
+ | 2g | child | 10 | 780 | 16 | 873 |
41
+ | 2g | child_prototypical | 1 | 15 | 1 | 21 |
42
+ | 2h | child_prototypical | 1 | 18 | 1 | 19 |
43
+ | 2h | child | 10 | 780 | 11 | 878 |
44
+ | 2i | child | 10 | 780 | 9 | 880 |
45
+ | 2i | child_prototypical | 1 | 19 | 1 | 18 |
46
+ | 2j | child | 10 | 780 | 10 | 879 |
47
+ | 2j | child_prototypical | 1 | 20 | 1 | 20 |
48
+ | 3 | parent | 80 | 710 | 80 | 809 |
49
+ | 3a | child | 10 | 780 | 11 | 878 |
50
+ | 3a | child_prototypical | 1 | 18 | 1 | 19 |
51
+ | 3b | child | 10 | 780 | 11 | 878 |
52
+ | 3b | child_prototypical | 1 | 21 | 1 | 22 |
53
+ | 3c | child_prototypical | 1 | 17 | 1 | 19 |
54
+ | 3c | child | 10 | 780 | 12 | 877 |
55
+ | 3d | child | 10 | 780 | 14 | 875 |
56
+ | 3d | child_prototypical | 1 | 17 | 1 | 21 |
57
+ | 3e | child | 10 | 780 | 5 | 884 |
58
+ | 3e | child_prototypical | 1 | 21 | 1 | 16 |
59
+ | 3f | child | 10 | 780 | 11 | 878 |
60
+ | 3f | child_prototypical | 1 | 22 | 1 | 23 |
61
+ | 3g | child | 10 | 780 | 6 | 883 |
62
+ | 3g | child_prototypical | 1 | 20 | 1 | 16 |
63
+ | 3h | child_prototypical | 1 | 20 | 1 | 20 |
64
+ | 3h | child | 10 | 780 | 10 | 879 |
65
+ | 4 | parent | 80 | 710 | 82 | 807 |
66
+ | 4a | child | 10 | 780 | 11 | 878 |
67
+ | 4a | child_prototypical | 1 | 21 | 1 | 22 |
68
+ | 4b | child | 10 | 780 | 7 | 882 |
69
+ | 4b | child_prototypical | 1 | 16 | 1 | 13 |
70
+ | 4c | child | 10 | 780 | 12 | 877 |
71
+ | 4c | child_prototypical | 1 | 19 | 1 | 21 |
72
+ | 4d | child_prototypical | 1 | 15 | 1 | 9 |
73
+ | 4d | child | 10 | 780 | 4 | 885 |
74
+ | 4e | child | 10 | 780 | 12 | 877 |
75
+ | 4e | child_prototypical | 1 | 21 | 1 | 23 |
76
+ | 4f | child | 10 | 780 | 9 | 880 |
77
+ | 4f | child_prototypical | 1 | 21 | 1 | 20 |
78
+ | 4g | child | 10 | 780 | 15 | 874 |
79
+ | 4g | child_prototypical | 1 | 17 | 1 | 22 |
80
+ | 4h | child_prototypical | 1 | 20 | 1 | 22 |
81
+ | 4h | child | 10 | 780 | 12 | 877 |
82
+ | 5 | parent | 90 | 700 | 105 | 784 |
83
+ | 5a | child | 10 | 780 | 14 | 875 |
84
+ | 5a | child_prototypical | 1 | 17 | 1 | 21 |
85
+ | 5b | child_prototypical | 1 | 20 | 1 | 18 |
86
+ | 5b | child | 10 | 780 | 8 | 881 |
87
+ | 5c | child | 10 | 780 | 11 | 878 |
88
+ | 5c | child_prototypical | 1 | 18 | 1 | 19 |
89
+ | 5d | child | 10 | 780 | 15 | 874 |
90
+ | 5d | child_prototypical | 1 | 16 | 1 | 21 |
91
+ | 5e | child | 10 | 780 | 8 | 881 |
92
+ | 5e | child_prototypical | 1 | 20 | 1 | 18 |
93
+ | 5f | child | 10 | 780 | 11 | 878 |
94
+ | 5f | child_prototypical | 1 | 20 | 1 | 21 |
95
+ | 5g | child_prototypical | 1 | 21 | 1 | 20 |
96
+ | 5g | child | 10 | 780 | 9 | 880 |
97
+ | 5h | child | 10 | 780 | 15 | 874 |
98
+ | 5h | child_prototypical | 1 | 19 | 1 | 24 |
99
+ | 5i | child | 10 | 780 | 14 | 875 |
100
+ | 5i | child_prototypical | 1 | 19 | 1 | 23 |
101
+ | 6 | parent | 80 | 710 | 99 | 790 |
102
+ | 6a | child | 10 | 780 | 15 | 874 |
103
+ | 6a | child_prototypical | 1 | 17 | 1 | 22 |
104
+ | 6b | child_prototypical | 1 | 20 | 1 | 21 |
105
+ | 6b | child | 10 | 780 | 11 | 878 |
106
+ | 6c | child_prototypical | 1 | 20 | 1 | 23 |
107
+ | 6c | child | 10 | 780 | 13 | 876 |
108
+ | 6d | child | 10 | 780 | 10 | 879 |
109
+ | 6d | child_prototypical | 1 | 23 | 1 | 23 |
110
+ | 6e | child | 10 | 780 | 11 | 878 |
111
+ | 6e | child_prototypical | 1 | 20 | 1 | 21 |
112
+ | 6f | child | 10 | 780 | 12 | 877 |
113
+ | 6f | child_prototypical | 1 | 18 | 1 | 20 |
114
+ | 6g | child | 10 | 780 | 12 | 877 |
115
+ | 6g | child_prototypical | 1 | 17 | 1 | 19 |
116
+ | 6h | child_prototypical | 1 | 18 | 1 | 23 |
117
+ | 6h | child | 10 | 780 | 15 | 874 |
118
+ | 7 | parent | 80 | 710 | 91 | 798 |
119
+ | 7a | child | 10 | 780 | 14 | 875 |
120
+ | 7a | child_prototypical | 1 | 19 | 1 | 23 |
121
+ | 7b | child | 10 | 780 | 7 | 882 |
122
+ | 7b | child_prototypical | 1 | 15 | 1 | 12 |
123
+ | 7c | child | 10 | 780 | 11 | 878 |
124
+ | 7c | child_prototypical | 1 | 16 | 1 | 17 |
125
+ | 7d | child_prototypical | 1 | 19 | 1 | 23 |
126
+ | 7d | child | 10 | 780 | 14 | 875 |
127
+ | 7e | child_prototypical | 1 | 16 | 1 | 16 |
128
+ | 7e | child | 10 | 780 | 10 | 879 |
129
+ | 7f | child | 10 | 780 | 12 | 877 |
130
+ | 7f | child_prototypical | 1 | 15 | 1 | 17 |
131
+ | 7g | child | 10 | 780 | 9 | 880 |
132
+ | 7g | child_prototypical | 1 | 13 | 1 | 12 |
133
+ | 7h | child | 10 | 780 | 14 | 875 |
134
+ | 7h | child_prototypical | 1 | 14 | 1 | 18 |
135
+ | 8 | parent | 80 | 710 | 90 | 799 |
136
+ | 8a | child | 10 | 780 | 14 | 875 |
137
+ | 8a | child_prototypical | 1 | 16 | 1 | 20 |
138
+ | 8b | child_prototypical | 1 | 20 | 1 | 17 |
139
+ | 8b | child | 10 | 780 | 7 | 882 |
140
+ | 8c | child | 10 | 780 | 12 | 877 |
141
+ | 8c | child_prototypical | 1 | 15 | 1 | 17 |
142
+ | 8d | child | 10 | 780 | 13 | 876 |
143
+ | 8d | child_prototypical | 1 | 15 | 1 | 18 |
144
+ | 8e | child | 10 | 780 | 11 | 878 |
145
+ | 8e | child_prototypical | 1 | 15 | 1 | 16 |
146
+ | 8f | child | 10 | 780 | 12 | 877 |
147
+ | 8f | child_prototypical | 1 | 16 | 1 | 18 |
148
+ | 8g | child_prototypical | 1 | 12 | 1 | 9 |
149
+ | 8g | child | 10 | 780 | 7 | 882 |
150
+ | 8h | child | 10 | 780 | 14 | 875 |
151
+ | 8h | child_prototypical | 1 | 17 | 1 | 21 |
152
+ | 9 | parent | 90 | 700 | 96 | 793 |
153
+ | 9a | child | 10 | 780 | 14 | 875 |
154
+ | 9a | child_prototypical | 1 | 14 | 1 | 18 |
155
+ | 9b | child | 10 | 780 | 12 | 877 |
156
+ | 9b | child_prototypical | 1 | 18 | 1 | 20 |
157
+ | 9c | child | 10 | 780 | 7 | 882 |
158
+ | 9c | child_prototypical | 1 | 9 | 1 | 6 |
159
+ | 9d | child_prototypical | 1 | 22 | 1 | 21 |
160
+ | 9d | child | 10 | 780 | 9 | 880 |
161
+ | 9e | child | 10 | 780 | 8 | 881 |
162
+ | 9e | child_prototypical | 1 | 23 | 1 | 21 |
163
+ | 9f | child | 10 | 780 | 10 | 879 |
164
+ | 9f | child_prototypical | 1 | 18 | 1 | 18 |
165
+ | 9g | child | 10 | 780 | 14 | 875 |
166
+ | 9g | child_prototypical | 1 | 15 | 1 | 19 |
167
+ | 9h | child | 10 | 780 | 13 | 876 |
168
+ | 9h | child_prototypical | 1 | 18 | 1 | 21 |
169
+ | 9i | child | 10 | 780 | 9 | 880 |
170
+ | 9i | child_prototypical | 1 | 18 | 1 | 17 |