Similar sentence prediction
Project description
similar-sentences
Install the package
pip install similar-sentences
from SimilarSentences import SimilarSentences
model = SimilarSentences('model.zip',"predict")
text = 'How are you doing?'
simple = model.predict(text, 2, "simple")
detailed = model.predict(text, 2, "detailed")
print(simple)
print(detailed)
Output looks like,
#simple output
["Did I get that right?", "Hi, how can I help?"]
#detailed output
[[{"sentence": "Did I get that right?", "score": 0.7910412874624612}], [{"sentence": "Hi, how can I help?", "score": 0.7824735035480156}]]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.