init
Browse files- README.md +1 -0
- analogy_questions.py +4 -1
- get_stats.py +0 -0
README.md
CHANGED
@@ -13,6 +13,7 @@ and `answer` indicates the index of correct candidate which starts from `0`. Dat
|
|
13 |
|
14 |
| Dataset | Size (valid/test) | Num of choice | Num of relation group | Original Reference |
|
15 |
|---------|------------------:|--------------:|----------------------:|:--------------------------------------------------------------------------:|
|
|
|
16 |
| sat | 37/337 | 5 | 2 | [Turney (2005)](https://arxiv.org/pdf/cs/0508053.pdf) |
|
17 |
| u2 | 24/228 | 5,4,3 | 9 | [EnglishForEveryone](https://englishforeveryone.org/Topics/Analogies.html) |
|
18 |
| u4 | 48/432 | 5,4,3 | 5 | [EnglishForEveryone](https://englishforeveryone.org/Topics/Analogies.html) |
|
|
|
13 |
|
14 |
| Dataset | Size (valid/test) | Num of choice | Num of relation group | Original Reference |
|
15 |
|---------|------------------:|--------------:|----------------------:|:--------------------------------------------------------------------------:|
|
16 |
+
| sat_full| -/374 | 5 | 2 | [Turney (2005)](https://arxiv.org/pdf/cs/0508053.pdf) |
|
17 |
| sat | 37/337 | 5 | 2 | [Turney (2005)](https://arxiv.org/pdf/cs/0508053.pdf) |
|
18 |
| u2 | 24/228 | 5,4,3 | 9 | [EnglishForEveryone](https://englishforeveryone.org/Topics/Analogies.html) |
|
19 |
| u4 | 48/432 | 5,4,3 | 5 | [EnglishForEveryone](https://englishforeveryone.org/Topics/Analogies.html) |
|
analogy_questions.py
CHANGED
@@ -38,6 +38,7 @@ _URLS = {
|
|
38 |
'bats': [f'{_URL}/bats/valid.jsonl'],
|
39 |
'google': [f'{_URL}/google/valid.jsonl'],
|
40 |
'sat': [f'{_URL}/sat/valid.jsonl'],
|
|
|
41 |
'u2': [f'{_URL}/u2/valid.jsonl'],
|
42 |
'u4': [f'{_URL}/u4/valid.jsonl']
|
43 |
}
|
@@ -81,9 +82,11 @@ class AnalogyQuestion(datasets.GeneratorBasedBuilder):
|
|
81 |
downloaded_file = dl_manager.download_and_extract({
|
82 |
str(datasets.Split.TEST): _URLS[str(datasets.Split.TEST)][self.config.name]
|
83 |
})
|
|
|
|
|
84 |
else:
|
85 |
downloaded_file = dl_manager.download_and_extract({k: v[self.config.name] for k, v in _URLS.items()})
|
86 |
-
|
87 |
|
88 |
def _generate_examples(self, filepaths):
|
89 |
_key = 0
|
|
|
38 |
'bats': [f'{_URL}/bats/valid.jsonl'],
|
39 |
'google': [f'{_URL}/google/valid.jsonl'],
|
40 |
'sat': [f'{_URL}/sat/valid.jsonl'],
|
41 |
+
'sat_full': [],
|
42 |
'u2': [f'{_URL}/u2/valid.jsonl'],
|
43 |
'u4': [f'{_URL}/u4/valid.jsonl']
|
44 |
}
|
|
|
82 |
downloaded_file = dl_manager.download_and_extract({
|
83 |
str(datasets.Split.TEST): _URLS[str(datasets.Split.TEST)][self.config.name]
|
84 |
})
|
85 |
+
return [datasets.SplitGenerator(name=str(datasets.Split.TEST),
|
86 |
+
gen_kwargs={"filepaths": downloaded_file[str(datasets.Split.TEST)]})]
|
87 |
else:
|
88 |
downloaded_file = dl_manager.download_and_extract({k: v[self.config.name] for k, v in _URLS.items()})
|
89 |
+
return [datasets.SplitGenerator(name=k, gen_kwargs={"filepaths": downloaded_file[k]}) for k in _URLS.keys()]
|
90 |
|
91 |
def _generate_examples(self, filepaths):
|
92 |
_key = 0
|
get_stats.py
DELETED
File without changes
|