semsim
Compare texts easily with semsim Python package!
Features
- Dozens of parameters to be tuned by you for better performance!
- Default values of all the parameters validated on datasets for paraphrase detection task
- 6 different algorithms for efficient syntax tree comparison
- A small pack of standard "built-in" models which can be easily downloaded via
semsimpackage itself - Flexible class taxonomy which you can extend by simply inheriting from one of the model base classes
- Python library
semsimwith command line interface (powered byclick)
Dependencies
- attrs
- click
- networkx
- numpy
- pymorphy2
- scipy
- simple_elmo
- tensorflow
- tensorrt
- textract
- torch
- torch-geometric
- torch-scatter
- torch-sparse
- torchwordemb
- tqdm
- ufal.udpipe
Quick start
To install semsim simply run:
pip install semsim
NOTE: If you encounter problems when installing
semsimpackage, consider first installing some prerequisites in advance:$ pip install torch tensorflow tensorrtThen proceed to installsemsim.
Now you can use semsim CLI tool as follows:
$ semsim first_src.txt second_src.txt -o output.txt
You might want to download standard "built-in" (or we should say "add-on") models for better performance. This can be done by executing the following line:
$ semsim download cbow
for fetching pretrained CBOW embeddings or
$ semsim download -a
for downloading all the add-ons at once in parallel.
More info can be found on the documentation page.
Codestyle linters and test frameworks
This library has been fully checked and tested with the following tools:
- flake8
- mypy
- pydocstyle
- pytest
Interface
CLI interface is described in the examples
section of documentation.
This is how you can use semsim CLI tool:
$ semsim compare first_src.txt second_src.txt -e cbow -k neural -o output.txt --max-out-pairs 200 -v
Authors
Metadata
Release files for semsim 1.1.1
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 |
|---|---|---|---|---|
| semsim-1.1.1.tar.gz | 29.4 kB | Without provenance | Details for semsim-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| semsim-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for semsim-1.1.1-py3-none-any.whl |
Total release size: 63.9 kB
Release files / semsim-1.1.1.tar.gz
| Download URL | semsim-1.1.1.tar.gz |
|---|---|
| Size | 29.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f54318463115d6fcef6e9434cad3f48ef995b68c5969b852e3710c31b92ea6f
|
|
BLAKE2b-256 checksum How to use checksums |
84b4a9dff7c56a7fef02cd95e4f23f373f4f07bd97f0d495c1f2882810a7f944
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / semsim-1.1.1-py3-none-any.whl
| Download URL | semsim-1.1.1-py3-none-any.whl |
|---|---|
| Size | 34.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e37c55e38f72696fd6c4549bfc20baad1cf035d372023d0209270f3dbcebbe27
|
|
BLAKE2b-256 checksum How to use checksums |
6bd778426c1345af25c759ee6cab4c3f52692d36f528b8f019814a3e2f8e77c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Security for semsim 1.1.1
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.