Skip to content

Commit

Permalink
Release v0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
severinsimmler committed Apr 28, 2018
2 parents 39d6b9d + ede7da9 commit f08a2ac
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion application/modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def workflow(tempdir, archive_dir):
cleaning = "removed the <b>{0} most frequent words</b>, based on a threshold".format(len(stopwords))
except KeyError:
stopwords = user_input['stopwords'].read().decode('utf-8')
stopwords = dariah_topics.preprocessing.tokenize(stopwords)
stopwords = list(dariah_topics.preprocessing.tokenize(stopwords))
cleaning = "removed the <b>{0} most frequent words</b>, based on an external stopwords list".format(len(stopwords))
hapax_legomena = dariah_topics.preprocessing.find_hapax_legomena(document_term_matrix)
features = set(stopwords).union(hapax_legomena)
Expand Down
26 changes: 12 additions & 14 deletions application/templates/model.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,37 +62,35 @@ <h3>2.2. Topics and Documents</h3>
<h3>2.3. Distribution of Topics</h3>
<p>In the following graphic you can access <i>one</i> dimension of the information displayed in the heatmap above. This might be a more clear approach, if you are interested in a specific topic, or, more precisely, how the topic is distributed over the documents of your corpus. You can use the widget to select a specific topic.
</p>
<div class="bars">
{{ topics_div|safe }}
<br>
<div class="alert alert-success">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<b>FYI:</b> The proportions you can see here by default are those of the first topic: <b>{{ first_topic|safe }}</b>. But you can of course take a closer look at each topic by using the widget.
</div>
{% if autocomplete_warning_t|safe == "include" %}
<div class="alert alert-danger">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<b>Watch out!</b> The autocompletion is still a bit buggy and <b>serves more as a writing aid</b>. If you click on the suggestion, not much happens yet. However, the text field must contain the complete name and <b>you have to press enter</b>, otherwise it will not work. Sorry. But we're working on it.
</div>
{% endif %}
<div class="alert alert-success">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<b>FYI:</b> The proportions you can see here by default are those of the first topic: <b>{{ first_topic|safe }}</b>. But you can of course take a closer look at each topic by using the widget.
</div>
<div class="bars">
{{ topics_div|safe }}
<br>
</div>
<h3>2.4. Distribution of Documents</h3>
<p>Similar to the above barchart, you can access the <i>other</i> dimension displayed in the heatmap. So, if you are intereseted in a specific <i>document</i>, you have the ability to select it via the widget and inspect its proportions.
</p>
<div class="bar">
{{ documents_div|safe }}
<br>
<div class="alert alert-success">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<b>FYI:</b> The proportions you can see here by default are those of the first document: <b>{{ first_document|safe }}</b>. Here you can also have a closer look at the distribution of the topics for each document using the widget.
</div>
{% if autocomplete_warning_d|safe == "include" %}
<div class="alert alert-danger">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<b>Watch out!</b> The autocompletion is still a bit buggy and <b>serves more as a writing aid</b>. If you click on the suggestion, not much happens yet. However, the text field must contain the complete name and <b>you have to press enter</b>, otherwise it will not work. Sorry. But we're working on it.
</div>
{% endif %}
<div class="alert alert-success">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<b>FYI:</b> The proportions you can see here by default are those of the first document: <b>{{ first_document|safe }}</b>. Here you can also have a closer look at the distribution of the topics for each document using the widget.
</div>
<div class="bar">
{{ documents_div|safe }}
<br>
</div>
<h2>2. Delving Deeper into Topic Modeling</h2>
Expand Down
1 change: 0 additions & 1 deletion application/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def model():
Loads the dumped data, deletes the temporary data, and renders the model page.
"""
data = application.utils.load_data(TEMPDIR)
shutil.rmtree(TEMPDIR) # Removing the tempdir
return flask.render_template('model.html', **data)


Expand Down

0 comments on commit f08a2ac

Please sign in to comment.