Пример #1
0
 def infer(self, sentence):
     return gen_target(sentence,
                       self.model,
                       self.char2id,
                       self.id2char,
                       self.maxlen,
                       topk=3)
Пример #2
0
 def infer(self, sentence):
     return gen_target(sentence,
                       self.model,
                       self.vocab2id,
                       self.id2vocab,
                       self.maxlen,
                       topk=3)