Thanks for this cool job you have done first!
Here I meet a problem when using chinese_nlp.
If I have import jieba in my own code, and then data['text'] = data['text'].apply(chinese_nlp), python will throw an error like followings:
59 if 'jieba' not in sys.modules:
60 jieba = __import__('jieba')
----> 61 return jieba.cut
62
NameError: name 'jieba' is not defined
However if I don't import jieba in my code, the problem won't occur.
Thanks for this cool job you have done first! Here I meet a problem when using
chinese_nlp
. If I haveimport jieba
in my own code, and thendata['text'] = data['text'].apply(chinese_nlp)
, python will throw an error like followings:However if I don't
import jieba
in my code, the problem won't occur.Your Environment