Python jieba.del_word() Examples
The following are 1
code examples of jieba.del_word().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
jieba
, or try the search function
.
Example #1
Source File: data_loader.py From Agriculture_KnowledgeGraph with GNU General Public License v3.0 | 5 votes |
def sentence_segmentation(self, sentence, entity1, entity2): jieba.add_word(entity1, freq=999999) jieba.add_word(entity2, freq=999999) seglist = list(jieba.cut(sentence, cut_all=False, HMM=False)) jieba.del_word(entity1) jieba.del_word(entity2) return seglist