示例#1
0
 def __init__(self):
     super().__init__()
     self.log = Utility.get_logger('aspect_dev')
     self.load_config('aspect_dev')
     # 由于使用了自定义的分词器,所以要在main模块中声明url_tokenizer函数,并且名字必须为url_tokenizer
     self.content_vocab_processor = learn.preprocessing.VocabularyProcessor.restore(
         self.config['vocab_pkl'])
    def __init__(self):
        super().__init__()
        self.load_config('aspect_pro')

        self.reload_model()
        self.log = Utility.get_logger('aspect_pro')
        self.content_vocab_processor = learn.preprocessing.VocabularyProcessor.restore(self.config['vocab_pkl'])