Skip to main content

A package for text similarity

Project description

Text-Similarity

Package for texts similarity, based on textdistance

Usage

  1. installation
pip install textsimi
  1. example usage:
from testsimi import textsimilarity as ts
ts.print_all_algorithms()

print(ts.compute_similarity('hello','hi'))

print(ts.top_K_similarity_between_one_mention_and_many_candidates(5,'hi',['hi','hihi','hello',"what's up", 'greetings', 'how are you', 'hallo', 'wie gehts']))


'''
['hamming', 'mlipns', 'levenshtein', 'damerau_levenshtein', 'jaro_winkler', 'strcmp95', 'needleman_wunsch', 'gotoh', 'smith_waterman', 'jaccard', 'sorensen', 'tversky', 'overlap', 'tanimoto', 'cosine', 'monge_elkan', 'bag', 'ratcliff_obershelp', 'arith_ncd', 'rle_ncd', 'bwtrle_ncd', 'sqrt_ncd', 'entropy_ncd', 'bz2_ncd',   'zlib_ncd', 'editex', 'prefix', 'postfix', 'length', 'identity', 'matrix']
Current algorithm is Jaccard({'qval': 1, 'as_set': False, 'external': True})
0.16666666666666666
['hi', 'hihi', 'wie gehts', 'hallo', 'hello']
'''
  1. colab notebook for tf-idf text similarity

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

textsimi-0.4.2.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

textsimi-0.4.2-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file textsimi-0.4.2.tar.gz.

File metadata

  • Download URL: textsimi-0.4.2.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.3

File hashes

Hashes for textsimi-0.4.2.tar.gz
Algorithm Hash digest
SHA256 ed8bc68d050d0f8c7488a0cfbaa33570fea7384c9e0d8c8bffc598b7ccfae11e
MD5 ed3e3715d3a72c9c8aeda5c1a81bb8ba
BLAKE2b-256 14f0df8938f96115f2a50f93a11663103b7374bfc4e2b501202bab80576a7b3b

See more details on using hashes here.

File details

Details for the file textsimi-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: textsimi-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.3

File hashes

Hashes for textsimi-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 003678fc8756a72f2368ca8209b59237a0c627ca92b41f3101fbe135343aba29
MD5 fe2994fef57e951b72e2ddcc507bf431
BLAKE2b-256 a206a48555938be74908c551cee9ac3dab6c9ba0146b1daac8adfe421eaa1729

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page