-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
269 lines (245 loc) · 12.8 KB
/
index.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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Text Comparison Utility</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link rel="stylesheet" href="css/animate.css">
</head>
<body>
<nav class="navbar navbar-inverse navbar-static">
<div class="container">
<div class="col-xs-3">
<div class="navbar-header">
<a class="navbar-brand" href="http://dh.chinese-empires.eu/markus/beta/">MARKUS</a>
</div>
<ul class="nav navbar-nav">
<li class="active">
<a href="#">COMPARATIVUS</a>
</li>
</ul>
</div>
<div class="col-xs-4">
<div class="btn-group btn-group-lg pageButtons">
<button id="visPageButton" type="button" class="btn btn-page">Visualisation</button>
<button id="textPageButton" type="button" class="btn btn-page active">Text</button>
<button id="tablePageButton" type="button" class="btn btn-page">Table</button>
</div>
</div>
<div class="col-xs-5">
<button id="comparisonButton" type="button" class="btn btn-primary btn-lg disabled">
<i id="comparisonButtonIcon" class="glyphicon glyphicon-refresh"></i>
<span id="comparisonButtonText">Compare Texts</span>
</button>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#" id="settingsButton">
<span class="glyphicon glyphicon-cog"></span> Comparison Settings</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container">
<!-- Holds the reset selection button -->
<div id="resetHolder">
<button class="btn btn-info" id="showSelectionSummaryButton">
<span class="glyphicon glyphicon-chevron-down"></span> Show Selection
<span class="badge">0</span>
</button>
<button class="btn btn-danger" id="resetButton">
<span class="glyphicon glyphicon-remove-sign"></span> Reset Selection
</button>
<button class="btn btn-warning" id="saveButton" onclick="comparativus.text.getSaved();">
<span class="glyphicon glyphicon-floppy-disk"></span> Save Selection to MARKUS
</button>
<div id="selectionSummary" style="display:none;">
<div id="selectionOverview">
</div>
</div>
</div>
<!-- Main Content -->
<div class="row">
<!-- Text page -->
<div id="textPage" class="col-xs-12 page active">
<ul id="navTabs" class="nav nav-tabs">
</ul>
<!-- Actual text of the focused text -->
<div id="textContent" class="tab-content">
</div>
</div>
<!-- Results table -->
<div id="tablePage" class="col-xs-12 page" style="display:none;">
<h4>
<i class="glyphicon glyphicon-list-alt"></i> Result Table</h4>
<span>
<b>Similarity scores:</b><br>
<span id="simScore">--</span> <br><b>Matches:</b>
<span id="matchesAmt">--</span>
</span>
<div id="resultHolder" class="panel-body collapse in">
<div>
<a id="downloadTSVButton" class="btn btn-default btn-xs" href="#">
<i class="glyphicon glyphicon-save"></i> Download data as .TSV</a>
<a id="downloadJSONButton" class="btn btn-default btn-xs" href="#">
<i class="glyphicon glyphicon-save"></i> Download data as .JSON</a>
</div>
<br>
<div>
<table id="resultTable" class="table table-striped table-bordered">
<thead>
<tr>
<th>IndexA</th>
<th>IndexB</th>
<th>Length</th>
<th>TextA</th>
<th>TextB</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
</div>
<div id="visualisationPage" class="col-xs-12 page" style="display:none;">
<div class="col-xs-12" id="svgDiv">
<svg width='100%' viewbox="0 0 1280 720" class="svg-canvas" />
</div>
</div>
</div>
</div>
<!-- Comparison settings -->
<div id="settingsHolder" class="col-xs-4" style="display:none;">
<h4>
<i class="glyphicon glyphicon-cog"></i> Comparison Settings</h4>
<div class="panel-body collapse in" id="settingsPanel">
<form class="form-horizontal">
<div class="form-group">
<label class="control-label tight col-sm-6" for="kSize">K-Size:
<a href="#" data-toggle="popover" data-trigger="hover" title="K-Size" data-content="The K-Size is used to determine the smallest meaningful n-gram in a language. For Chinese 4 seems to work, higher values may
be necessary in western languages since content-units are bigger. The tuning of this is a fine art, and should be done with caution. NB: You can crash your computer when setting this to the wrong value.">
<i class="glyphicon glyphicon-info-sign"></i>
</a>
</label>
<div class="col-sm-6">
<input type="number" class="form-control" id="kSize" value="4" onBlur="comparativus.ui.checkKSize(this)">
</div>
</div>
<div class="form-group">
<label class="control-label tight col-sm-6" for="minimumMatchSize">Minimum Match Size:
<a href="#" data-toggle="popover" data-trigger="hover" title="Minimum Match Size" data-content="The minimum match size determines the smallest a match can be to be added to the results. NB: Smaller settings create more results which can make the browser very slow.">
<i class="glyphicon glyphicon-info-sign"></i>
</a>
</label>
<div class="col-sm-6">
<input type="number" class="form-control" id="minimumMatchSize" value="7" onBlur="comparativus.ui.checkMinMatchSize(this)">
</div>
</div>
<div class="form-group">
<label class="control-label tight col-sm-6" for="stripWhiteSpace">Ignore Whitespace:
<a href="#" data-toggle="popover" data-trigger="hover" title="Ignore Whitespace" data-content="This option ignores tabs, newlines and spaces. If they are ignored generally the results are cleaner and more accurate.">
<i class="glyphicon glyphicon-info-sign"></i>
</a>
</label>
<div class="col-sm-6">
<select class="form-control" id="stripWhiteSpace">
<option value="true" selected>Yes, please ignore all whitespace, newlines and tabs. (recommended)</option>
<option value="false">No, keep all whitespace, newlines and tabs.</option>
</select>
</div>
</div>
<div class="form-group">
<label class="control-label tight col-sm-6" for="stripPunctuation">Ignore Punctuation:
<a href="#" data-toggle="popover" data-trigger="hover" title="Ignore Punctuation" data-content="This option igenores all punctuation. Generally this improves the results.">
<i class="glyphicon glyphicon-info-sign"></i>
</a>
</label>
<div class="col-sm-6">
<select class="form-control" id="stripPunctuation">
<option value="true" selected>Yes, please ignore all punctuation. (recommended)</option>
<option value="false">No, keep all punctuation.</option>
</select>
</div>
</div>
</form>
</div>
</div>
<div id="blackout" style="display:none;">
<div id="uploadMenu" class="col-xs-6" style="display:none;">
<div class="row">
<div class="col-xs-12 text-center">
<h4>Choose a method A or B to submit your text</h4>
<br>
</div>
</div>
<div class="row">
<div class="col-xs-4">
<label for="fileUploadInputA">A. Upload at least two
<code>.txt</code> files from your computer:</label>
<input class="form-control" type="file" value="Upload File" id="fileUploadInput" accept=".txt">
<span id="uploadedFiles"></span>
</div>
<div class="col-xs-8">
<label for="fileUploadArea">B. Paste different content in both textfields below:</label><br>
<textarea id="fileUploadAreaA" placeholder="Paste your text here"></textarea>
<textarea id="fileUploadAreaB" placeholder="Paste your text here"></textarea>
</div>
</div>
<div class="row"><br>
<div class="col-xs-12 text-center">
Once you are ready to continue, please press the button below:<br>
<input type="button" id="uploadReady" class="btn btn-primary" value="Ready">
</div>
</div>
</div>
<div id="fileSelectionMenu" class="col-xs-6">
<div class='row'>
<div class='col-xs-4'>
<input id='fileSearch' type='text' placeholder='Search...' class='form-control'>
</div>
<div class='col-xs-4'>
<button id="uploadButton" type="button" class="btn btn-block btn-warning">
<i class="glyphicon glyphicon-cloud-upload"></i> Upload or Paste Text</button>
</div>
<div class='col-xs-4'>
<button id="loadSelectedButton" type="button" class="disabled btn btn-block btn-primary">
<i class="glyphicon glyphicon-download-alt"></i> Load Selected Texts</button>
</div>
</div>
<div id='fileTableHolder'>
<table class="table table-striped table-bordered table-responsive">
<thead>
<th> </th>
<th>Filename</th>
<th>Dynasty</th>
<th>Genre</th>
</thead>
<tbody id="fileSelectionBody"></tbody>
</table>
</div>
</div>
</div>
<!-- Scratch pad, invisible div for text manipulation-->
<div id="scratchpad" style="display:none;"></div>
<!-- Popover div -->
<div id="popover" style="display:none;"></div>
<!-- script includes -->
<script src="js/lib/jquery.min.js"></script>
<script src="js/lib/bootstrap.min.js"></script>
<script src="js/lib/d3.min.js"></script>
<script src="dist/comparativus.min.comp.js?v=5"></script>
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date(); a = s.createElement(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-53293952-3', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>