Metadata-Version: 2.1
Name: mutual-implication-score
Version: 0.0.0
Summary: Mutual implication score: a symmetric measure of text semantic similarity based on a RoBERTA model pretrained for natural language inference.
Home-page: https://github.com/skoltech-nlp/mutual_implication_score
Author: Nikolai Babakov and David Dale
Author-email: bbk_junior@mail.ru
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown

# 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:
```python
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.


