def cut_sentences(self, texts):
    if isinstance(texts, str):
        if (not os.path.exists(texts)):
            print('path: {} is not exist !!!'.format(texts))
            sys.exit()
        else:
            _texts = []
            with open(texts, 'r', encoding='utf-8') as f:
                for line in f:
                    _texts.append(line.strip())
            texts = _texts
    texts_cut = [' '.join(jieba.lcut(t)) for t in texts]
    self.idx_2_text = {idx: text for (idx, text) in enumerate(texts)}
    return texts_cut
def cut_sentences(self, texts):
    if isinstance(texts, str):
        if (not os.path.exists(texts)):
            print('path: {} is not exist !!!'.format(texts))
            sys.exit()
        else:
            _texts = []
            with open(texts, 'r', encoding='utf-8') as f:
                for line in f:
                    _texts.append(line.strip())
            texts = _texts
    texts_cut = [' '.join(jieba.lcut(t)) for t in texts]
    self.idx_2_text = {idx: text for (idx, text) in enumerate(texts)}
    return texts_cut