compute similar scores of two text
Project description
[![Version][version-badge]][version-link] ![MIT License][license-badge]
compute similar scores of two strings
TextSimilarScore
这是个计算两个短文本相似度的算法
安装方法
pip install TextSimilarScore
pip install -r resuirements.txt
使用方法
import TextSimilarScore.tools.TextSim as ts
test = ts.TextSimilarity('中移在线全链路智能化系统研发项目', '中移在线全国智能路由决策项目')
# 计算连续最长公共子串的距离
print(test.lcs())
# 计算编辑距离
print(test.minimumEditDistance())
# 基于tf-idf计算距离
print(test.splitWordSimlaryty())
# 计算JaccardSim系数
print(test.JaccardSim())
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
TextSimilarScore-0.0.3.tar.gz
(4.2 kB
view hashes)
Built Distribution
Close
Hashes for TextSimilarScore-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 266c64515da8cbb7cb5598c1069daffe3df1e653727bd95f7390b4ce516346dd |
|
MD5 | db16ed12eb179d1ae2af6004a9b2c1f3 |
|
BLAKE2b-256 | 37c8093c0ae2e9d272e5ac6369fc544ed2a40b5a36b42c2d63fd95fed8eb5c7e |