Valahaar
commited on
Commit
•
fa4a72e
1
Parent(s):
4e8ce24
updated dataset to have polysemous information as well
Browse files- data/wmt/dev/de.jsonl.bz2 +2 -2
- data/wmt/dev/en.jsonl.bz2 +2 -2
- data/wmt/test_2014/de.jsonl.bz2 +2 -2
- data/wmt/test_2014/en.jsonl.bz2 +2 -2
- data/wmt/test_2019/de.jsonl.bz2 +2 -2
- data/wmt/test_2019/en.jsonl.bz2 +2 -2
- data/wmt/train/de.jsonl.bz2 +2 -2
- data/wmt/train/en.jsonl.bz2 +2 -2
- wsdmt.py +10 -4
data/wmt/dev/de.jsonl.bz2
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dd141234e2b65337ccdf5305324bac1da5c8b4917b1689debb441b2567969b62
|
3 |
+
size 169392
|
data/wmt/dev/en.jsonl.bz2
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:55d27d06fa40208dfaf1919d8b874fbeae1b9a0ab06dd4cba167d2e22d3381ac
|
3 |
+
size 183842
|
data/wmt/test_2014/de.jsonl.bz2
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ced62c34e465ce0eb67746531c91c5648b54d7372ccd750a14530c3a165dd1e0
|
3 |
+
size 171597
|
data/wmt/test_2014/en.jsonl.bz2
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:258d1906a0cb68f9939a8b74fe74041acc0254e5f831d4da26d3a1398c5ca553
|
3 |
+
size 187684
|
data/wmt/test_2019/de.jsonl.bz2
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a682d8f42ac794118a5958f654b500c72e5a248d451b2be2438e29d558226717
|
3 |
+
size 127100
|
data/wmt/test_2019/en.jsonl.bz2
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:466459f22abcb6acde1b1aed0c9c64cf36b60b42de2109488873a58453fd44ed
|
3 |
+
size 131697
|
data/wmt/train/de.jsonl.bz2
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4295b402a0a6c3d9c7b9034ba379555746f2b5dce1bc587d62083ca23d2f0e3f
|
3 |
+
size 260858455
|
data/wmt/train/en.jsonl.bz2
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7fb90965d5687574af9967e96511ae919726ef0b6fa407fafd5b0c1af61fb74e
|
3 |
+
size 272337101
|
wsdmt.py
CHANGED
@@ -30,8 +30,8 @@ class WSDMTDataset(datasets.GeneratorBasedBuilder):
|
|
30 |
sentence1_data = json.loads(line1)
|
31 |
sentence2_data = json.loads(line2)
|
32 |
|
33 |
-
texts1, senses1, is_senses1 = zip(*sentence1_data['data'])
|
34 |
-
texts2, senses2, is_senses2 = zip(*sentence2_data['data'])
|
35 |
sid1, sid2 = sentence1_data['sid'], sentence2_data['sid']
|
36 |
|
37 |
assert sid1 == sid2, (
|
@@ -41,8 +41,12 @@ class WSDMTDataset(datasets.GeneratorBasedBuilder):
|
|
41 |
|
42 |
data_dict = {
|
43 |
'sid': sid1,
|
44 |
-
self.config.lang1: dict(tokens=texts1, sense=senses1,
|
45 |
-
|
|
|
|
|
|
|
|
|
46 |
}
|
47 |
|
48 |
yield n, data_dict
|
@@ -57,11 +61,13 @@ class WSDMTDataset(datasets.GeneratorBasedBuilder):
|
|
57 |
"tokens": datasets.Sequence(datasets.Value("string")),
|
58 |
"sense": datasets.Sequence(datasets.Value("string")),
|
59 |
"identified_as_sense": datasets.Sequence(datasets.Value("bool")),
|
|
|
60 |
},
|
61 |
self.config.lang2: {
|
62 |
"tokens": datasets.Sequence(datasets.Value("string")),
|
63 |
"sense": datasets.Sequence(datasets.Value("string")),
|
64 |
"identified_as_sense": datasets.Sequence(datasets.Value("bool")),
|
|
|
65 |
}
|
66 |
},
|
67 |
),
|
|
|
30 |
sentence1_data = json.loads(line1)
|
31 |
sentence2_data = json.loads(line2)
|
32 |
|
33 |
+
texts1, senses1, is_senses1, is_polysemous1 = zip(*sentence1_data['data'])
|
34 |
+
texts2, senses2, is_senses2, is_polysemous2 = zip(*sentence2_data['data'])
|
35 |
sid1, sid2 = sentence1_data['sid'], sentence2_data['sid']
|
36 |
|
37 |
assert sid1 == sid2, (
|
|
|
41 |
|
42 |
data_dict = {
|
43 |
'sid': sid1,
|
44 |
+
self.config.lang1: dict(tokens=texts1, sense=senses1,
|
45 |
+
identified_as_sense=is_senses1,
|
46 |
+
is_polysemous=is_polysemous1),
|
47 |
+
self.config.lang2: dict(tokens=texts2, sense=senses2,
|
48 |
+
identified_as_sense=is_senses2,
|
49 |
+
is_polysemous=is_polysemous2),
|
50 |
}
|
51 |
|
52 |
yield n, data_dict
|
|
|
61 |
"tokens": datasets.Sequence(datasets.Value("string")),
|
62 |
"sense": datasets.Sequence(datasets.Value("string")),
|
63 |
"identified_as_sense": datasets.Sequence(datasets.Value("bool")),
|
64 |
+
"is_polysemous": datasets.Sequence(datasets.Value("bool")),
|
65 |
},
|
66 |
self.config.lang2: {
|
67 |
"tokens": datasets.Sequence(datasets.Value("string")),
|
68 |
"sense": datasets.Sequence(datasets.Value("string")),
|
69 |
"identified_as_sense": datasets.Sequence(datasets.Value("bool")),
|
70 |
+
"is_polysemous": datasets.Sequence(datasets.Value("bool")),
|
71 |
}
|
72 |
},
|
73 |
),
|