Ejemplo n.º 1
0
 def _sample_to_features(cls, sample) -> dict:
     # TODO, make this function return one set of features per sample
     features = sample_to_features_squad(
         sample=sample,
         tokenizer=cls.tokenizer,
         max_seq_len=cls.max_seq_len,
         doc_stride=cls.doc_stride,
         max_query_length=cls.max_query_length,
     )
     return features
Ejemplo n.º 2
0
 def _sample_to_features(self, sample) -> dict:
     # TODO, make this function return one set of features per sample
     features = sample_to_features_squad(
         sample=sample,
         tokenizer=self.tokenizer,
         max_seq_len=self.max_seq_len,
         doc_stride=self.doc_stride,
         max_query_length=self.max_query_length,
         tasks=self.tasks)
     return features
Ejemplo n.º 3
0
 def _sample_to_features(self, sample) -> dict:
     # TODO, make this function return one set of features per sample
     features = sample_to_features_squad(sample=sample,
                                         tokenizer=self.tokenizer,
                                         max_seq_len=self.max_seq_len)
     return features