kiwirafe / xiangshi Goto Github PK
View Code? Open in Web Editor NEW中文文本相似度计算器
License: MIT License
中文文本相似度计算器
License: MIT License
xs.cossim(Input1, Input2)
input1,input2不应该是句子1,句子2 么?
比如:xs.cossim("abc", "xyz")
但是在执行时又被看成了文件?
def GetTF(self, input):
corpus = self.input2list(input) # 在这步要求将input转成list
...
但是在转list时:
def input2list(self, input):
result = []
if self.CheckInputType(input) == "f": # 在这步,如果input是字符串,则被当成了文件
请教一下Input1, Input2,要求的是什么格式?
特别大,几百mb,可以关掉吗
在线文本相似度计算器不可用了,提示“似乎 kiwirafe.com 关闭了连接”
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
import xiangshi as xs
l=xs.cossim(["抄袭", "克隆"])
print(l)
0.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.