1e0ng / simhash

A Python Implementation of Simhash Algorithm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

处理中文会报错?

sicklife opened this issue · comments

`---------------------------------------------------------------------------
UnicodeDecodeError Traceback (most recent call last)
in ()
----> 1 Simhash(s2)

C:\Users\Administrator\Anaconda2\lib\site-packages\simhash__init__.pyc in init(self, value, f, reg, hashfunc)
47 self.value = value.value
48 elif isinstance(value, basestring):
---> 49 self.build_by_text(unicode(value))
50 elif isinstance(value, collections.Iterable):
51 self.build_by_features(value)

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 4072: ordinal not in range(128)`