added the '(...)' sign to result lists
This commit is contained in:
parent
9c69fa4118
commit
8fe9eb912f
@ -53,6 +53,15 @@ h1, h2, h3{
|
||||
.result{
|
||||
margin:10px 0 0 0;
|
||||
}
|
||||
#more{
|
||||
margin:10px 0;
|
||||
}
|
||||
#more-descr{
|
||||
margin:10px 0;
|
||||
}
|
||||
#more sup{
|
||||
color:#800000;
|
||||
}
|
||||
.sentence{
|
||||
margin:10px 0 0 0;
|
||||
}
|
||||
|
@ -23,6 +23,8 @@
|
||||
<li>{{txt}}</li>
|
||||
{% endfor %}
|
||||
<ul>
|
||||
{% block txtlist %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% block results %}
|
||||
{% endblock %}
|
||||
|
@ -1,5 +1,10 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{{query}}{% endblock %}
|
||||
|
||||
{% block txtlist %}
|
||||
<div id="more-descr">[*] The algorithm is asked to not return more than 3 sentences from the same manifesto. There are more sentences that match this search query!</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block results %}
|
||||
<h1>The results for the query "{{query}}" are:</h1>
|
||||
<div id="results">
|
||||
|
2
tfidf.py
2
tfidf.py
@ -137,6 +137,8 @@ def request_results(query):
|
||||
if done is not 'yes':
|
||||
sentence = s.replace(query, '<strong style="font-size:{}px;">{}</strong>'.format(value, query))
|
||||
html = Markup(sentence)
|
||||
if count == 3:
|
||||
html = html + Markup('<div id="more">(...)<sup>*</sup></div>')
|
||||
result_sentences.append(html)
|
||||
done = 'yes'
|
||||
results[x]['sentences'] = result_sentences
|
||||
|
Loading…
Reference in New Issue
Block a user