Python jieba.setLogLevel() Examples
The following are 1
code examples of jieba.setLogLevel().
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: BibTexEntries.py From CNKI_2_BibTeX with MIT License | 5 votes |
def generateIDInTitleFormat(self, cnkiNetEntry): title = cnkiNetEntry["Title"] title = re.sub(r"[0-9]", "", title) title = re.sub(r"[_,;]", "", title) if self.__isFullEnglish(title): titleWords = title.strip().split(" ") self.ID = "".join(titleWords[0:min(len(titleWords), 4)]) else: jieba.setLogLevel(logging.INFO) title = title.replace(" ", "").replace(u"\u3000", "") titleWords = list(jieba.cut(title)) stringForConvertToPinyin = "".join( titleWords[0:min(len(titleWords), 3)]) self.ID = "".join(pinyin(stringForConvertToPinyin))