drAbreu commited on
Commit
ffafe20
1 Parent(s): 01579ca

Update sd-character-level-ner.py

Browse files
Files changed (1) hide show
  1. sd-character-level-ner.py +4 -6
sd-character-level-ner.py CHANGED
@@ -83,23 +83,21 @@ class SourceDataNLP(datasets.GeneratorBasedBuilder):
83
  if self.config.name == "NER":
84
  features = datasets.Features(
85
  {
86
- "words": datasets.Sequence(feature=datasets.Value("string")),
87
  "labels": datasets.Sequence(
88
  feature=datasets.ClassLabel(num_classes=len(self._NER_LABEL_NAMES),
89
  names=self._NER_LABEL_NAMES)
90
- ),
91
- "tag_mask": datasets.Sequence(feature=datasets.Value("int8")),
92
  }
93
  )
94
  elif self.config.name == "PANELIZATION":
95
  features = datasets.Features(
96
  {
97
- "words": datasets.Sequence(feature=datasets.Value("string")),
98
  "labels": datasets.Sequence(
99
  feature=datasets.ClassLabel(num_classes=len(self._PANEL_START_NAMES),
100
  names=self._PANEL_START_NAMES)
101
- ),
102
- "tag_mask": datasets.Sequence(feature=datasets.Value("int8")),
103
  }
104
  )
105
 
 
83
  if self.config.name == "NER":
84
  features = datasets.Features(
85
  {
86
+ "text": datasets.Value("string"),
87
  "labels": datasets.Sequence(
88
  feature=datasets.ClassLabel(num_classes=len(self._NER_LABEL_NAMES),
89
  names=self._NER_LABEL_NAMES)
90
+ )
 
91
  }
92
  )
93
  elif self.config.name == "PANELIZATION":
94
  features = datasets.Features(
95
  {
96
+ "text": datasets.Value("string"),
97
  "labels": datasets.Sequence(
98
  feature=datasets.ClassLabel(num_classes=len(self._PANEL_START_NAMES),
99
  names=self._PANEL_START_NAMES)
100
+ )
 
101
  }
102
  )
103