A script to calculate the similarity between two sentences.
- Script uses
Universal Sentence Encoder
by tfhub. - Similarity score ranges from 0-1.
- Higher score means higher similarity.
- Install requirements from
requirements.txt
. - Set your sentences in variables -
sentence1, sentence2
. - run script using -
python tfHub_sentence_similarity.py
.