=============
Uses cosine similarity to give a numerical evaluation of the similarity of two
texts (0 to 1).
This code has a companion blog-post here:
http://engineering.aweber.com/cosine-similarity/
Sample Usage
------------
```python
In [1]: from vectorizer import compare_texts
In [2]: compare_texts('Mary had a little shotgun.', 'Mary loves her shotgun')
Out[2]: 0.66666666666666663
In [3]: compare_texts('John loves Mary.', 'But Mary has a shotgun.')
Out[3]: 0.33333333333333331
```
The higher score in `2` implies that the first two sentences are more similar
than the second two. A classic tale of the love-linked-list.
Metadata
Release files for text_comparer 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| text_comparer-0.0.2.tar.gz | 2.6 kB | Without provenance | Details for text_comparer-0.0.2.tar.gz |
Release files / text_comparer-0.0.2.tar.gz
| Download URL | text_comparer-0.0.2.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9bc15c52c880b0f4d6367d226fc1005a6aefb022b723827080105ddcb0d3eb0d
|
|
BLAKE2b-256 checksum How to use checksums |
4cdc1404fda79c05f8aa2180e003a36859cdacb2c68b85465acf33abd9d97fd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for text_comparer 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.