removed the 'i feel frustrated' button ...... and more
This commit is contained in:
parent
59aa39c5ee
commit
6c6ffe3a70
@ -15,7 +15,6 @@
|
||||
<input id="submit" type="submit" value="➜"/>
|
||||
</form>
|
||||
</div>
|
||||
<input id="frustrated" type="button" value="I'm feeling frustrated">
|
||||
<div id="txt-list">
|
||||
<p>Searching through <em>and calculating words of</em> the following txt documents:</p>
|
||||
|
||||
|
4
tfidf.py
4
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, '<strong style="font-size:{}px;">{}</strong>'.format(value, query))
|
||||
sentence = s.replace(query, '<strong style="font-size:{}%;">{}</strong>'.format(100 + value, query))
|
||||
html = Markup(sentence)
|
||||
if count == 3:
|
||||
html = html + Markup('<div id="more">(...)<sup>*</sup></div>')
|
||||
|
Loading…
Reference in New Issue
Block a user