boragokbakan commited on
Commit
15c1447
·
1 Parent(s): 1e8738e

info added

Browse files
Files changed (1) hide show
  1. entity_disambiguation.py +29 -0
entity_disambiguation.py CHANGED
@@ -22,6 +22,32 @@ _VERSION = "1.0.0"
22
  # }
23
 
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  class EntityDisambiguation(datasets.GeneratorBasedBuilder):
26
  """Entity Disambiguation dataset."""
27
 
@@ -58,3 +84,6 @@ class EntityDisambiguation(datasets.GeneratorBasedBuilder):
58
  )
59
  for split in available_splits
60
  ]
 
 
 
 
22
  # }
23
 
24
 
25
+ class EntityDisambiguationConfig(datasets.BuilderConfig):
26
+ """BuilderConfig for EntityDisambiguation."""
27
+
28
+ def __init__(self, **kwargs):
29
+ """BuilderConfig for EntityDisambiguation.
30
+
31
+ Args:
32
+ **kwargs: keyword arguments forwarded to super.
33
+ """
34
+ super(EntityDisambiguationConfig, self).__init__(**kwargs)
35
+
36
+ self.features = datasets.Features(
37
+ {
38
+ "id": datasets.Value("int32"),
39
+ "input": datasets.Value("string"),
40
+ "meta": {
41
+ "left_context": datasets.Value("string"),
42
+ "mention": datasets.Value("string"),
43
+ "right_context": datasets.Value("string"),
44
+ },
45
+ "candidates": datasets.features.Sequence(datasets.Value("string")),
46
+ "answer": datasets.Value("string")
47
+ }
48
+ )
49
+
50
+
51
  class EntityDisambiguation(datasets.GeneratorBasedBuilder):
52
  """Entity Disambiguation dataset."""
53
 
 
84
  )
85
  for split in available_splits
86
  ]
87
+
88
+ def _info(self) -> datasets.DatasetInfo:
89
+ return datasets.DatasetInfo(description="Entity Disambiguation dataset", features=self.config.features)