mirror of
https://github.com/fxsjy/jieba.git
synced 2025-07-10 00:01:33 +08:00
fix typo in type detection in load_userdict
This commit is contained in:
parent
99d0fb1a8a
commit
5270ed66ff
@ -366,7 +366,7 @@ class Tokenizer(object):
|
|||||||
f = open(f, 'rb')
|
f = open(f, 'rb')
|
||||||
for lineno, ln in enumerate(f, 1):
|
for lineno, ln in enumerate(f, 1):
|
||||||
line = ln.strip()
|
line = ln.strip()
|
||||||
if not isinstance(f, text_type):
|
if not isinstance(line, text_type):
|
||||||
try:
|
try:
|
||||||
line = line.decode('utf-8').lstrip('\ufeff')
|
line = line.decode('utf-8').lstrip('\ufeff')
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user