kiwirafe / xiangshi

中文文本相似度计算器
MIT License
111 stars 21 forks source link

ZeroDivisionError: division by zero #4

Open xiran210 opened 1 year ago

xiran210 commented 1 year ago

when i run the code that:

import xiangshi as xs
# Simhash
print(xs.simhash(["-", "-"]))
# Minhash
print(xs.minhash(["-", "-"]))

it will cause errors

File "/home/tuxiaobei/.local/lib/python3.8/site-packages/xiangshi/main.py", line 214, in minhash return intersect / total ZeroDivisionError: division by zero

and i use the xiangshi:4.1.0

kiwirafe commented 1 year ago

Yes I have noticed that error, will fix this as soon as I can and update it in the new version. 发现错误了,将在下个版本中修复。