Match word semantic similarity
Project description
Paraphrasel
Introduction
Find similar word pairs based on semantics. Makes use of sentence transformers.
Installation
Install via pip:
pip install paraphrasel
How to use with Python
Using this as a Python package you can use the following commands:
Single:
>>> from paraphrasel.match import compare
>>> compare("study", "해요 to do", language="all", decimals=2)
0.21
Multiple:
>>> from paraphrasel.match import compare_multiple
>>> compare("study", "해요 to do", language="all", decimals=2)
{
"\ud574\uc694 to do": 0.21,
"\uc9d1 house": 0.23,
"\ub298\ub2e4 to play": 0.28
}
Above Cutoff:
>>> from paraphrasel.match import get_above_cutoff
>>> compare("study", "해요 to do", language="all", decimals=2, cutoff=0.22)
{
"\uc9d1 house": 0.23,
"\ub298\ub2e4 to play": 0.28
}
Best Match:
>>> from paraphrasel.match import get_best_match
>>> compare("study", "해요 to do", language="all", decimals=2, cutoff=0.22)
{
"\ub298\ub2e4 to play": 0.28
}
How to use with CMD/CLI
Using this as a CMD/CLI you can use the following commands:
Single:
$ paraphrasel single study "해요 to do" --language all --decimals 2
0.21
Multiple:
$ paraphrasel multiple study "해요 to do" "집 house" "늘다 to play" --language all --decimals 2
{
"\ud574\uc694 to do": 0.21,
"\uc9d1 house": 0.23,
"\ub298\ub2e4 to play": 0.28
}
Above Cutoff:
$ paraphrasel above-cutoff study "해요 to do" "집 house" "늘다 to play" --language all --decimals 2 --cutoff 0.22
{
"\uc9d1 house": 0.23,
"\ub298\ub2e4 to play": 0.28
}
Best Match:
$ paraphrasel best-match study "해요 to do" "집 house" "늘다 to play" --language all --decimals 2 --cutoff 0.2
{
"\ub298\ub2e4 to play": 0.28
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
paraphrasel-0.0.2.tar.gz
(7.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file paraphrasel-0.0.2.tar.gz.
File metadata
- Download URL: paraphrasel-0.0.2.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec023bb972622b773d93766de52a8fd564f0cbcb56e2fedd5e2687a150dcbc28
|
|
| MD5 |
185cc5f279bb5d33b080fcf82c75a88d
|
|
| BLAKE2b-256 |
9541f5fff33c345f98fd807d70f8ca801d0c6a1a9eef9b8000fc517e69ce576c
|
File details
Details for the file paraphrasel-0.0.2-py3-none-any.whl.
File metadata
- Download URL: paraphrasel-0.0.2-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f46d61df7bc80635575a3bcf7f5f33cf545dc7d0d203a028815cbb8142f87600
|
|
| MD5 |
3e115757a197ca0582c963bb28381b8a
|
|
| BLAKE2b-256 |
401d5f8fbd77e02171c1e38366422cc16f1dcd207e5c31fd68a22550aa5c01d5
|