Skip to main content

Paraphrasel

PyPI - Python Version PyPI PyPI - License

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
}

Metadata

Release files for paraphrasel 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for paraphrasel 0.0.2
File Size Uploaded
paraphrasel-0.0.2.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for paraphrasel 0.0.2
File Interpreter ABI Platform
paraphrasel-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 15.2 kB

Release files / paraphrasel-0.0.2.tar.gz

Download URL paraphrasel-0.0.2.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ec023bb972622b773d93766de52a8fd564f0cbcb56e2fedd5e2687a150dcbc28
BLAKE2b-256 checksum
How to use checksums
9541f5fff33c345f98fd807d70f8ca801d0c6a1a9eef9b8000fc517e69ce576c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.11

Release files / paraphrasel-0.0.2-py3-none-any.whl

Download URL paraphrasel-0.0.2-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f46d61df7bc80635575a3bcf7f5f33cf545dc7d0d203a028815cbb8142f87600
BLAKE2b-256 checksum
How to use checksums
401d5f8fbd77e02171c1e38366422cc16f1dcd207e5c31fd68a22550aa5c01d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.11

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page