Skip to main content

Match word semantic similarity

Project description

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", "all", 2)
0.21

Multiple:

>>> from paraphrasel.match import compare_multiple

>>> compare("study", "해요 to do", "all", 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", "all", 2, 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", "all", 2, 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


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.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

paraphrasel-0.0.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file paraphrasel-0.0.1.tar.gz.

File metadata

  • Download URL: paraphrasel-0.0.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.11

File hashes

Hashes for paraphrasel-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0be5c9c9bfa5295d1f794b64c74cb7b1c8d06c2b333ac02a672e01765ffb573b
MD5 67e14c15afa5ecce0340def345aed616
BLAKE2b-256 c0b9e76b33aa776012538358c3fa4487450cf965ec87cf3aeca6fa64b083095c

See more details on using hashes here.

File details

Details for the file paraphrasel-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: paraphrasel-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.11

File hashes

Hashes for paraphrasel-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 03a5dee4532d4b23e28ee149b7de41e310bfd22c84bd95532d9b864cc6d5bd64
MD5 f83b48d2f46b45a8cb050540a95aeff3
BLAKE2b-256 53cd7fc0810449429352b5d6ca9997d682648af319037b87ccc270b7a882a058

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page