Datasets:

Sub-tasks:
extractive-qa
Languages:
English
Multilinguality:
monolingual
Size Categories:
10K<n<100K
Language Creators:
found
Annotations Creators:
no-annotation
Source Datasets:
original
ArXiv:
Tags:
License:
jonsaadfalcon commited on
Commit
90f9d23
1 Parent(s): b15ffd4

update file format

Browse files
Files changed (47) hide show
  1. .DS_Store +0 -0
  2. Generate_JSON_From_TSV.py +9 -17
  3. lifestyle/{forum_dev.jsonl → dev_qas.forum.jsonl} +2 -2
  4. lifestyle/{forum_test.jsonl → dev_qas.search.jsonl} +2 -2
  5. lifestyle/{search_dev.jsonl → test_qas.forum.jsonl} +2 -2
  6. lifestyle/{search_test.jsonl → test_qas.search.jsonl} +2 -2
  7. lotte.py +17 -17
  8. pooled/dev_qas.forum.jsonl +3 -0
  9. pooled/dev_qas.search.jsonl +3 -0
  10. pooled/forum_dev.jsonl +0 -3
  11. pooled/forum_test.jsonl +0 -3
  12. pooled/search_dev.jsonl +0 -3
  13. pooled/search_test.jsonl +0 -3
  14. pooled/test_qas.forum.jsonl +3 -0
  15. pooled/test_qas.search.jsonl +3 -0
  16. recreation/dev_qas.forum.jsonl +3 -0
  17. recreation/dev_qas.search.jsonl +3 -0
  18. recreation/forum_dev.jsonl +0 -3
  19. recreation/forum_test.jsonl +0 -3
  20. recreation/search_dev.jsonl +0 -3
  21. recreation/search_test.jsonl +0 -3
  22. recreation/test_qas.forum.jsonl +3 -0
  23. recreation/test_qas.search.jsonl +3 -0
  24. science/dev_qas.forum.jsonl +3 -0
  25. science/dev_qas.search.jsonl +3 -0
  26. science/forum_dev.jsonl +0 -3
  27. science/forum_test.jsonl +0 -3
  28. science/search_dev.jsonl +0 -3
  29. science/search_test.jsonl +0 -3
  30. science/test_qas.forum.jsonl +3 -0
  31. science/test_qas.search.jsonl +3 -0
  32. technology/dev_qas.forum.jsonl +3 -0
  33. technology/dev_qas.search.jsonl +3 -0
  34. technology/forum_dev.jsonl +0 -3
  35. technology/forum_test.jsonl +0 -3
  36. technology/search_dev.jsonl +0 -3
  37. technology/search_test.jsonl +0 -3
  38. technology/test_qas.forum.jsonl +3 -0
  39. technology/test_qas.search.jsonl +3 -0
  40. writing/dev_qas.forum.jsonl +3 -0
  41. writing/dev_qas.search.jsonl +3 -0
  42. writing/forum_dev.jsonl +0 -3
  43. writing/forum_test.jsonl +0 -3
  44. writing/search_dev.jsonl +0 -3
  45. writing/search_test.jsonl +0 -3
  46. writing/test_qas.forum.jsonl +3 -0
  47. writing/test_qas.search.jsonl +3 -0
.DS_Store CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
 
Generate_JSON_From_TSV.py CHANGED
@@ -3,32 +3,24 @@ import pandas as pd
3
  import os
4
  from tqdm import tqdm
5
  import json
 
6
 
7
  directories = ['lifestyle', 'pooled', 'recreation', 'science', 'technology', 'writing'] #os.listdir()
8
 
9
- file_name_conversion = {"questions.search.tsv": "search", "questions.forum.tsv": "forum"}
10
-
11
  for directory in directories:
12
 
13
  for file_type in ["dev", "test"]:
14
 
15
- for question_type in ["questions.forum.tsv", "questions.search.tsv"]:
16
-
17
-
18
-
19
- current_jsonl = []
20
- loaded_file = pd.read_csv('data/' + directory + "/" + file_type + "/" + question_type, sep='\t', header=0)
21
 
22
- for row in tqdm(range(0, len(loaded_file))):
23
-
24
- current_jsonl.append({
25
- "query_id": row,
26
- "text": loaded_file.iloc[row][1]
27
- })
28
 
29
  if not os.path.isdir(directory):
30
-
31
  os.mkdir(directory)
32
 
33
- with open(directory + "/" + file_name_conversion[question_type] + "_" + file_type + ".jsonl", 'w', encoding="utf-8") as fout:
34
- json.dump(current_jsonl, fout)
 
 
 
 
3
  import os
4
  from tqdm import tqdm
5
  import json
6
+ import shutil
7
 
8
  directories = ['lifestyle', 'pooled', 'recreation', 'science', 'technology', 'writing'] #os.listdir()
9
 
 
 
10
  for directory in directories:
11
 
12
  for file_type in ["dev", "test"]:
13
 
14
+ for question_type in ["qas.forum.jsonl", "qas.search.jsonl"]:
 
 
 
 
 
15
 
16
+ #with open('data/' + directory + "/" + file_type + "/" + question_type, 'r', encoding="utf-8") as f:
17
+ # data = json.load(f)
 
 
 
 
18
 
19
  if not os.path.isdir(directory):
 
20
  os.mkdir(directory)
21
 
22
+ #with open(directory + "/" + file_type + question_type, 'w', encoding="utf-8") as fout:
23
+ # json.dump(data, fout)
24
+
25
+ shutil.move('data/' + directory + "/" + file_type + "/" + question_type,
26
+ directory + "/" + file_type + "_" + question_type)
lifestyle/{forum_dev.jsonl → dev_qas.forum.jsonl} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7d785c4f16f3026425ac7adcbf2a0e9c4ac44de332bd014dbed4af284ec0fc98
3
- size 180278
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5666d62a333906d009270bf2ad1f96820f1be54939e7c7a10c11a5c4db87d19c
3
+ size 361599
lifestyle/{forum_test.jsonl → dev_qas.search.jsonl} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:922c5f9b3c6008cdcda388294f19172621daf6731c6cec8605048944a9fe5b00
3
- size 183989
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2eaf6137d0a9191a24f245775fb701be88276f6fb52aef65a80e0a369602069e
3
+ size 121982
lifestyle/{search_dev.jsonl → test_qas.forum.jsonl} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:83060b2fe998f210e8c0cbec00f87074414bada9f1fa8f83fb6dd317bf4473bd
3
- size 28395
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb82673e7c392f74e1b0dbfdb5eadd52137c32141bef9cfe0d8131f72de95fb1
3
+ size 337100
lifestyle/{search_test.jsonl → test_qas.search.jsonl} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1e75780b13bd4de2330af91dd838c8d70871651292a10ab286350f01c6d80a86
3
- size 48365
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff185f51c738bca834039063ca69e31683f9de21b0ea74f84cf667d1f67c00a0
3
+ size 192294
lotte.py CHANGED
@@ -117,8 +117,11 @@ class NewDataset(datasets.GeneratorBasedBuilder):
117
  # TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
118
  features = datasets.Features(
119
  {
120
- "query_id": datasets.Value("string"),
121
- "text": datasets.Value("string")
 
 
 
122
  }
123
  )
124
  return datasets.DatasetInfo(
@@ -146,10 +149,10 @@ class NewDataset(datasets.GeneratorBasedBuilder):
146
  # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
147
 
148
  _URLS = {
149
- "forum_dev": _URL[self.config.name] + "forum_dev.jsonl",
150
- "forum_test": _URL[self.config.name] + "forum_test.jsonl",
151
- "search_dev": _URL[self.config.name] + "search_dev.jsonl",
152
- "search_test": _URL[self.config.name] + "search_test.jsonl",
153
  }
154
 
155
  downloaded_files = dl_manager.download_and_extract(_URLS)
@@ -174,14 +177,11 @@ class NewDataset(datasets.GeneratorBasedBuilder):
174
 
175
  data = json.loads(row)
176
 
177
- print("Data type and length")
178
- print(type(data))
179
- print(len(data))
180
-
181
- for i in range(0, len(data)):
182
-
183
- current_query = data[i]
184
- yield i, {
185
- "query_id": current_query["query_id"],
186
- "text": current_query["text"]
187
- }
 
117
  # TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
118
  features = datasets.Features(
119
  {
120
+ "qid": datasets.Value("string"),
121
+ "query": datasets.Value("string"),
122
+ "score": datasets.Value("int"),
123
+ "views": datasets.Value("views"),
124
+ "answer_pids": datasets.Value("list"),
125
  }
126
  )
127
  return datasets.DatasetInfo(
 
149
  # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
150
 
151
  _URLS = {
152
+ "forum_dev": _URL[self.config.name] + "dev_qas.forum.jsonl",
153
+ "forum_test": _URL[self.config.name] + "test_qas.forum.jsonl",
154
+ "search_dev": _URL[self.config.name] + "dev_qas.search.jsonl",
155
+ "search_test": _URL[self.config.name] + "test_qas.search.jsonl",
156
  }
157
 
158
  downloaded_files = dl_manager.download_and_extract(_URLS)
 
177
 
178
  data = json.loads(row)
179
 
180
+ current_query = data[i]
181
+ yield i, {
182
+ "qid": current_query["qid"],
183
+ "query": current_query["query"],
184
+ "score": current_query["score"],
185
+ "views": current_query["views"],
186
+ "answer_pids": current_query["answer_pids"],
187
+ }
 
 
 
pooled/dev_qas.forum.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5a16b0bd663dcc37b6df16514657beb09f13210bd719f19b2e7aa3141e4ad140
3
+ size 1877876
pooled/dev_qas.search.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:be92516e59e833880619cc5a34068caed7a94cdd237907c97b177ea38aad94ff
3
+ size 832440
pooled/forum_dev.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:ee08e2b0a863701c7faf23dd5d6ea2560e54abc47120c005bfcff177e1b2909c
3
- size 892126
 
 
 
 
pooled/forum_test.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:0fa6e64157cf0b71857c4d26028df994b6dfb673aaf573ecdee2e3fa1efbe264
3
- size 876108
 
 
 
 
pooled/search_dev.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:c9d844a74d8640ba196c2c1b6d42afa4cbefbf7ab048dbe7145a9543f8655be0
3
- size 210267
 
 
 
 
pooled/search_test.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:c10d7feb26861ceee1bceb82ff1073ecc50238fb988b04da109a6bc408f7f031
3
- size 280948
 
 
 
 
pooled/test_qas.forum.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b87e549daee5194eb44db0c7c2b11111d4b5b8101851e0e72fca3a1c0d2fed54
3
+ size 1802600
pooled/test_qas.search.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0001d79059752ec5dff5cdd5ceb9df64eb36b7c32055a25a4c67e64c51929752
3
+ size 1093531
recreation/dev_qas.forum.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4947b7cbc93cfb8020bceac1e198ca5bd71a65669faf3639de6100280c8a3780
3
+ size 357288
recreation/dev_qas.search.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:74eb4fda728e12d08a155701d45cfefe2d95d941ef8522ee89acd7e303777c9c
3
+ size 162653
recreation/forum_dev.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:62968e187b7d3ce079e131fbfcbfcef385245b41e10ad45c4b253990fc0d95ed
3
- size 179974
 
 
 
 
recreation/forum_test.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:64244ea0c5f9513e1c7b0731ed3a7f2d3fdcbc6624c6057763ed1cace2dd48c9
3
- size 166219
 
 
 
 
recreation/search_dev.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:2c5d1f141d336c8d3fe0ceec5bbb973a216d3c1a353efb8ebd13855bee2312d0
3
- size 36734
 
 
 
 
recreation/search_test.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:d29a6959f16e5637a30e1b498188017966ce47421f16120ef1e2512b54984bff
3
- size 62810
 
 
 
 
recreation/test_qas.forum.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:03fb3b5ea7518fe59fabe632235b318d31361b9cd3960bea87584b4c904fca23
3
+ size 298143
recreation/test_qas.search.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b65d2926b6d37069cf289bc00e970df2e318264dc99ac50f8921970eb9a2036
3
+ size 249309
science/dev_qas.forum.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:06fafad5aa192fa5df5ef189f6c5dd6def38b20ca5ffbaa52526054627adf1ed
3
+ size 360993
science/dev_qas.search.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c473d923bb85324edf117a0651aeab8e1e36ca822b0d14f02afc61c9e0e40c71
3
+ size 157028
science/forum_dev.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:6eca00268435a78bff570dfab4f58b8237238eb1f9f8fa853dde5c7ef3db2385
3
- size 184989
 
 
 
 
science/forum_test.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:28528250fe38403343605d9666422f44397cc16a6ff6087e0813a610da213251
3
- size 180698
 
 
 
 
science/search_dev.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:a8cc2efc89bcb64e0f03cd80a28935996f063fbf20fe749d0534f5ffaeac351d
3
- size 40966
 
 
 
 
science/search_test.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:c869792cde5be6a2fb8993072d0e9505626ea90ed60ffea88f541fce30f5ad51
3
- size 47682
 
 
 
 
science/test_qas.forum.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca108524de3eec5d5ea6ad72a0064444f8569037da83e02a00503e7093edbbd3
3
+ size 385766
science/test_qas.search.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b7f396e9068ab303a536d5f2464b0d2c46baa7de5a87ef4de71ebe55cfd0828e
3
+ size 180291
technology/dev_qas.forum.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f3c6b9a4a56957da3c89f8ce6ce30ea8b76f1772d6b2e405b1f1e581de678ba7
3
+ size 380956
technology/dev_qas.search.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b224e2ca11e178454d891b1453958f7a39875fd9a3e52a3d7a7a7129ea27c623
3
+ size 252078
technology/forum_dev.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:06b92cfe56cabc294445c362b9439dcc676ba9e0d2cac0237b0b48e026871d2e
3
- size 168232
 
 
 
 
technology/forum_test.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:aa4888945bbdd5e9bdd2b68c6f9f4d22d17ea418cb29b95027f8d1507fc549cd
3
- size 170301
 
 
 
 
technology/search_dev.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:aaf0dc5eb2fbc363ed34e6b443f88bd760a65e7b66e23cce37612e1adbb31736
3
- size 66058
 
 
 
 
technology/search_test.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:a35b564c521fb00453c898ed049458062269d4804ea2a51bc573a2fc072a5d2a
3
- size 43200
 
 
 
 
technology/test_qas.forum.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9c3530af0c9c82f2fcee994110e443e335c3935919c6387d2b89354fb35b0faf
3
+ size 378009
technology/test_qas.search.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4f00fa3bbbc23e0575eed4ddf23f3df16ae1c3f3df4075bfb100c38c67755daf
3
+ size 172318
writing/dev_qas.forum.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d372aa3721caa061fd588b1112cc521c4dfe6dae87b1a4609f2660036998ca4a
3
+ size 369500
writing/dev_qas.search.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8970173297af9f934676ab28643f0c70bd15b53193edd1ff40a7a428d4671b76
3
+ size 130899
writing/forum_dev.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:95a34e94b5589da5e4e74634b6999baa172ee2ffff52c64ea0fbc35fb8bcfcd4
3
- size 173795
 
 
 
 
writing/forum_test.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:761514b10c748aca57e2d792776372e31347627b4720d3ebe8bdec91060b8fcd
3
- size 170094
 
 
 
 
writing/search_dev.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:23cfce51d53dc590dac0129eeaae541c5d078fb30b947889e91cc185f0503c01
3
- size 35460
 
 
 
 
writing/search_test.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:835d9fede812512189f4fbdf3688b2682170d803b7f41fe7b1f74588239f48fe
3
- size 75359
 
 
 
 
writing/test_qas.forum.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4a2c662ed2bfc2a560be8502608199c210c842f2914a9883690c4ae9ec53cb97
3
+ size 344815
writing/test_qas.search.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:181e57289cf99506833ecc6e2413cac0ef204cf4a79ce29273da09a757c4dbfa
3
+ size 288272