Exemplo n.º 1
0
 def __init__(self, config, multi_label):
     super(AssociationPipeline, self).__init__(config)
     self.multi_label = multi_label
     self.association_encoder = SequenceLabelingEncoder()
     self.association_encoder.fit(config.association_types +
                                  [self.config.pad_token])
     self.association_pad_idx = self.association_encoder.transform(
         [self.config.pad_token])
Exemplo n.º 2
0
 def _target_encoder(self):
     if self.multi_label:
         return SequenceMultiLabelingEncoder()
     return SequenceLabelingEncoder()
Exemplo n.º 3
0
 def _target_encoder(self):
     return SequenceLabelingEncoder()