kiamehr74 commited on
Commit
1f66637
·
1 Parent(s): 7ff9e0f
Files changed (1) hide show
  1. CoarseWSD-20.py +2 -15
CoarseWSD-20.py CHANGED
@@ -1,5 +1,5 @@
1
 
2
- # @title cwsd20 code
3
  import json
4
  import datasets
5
  import os
@@ -22,9 +22,6 @@ to provide an ideal setting for evaluating WSD models (e.g. no senses in test se
22
  from training), both quantitavely and qualitatively.
23
  """
24
 
25
- path = "data/apple/train.data.txt"
26
-
27
-
28
  _WORDS = ["apple", "arm", "bank", "bass",
29
  "bow", "chair", "club", "crane",
30
  "deck", "digit", "hood", "java",
@@ -55,15 +52,6 @@ class CWSD20(datasets.GeneratorBasedBuilder):
55
  "idx": datasets.Value("int32"),
56
  "sentence": datasets.Value("string"),
57
  "label": datasets.features.ClassLabel(names=label_classes)
58
- # datasets.features.ClassLabel(names=self.config.label_classes)
59
- # "label": datasets.Value("int32")
60
- # "idx": datasets.Value("int32"),
61
- # "word": datasets.Value("string"),
62
- # "start1": datasets.Value("int32"),
63
- # "start2": datasets.Value("int32"),
64
- # "end1": datasets.Value("int32"),
65
- # "end2": datasets.Value("int32"),
66
- # "label": datasets.Value("int32")
67
  }
68
  ),
69
  # If there's a common (input, target) tuple from the features,
@@ -71,7 +59,7 @@ class CWSD20(datasets.GeneratorBasedBuilder):
71
  # builder.as_dataset.
72
  supervised_keys=None,
73
  # Homepage of the dataset for documentation
74
- homepage="https://github.com/google-research-datasets/boolean-questions",
75
  citation=_CITATION,
76
  )
77
 
@@ -98,7 +86,6 @@ class CWSD20(datasets.GeneratorBasedBuilder):
98
 
99
  for id_, (exi, lbi) in enumerate(zip(exf, lbf)):
100
  example = {}
101
- # 'word', 'sentence1', 'sentence2', 'start1', 'start2', 'end1', 'end2', 'idx', 'label'
102
  parts = exi.split("\t")
103
  idx = parts[0]
104
  sent = parts[1]
 
1
 
2
+
3
  import json
4
  import datasets
5
  import os
 
22
  from training), both quantitavely and qualitatively.
23
  """
24
 
 
 
 
25
  _WORDS = ["apple", "arm", "bank", "bass",
26
  "bow", "chair", "club", "crane",
27
  "deck", "digit", "hood", "java",
 
52
  "idx": datasets.Value("int32"),
53
  "sentence": datasets.Value("string"),
54
  "label": datasets.features.ClassLabel(names=label_classes)
 
 
 
 
 
 
 
 
 
55
  }
56
  ),
57
  # If there's a common (input, target) tuple from the features,
 
59
  # builder.as_dataset.
60
  supervised_keys=None,
61
  # Homepage of the dataset for documentation
62
+ homepage="https://github.com/danlou/bert-disambiguation.git",
63
  citation=_CITATION,
64
  )
65
 
 
86
 
87
  for id_, (exi, lbi) in enumerate(zip(exf, lbf)):
88
  example = {}
 
89
  parts = exi.split("\t")
90
  idx = parts[0]
91
  sent = parts[1]