jieba分词,导入新词库出现的global name f_name is not defined

https://github.com/fxsjy/jieba/pull/257/files

path : /home/yqxu/install/lib/python2.7/site-packages/jieba/__init__.py

在__init__.py中改掉这一行就可以了。

tup = line.split(" ")
    add_word(*tup)
    except Exception as e:
    - logger.debug('%s at line %s %s' % (f_name, lineno, line))
    + logger.debug('%s at line %s %s' % (f.name, line_no, line))
    raise e
   



此外,还要注意,导入的每个词中间都不能由空格分开

你可能感兴趣的:(jieba分词,导入新词库出现的global name f_name is not defined)