/
modeling.html
52 lines (50 loc) · 2.89 KB
/
modeling.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{% extends "base.html" %}
{% block main %}
<main class="main">
<div class="main_content">
<h1>This may take a while...</h1>
<p>How long this process takes depends on the size of the corpus and the number of iterations. This can range from a
few seconds to several hours.</p>
<p class="main_notice -big">
<img class="dariah-flower" src="{{url_for('static', filename='img/logos/dariah-rotate.gif')}}">
<span class="modeling-status" id="status">Processing text files...</span>
</p>
<p>In the meantime you might want to check out some <a onclick="window.open('https://github.com/DARIAH-DE/Topics/tree/master/notebooks', 'Topics/notebooks at master · DARIAH-DE/Topics', 'location=yes,height=550,width=1120,scrollbars=yes,status=yes');"
href="#">Jupyter notebooks</a>. These are suitable for beginners as well as for advanced users of the programming
language Python.
Doing topic modeling in a programming language makes you a little bit more flexible with everything. You can
experiment with an example corpus directly in the browser on <a onclick="window.open('https://mybinder.org/v2/gh/DARIAH-DE/Topics/master?filepath=notebooks%2FIntroducingLda.ipynb', 'Topic Modeling', 'location=yes,height=550,width=1120,scrollbars=yes,status=yes');"
href="#">Binder</a>
without installing anything.</p>
<blockquote>With recent scientific advances in support of unsupervised machine learning topic models promise to be an
important component for summarizing and understanding our growing digitized archive of information.<footer>
<cite>
<a onclick="window.open('http://www.cs.columbia.edu/~blei/papers/Blei2012.pdf', 'David M. Blei: Probabilistic Topic Models', 'location=yes,height=550,width=1120,scrollbars=yes,status=yes');"
href="#">David M. Blei</a>
</cite>
</footer>
</blockquote>
</div>
</main>
<script>
function fetchStatus() {
// Fetch current status from modeling process
$.get("{{ url_for('get_status') }}", function (data) {
if (data.includes("Very nice, great success!")) {
// Redirect to the topics overview page if modeling complete
window.location.replace("{{ url_for('overview_topics') }}");
} else if (data.includes("Redirect to error page.")) {
// Redirect to the error page if something went wrong
window.location.replace("{{ url_for('error') }}");
} else {
// Or print current status to user interface
$("#status").html(data);
}
});
}
// Make every second a status request
const interval = 1000;
// Call the function with interval
setInterval(fetchStatus, interval);
</script>
{% endblock %}