A package for text similarity
Project description
Text-Similarity
Package for texts similarity, based on textdistance
Usage
- installation
pip install textsimi
- 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']
'''
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)
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed8bc68d050d0f8c7488a0cfbaa33570fea7384c9e0d8c8bffc598b7ccfae11e |
|
MD5 | ed3e3715d3a72c9c8aeda5c1a81bb8ba |
|
BLAKE2b-256 | 14f0df8938f96115f2a50f93a11663103b7374bfc4e2b501202bab80576a7b3b |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 003678fc8756a72f2368ca8209b59237a0c627ca92b41f3101fbe135343aba29 |
|
MD5 | fe2994fef57e951b72e2ddcc507bf431 |
|
BLAKE2b-256 | a206a48555938be74908c551cee9ac3dab6c9ba0146b1daac8adfe421eaa1729 |