snownlp
snownlp copied to clipboard
关于sentiment模块的训练
你好,我用自己的语料库(短文本)做sentiment analysis,frequency.py报了如下错 ~\AppData\Local\Continuum\anaconda3\lib\site-packages\snownlp\utils\frequency.py in freq(self, key) 22 23 def freq(self, key): ---> 24 return float(self.get(key)[1])/self.total 25 26 def samples(self):
ZeroDivisionError: float division by zero 这是什么情况呢?
看一下是不是语料里面有空串