Skip to main content

mutual_implication_score

Mutual implication score: a symmetric measure of text semantic similarity based on a RoBERTA model pretrained for natural language inference and fine-tuned for paraphrase detection.

The following snippet illustrates code usage:

from mutual_implication_score import MIS
mis = MIS(device='cpu')
source_texts = ['I want to leave this room',
                'Hello world, my name is Nick']
paraphrases = ['I want to go out of this room',
               'Hello world, my surname is Petrov']
scores = mis.compute(source_texts, paraphrases)
print(scores)
# expected output: [0.9748, 0.0545]

The first two texts are semantically equivalent, their MIS is close to 1. The two other texts have different meanings, and their score is low.

By default, the model https://huggingface.co/SkolkovoInstitute/Mutual_Implication_Score is used, but you can provide any other compatible model.

Metadata

Release files for mutual-implication-score 0.0.0

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

Source distribution (sdist)

Source distribution for mutual-implication-score 0.0.0
File Size Uploaded Provenance Actions
mutual_implication_score-0.0.0.tar.gz 3.3 kB Without provenance Details for mutual_implication_score-0.0.0.tar.gz

Release files / mutual_implication_score-0.0.0.tar.gz

Download URL mutual_implication_score-0.0.0.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
512816e65582de6758e2e73b02bdee6324a21cf22a40616210a044e71f63fdc3
BLAKE2b-256 checksum
How to use checksums
37d7b1467f01c33395009a4fcc1743f72daf0f3d837a68a947a8d6660ececbd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.7.4

Security for mutual-implication-score 0.0.0

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.

Release history Release notifications | RSS feed

This release

0.0.0 This release

1 release file No provenance

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