Saibo-creator commited on
Commit
825c3c1
·
1 Parent(s): 82f6f16

include wiki-unseen for canonical

Browse files
el/filter_wiki_unseen.py ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+
3
+ input_file = "wikiLinksNED-test-kilt-short.jsonl"
4
+ output_file = "wikiLinksNED-filtered-test-kilt-short.jsonl"
5
+
6
+ filtered_lines = []
7
+
8
+ with open(input_file, "r") as file:
9
+ for line in file:
10
+ data = json.loads(line)
11
+ id_ = data["id"]
12
+ text = data["text"]
13
+ target = data["target"]
14
+ candidates = data["candidates"]
15
+ mention = data["mention"]
16
+ left_context = data["left_context"]
17
+ right_context = data["right_context"]
18
+
19
+ if not candidates or target not in candidates:
20
+ # empty candidates or target not in candidates
21
+ # filter out
22
+ continue
23
+ filtered_lines.append(line)
24
+
25
+ with open(output_file, "w") as file:
26
+ for line in filtered_lines:
27
+ file.write(line)
el/wikiLinksNED-10k-test-kilt-short-fs4-canonical.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a75fa217ec2eab6bae68d8cc364dd959b7f0309494ff476aad5c696e514be788
3
+ size 22414733
el/{wikiLinksNED-test-kilt-short-fs4-wm.jsonl → wikiLinksNED-10k-test-kilt-short-fs4-wm.jsonl} RENAMED
File without changes
el/wikiLinksNED-10k-test-kilt-short.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:274a8f8b48f9501bbf66f6eedb020f435496dac7496ceb5ae6a9d67f2d4914a7
3
+ size 14114733
el/wikiLinksNED-test-kilt-short-fs4-canonical.jsonl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a75fa217ec2eab6bae68d8cc364dd959b7f0309494ff476aad5c696e514be788
3
- size 22414733
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c45fb0a7f81b390545d19419d7a87ad8199cd3213842579dd64c6a4dec295ec4
3
+ size 8062071
el/wikiLinksNED-test-kilt-short.jsonl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:274a8f8b48f9501bbf66f6eedb020f435496dac7496ceb5ae6a9d67f2d4914a7
3
- size 14114733
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:65585f10c29d01621dbb43399e0e7f140a501ad00c8b6e85620cc1d293a524e5
3
+ size 5229281