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 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:bddbdae84dd6e80c315c36c170effb080d9af857dfa1fac824d8e4f3ca47a2ab
3
- size 165016
 
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:9df8eab754e7eafbf3030986ed42c6dc56aeec1fa1df60759cc28ab2e16ab400
3
- size 176123
 
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:40acf92c719b25ca79e959bba59d0b9451e91b181a424958d68fb780c282e56f
3
- size 167505
 
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:8f78ac1facae4616630297bf9f1310f449ecb5ddb61e32a04da8f140ac493303
3
- size 178825
 
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:a9ceba7890234421d755810578644971db7232d8e0f1bd5d114514e771420d9d
3
- size 124090
 
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:bc1fddee6169d47071698d067740291fa6ce38e87c082fabcc1d2bbf6e7be940
3
- size 129310
 
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:c9b191386be527a813a982397545226bf3280484ee04ee9e48faa9acf357bd8b
3
- size 253410770
 
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:d2d858aca065b0894e4906116c18f0bc2b0201b651361a740916c7aa7972b6ae
3
- size 264277432
 
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, identified_as_sense=is_senses1),
45
- self.config.lang2: dict(tokens=texts2, sense=senses2, identified_as_sense=is_senses2),
 
 
 
 
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
  ),