-
Notifications
You must be signed in to change notification settings - Fork 10
/
modeling.html
49 lines (46 loc) · 2.47 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
{% 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">Fetched all text files...</span>
</p>
<p>In the meantime you might want to check out some <a href="https://github.com/DARIAH-DE/Topics/tree/master/notebooks">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 like Python makes you more flexible with everything. Experimenting with an example corpus on
<a href="https://mybinder.org/v2/gh/DARIAH-DE/Topics/master?filepath=notebooks%2FIntroducingLda.ipynb">Binder</a> does not require any software on your local machine.</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 href="http://www.cs.columbia.edu/~blei/papers/Blei2012.pdf">David M. Blei</a>
</cite>
</footer>
</blockquote>
</div>
</main>
<script>
function fetchStatus() {
// Fetch current status from modeling process
$.get("{{ url_for('get_status') }}", function (message) {
if (message.includes('Very nice, great success!')) {
// Redirect to the topics overview page if modeling complete
window.location.replace("{{ url_for('overview_topics') }}");
} else if (message.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(message);
};
});
};
// Make every second a status request
const interval = 1000;
// Call the function with interval
setInterval(fetchStatus, interval);
</script>
{% endblock %}