Skip to main content

Similar sentence prediction

Project description

PyPI version

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

similar-sentences-0.7a3.tar.gz (3.5 kB view hashes)

Uploaded Source

Supported by

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