From 6c6ffe3a709f7a4dd61e5ba092b2554c859421a4 Mon Sep 17 00:00:00 2001 From: "mb@mb" Date: Mon, 10 Sep 2018 13:49:37 +0200 Subject: [PATCH] removed the 'i feel frustrated' button ...... and more --- templates/base.html | 1 - tfidf.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/templates/base.html b/templates/base.html index 5f70bb1..5879274 100644 --- a/templates/base.html +++ b/templates/base.html @@ -15,7 +15,6 @@ -

Searching through and calculating words of the following txt documents:

diff --git a/tfidf.py b/tfidf.py index 157e561..3d1df81 100644 --- a/tfidf.py +++ b/tfidf.py @@ -125,7 +125,7 @@ def request_results(query): # and shape results object for x, manifesto in results.items(): sents = sentences[manifesto['name']] - value = manifesto['tfidf'] * 10000 + value = manifesto['tfidf'] * 50000 result_sentences = [] count = 0 for s in sents: @@ -135,7 +135,7 @@ def request_results(query): if count < 3: # set to include a max 3 results/manifesto in the results list count += 1 if done is not 'yes': - sentence = s.replace(query, '{}'.format(value, query)) + sentence = s.replace(query, '{}'.format(100 + value, query)) html = Markup(sentence) if count == 3: html = html + Markup('
(...)*
')