snownlp
snownlp copied to clipboard
一个Python3.6下引发的内部错误
在Python3.6下提示以下错误:
File "C:\Users\PayneQin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\snownlp\__init__.py", line 42, in tags
tags = tag.tag(words)
File "C:\Users\PayneQin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\snownlp\tag\__init__.py", line 43, in tag
return map(lambda x: x[1], tag_all(words))
File "C:\Users\PayneQin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\snownlp\tag\__init__.py", line 39, in tag_all
return tagger.tag(words)
File "C:\Users\PayneQin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\snownlp\utils\tnt.py", line 147, in tag
now = heapq.nlargest(1, stage, key=lambda x: x[1]+self.geteos(x[0][1]))
UnboundLocalError: local variable 'stage' referenced before assignment
我也遇到了这种情况