MCPcopy
hub / github.com/fxsjy/jieba / strdecode

Function strdecode

jieba/_compat.py:76–82  ·  view source on GitHub ↗
(sentence)

Source from the content-addressed store, hash-verified

74
75
76def strdecode(sentence):
77 if not isinstance(sentence, text_type):
78 try:
79 sentence = sentence.decode('utf-8')
80 except UnicodeDecodeError:
81 sentence = sentence.decode('gbk', 'ignore')
82 return sentence
83
84
85def resolve_filename(f):

Callers 7

cutMethod · 0.85
add_wordMethod · 0.85
_pcutFunction · 0.85
_pcut_for_searchFunction · 0.85
cutFunction · 0.85
__cut_internalMethod · 0.85
cutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…