def classify(query,
engine=engine,
threshold=.85,
limit=5):
"""spell out most probable diseases and respective percentages."""
words = preprocess(' '.join(query))
print('understanding {}...'.format(words))
objects = engine.prob_classify(words)
keys = list(objects.samples())
samples = [tuple((key, objects.prob(key))) for key in keys]
return feed_conversation(samples, limit, threshold)
评论列表
文章目录