Ejemplo n.º 1
0
 def preprocessing(self):
     if self.exp_name == 'conll_selection_re':
         self.preprocessor = Conll_selection_preprocessing(self.hyper)
     elif self.exp_name == 'chinese_selection_re':
         self.preprocessor = Chinese_selection_preprocessing(self.hyper)
     elif self.exp_name == 'conll_bert_re':
         self.preprocessor = Conll_bert_preprocessing(self.hyper)
     self.preprocessor.gen_relation_vocab()
     self.preprocessor.gen_all_data()
     self.preprocessor.gen_vocab(min_freq=1)
     # for ner only
     self.preprocessor.gen_bio_vocab()
Ejemplo n.º 2
0
 def preprocessing(self):
     print("=== preprocessing === ")
     if self.exp_name == 'conll_selection_re':
         self.preprocessor = Conll_selection_preprocessing(self.hyper)
         print("self.preprocessor", self.preprocessor)
     elif self.exp_name == 'chinese_selection_re':
         self.preprocessor = Chinese_selection_preprocessing(self.hyper)
     elif self.exp_name == 'conll_bert_re':
         self.preprocessor = Conll_bert_preprocessing(self.hyper)
         print("self.preprocessor", self.preprocessor)
     self.preprocessor.gen_relation_vocab()
     print("call gen_relation_vocab()")
     self.preprocessor.gen_all_data()
     print("call gen_all_data()")
     self.preprocessor.gen_vocab(min_freq=1)
     print("call gen_vocab(min_freq=1)")
     # for ner only
     self.preprocessor.gen_bio_vocab()
     print("call gen_bio_vocab()")
     print("=== End preprocessing === ")