-
Notifications
You must be signed in to change notification settings - Fork 11
/
diagnostic.xsl
81 lines (76 loc) · 2.65 KB
/
diagnostic.xsl
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>MALLET LDA model diagnostics</h2>
<table id="topics">
<tr>
<th>id</th>
<th>tokens</th>
<th>document_entropy</th>
<th>word-length</th>
<th>coherence</th>
<th>uniform_dist</th>
<th>corpus_dist</th>
<th>eff_num_words</th>
<th>token-doc-diff</th>
<th>rank_1_docs</th>
<th>allocation_ratio</th>
<th>allocation_count</th>
</tr>
<xsl:for-each select="model/topic">
<tr>
<td><xsl:value-of select="@id"/></td>
<td><xsl:value-of select="@tokens"/></td>
<td><xsl:value-of select="@document_entropy"/></td>
<td><xsl:value-of select="@word-length"/></td>
<td><xsl:value-of select="@coherence"/></td>
<td><xsl:value-of select="@uniform_dist"/></td>
<td><xsl:value-of select="@corpus_dist"/></td>
<td><xsl:value-of select="@eff_num_words"/></td>
<td><xsl:value-of select="@token-doc-diff"/></td>
<td><xsl:value-of select="@rank_1_docs"/></td>
<td><xsl:value-of select="@allocation_ratio"/></td>
<td><xsl:value-of select="@allocation_count"/></td>
</tr>
</xsl:for-each>
</table>
<xsl:for-each select="model/topic">
<h2>Topic <xsl:value-of select="@id"/></h2>
<table class="topic_words">
<tr>
<th>word</th>
<th>rank</th>
<th>count</th>
<th>prob</th>
<th>cumulative</th>
<th>docs</th>
<th>word-length</th>
<th>coherence</th>
<th>uniform_dist</th>
<th>corpus_dist</th>
<th>token-doc-diff</th>
</tr>
<xsl:for-each select="word">
<tr>
<td><xsl:value-of select="."/></td>
<td><xsl:value-of select="@rank"/></td>
<td><xsl:value-of select="@count"/></td>
<td><xsl:value-of select="@prob"/></td>
<td><xsl:value-of select="@cumulative"/></td>
<td><xsl:value-of select="@docs"/></td>
<td><xsl:value-of select="@word-length"/></td>
<td><xsl:value-of select="@coherence"/></td>
<td><xsl:value-of select="@uniform_dist"/></td>
<td><xsl:value-of select="@corpus_dist"/></td>
<td><xsl:value-of select="@token-doc-diff"/></td>
</tr>
</xsl:for-each>
</table>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>