Skip to main content

[![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.lcs_sequence('中移在线全链路智能化系统研发项目', '中移在线全国智能路由决策项目'))
# 计算编辑距离
print(test.minimumEditDistance('中移在线全链路智能化系统研发项目', '中移在线全国智能路由决策项目'))
# 基于tf-idf计算距离
print(test.splitWordSimlaryty('中移在线全链路智能化系统研发项目', '中移在线全国智能路由决策项目'))
# 计算JaccardSim系数
print(test.JaccardSim('中移在线全链路智能化系统研发项目', '中移在线全国智能路由决策项目'))

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.6.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

TextSimilarScore-0.0.6-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file TextSimilarScore-0.0.6.tar.gz.

File metadata

  • Download URL: TextSimilarScore-0.0.6.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

File hashes

Hashes for TextSimilarScore-0.0.6.tar.gz
Algorithm Hash digest
SHA256 cf050c9651d16596aa94099bf96ddcb7bc6ef6ec4244f09da4c5b95817ac7bef
MD5 b241f0cfda7da6445f00201dfb924277
BLAKE2b-256 11336c190677d60b876e7bb1dfdada74643952605bc4794d31c2d34a7b4ae031

See more details on using hashes here.

File details

Details for the file TextSimilarScore-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: TextSimilarScore-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

File hashes

Hashes for TextSimilarScore-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 89987a7d7d5f250cf52e83f5f51fc88b03df623d1343c21cc2f8bbb81181bcbc
MD5 163e5a91e868c5706a74359ab4571c11
BLAKE2b-256 47e6d5e7d4217847b681c06a492db57e0bd215f1fc3fd7f48eeeec804c1da3ea

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page