[go: up one dir, main page]

Menu

[r3031]: / mvc / results.html.jsp  Maximize  Restore  History

Download this file

633 lines (595 with data), 31.6 kB

  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
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
<%
//
// Copyright 2004-2019 New Zealand Institute of Language, Brain and Behaviour,
// University of Canterbury
// Written by Robert Fromont - robert.fromont@canterbury.ac.nz
//
// This file is part of LaBB-CAT.
//
// LaBB-CAT is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// LaBB-CAT is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with LaBB-CAT; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
%><%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"
%><%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"
%><%@ taglib prefix="tags" tagdir="/WEB-INF/tags"
%>
<c:if test="${!empty results_text}">
<p>${results_text}<c:if test="${!empty search_time}"> (Search time: ${search_time})</c:if></p>
<form method="POST" name="frm" id="frm">
<p><input type="checkbox" name="chkAllInvisibleTop" id="chkAllInvisibleTop" title="Select all results including those not visible here" checked="checked" >"checkAllIncludingInvisible(this);"/> [select all ${match_count} results]</p>
<table id="results">
<c:if test="${inlineResults}"><c:import url="/mvc/resultsStream_html.jsp" /></c:if>
</table><!-- utterances -->
<p id="moreResults"><span id="resultsLoaded"></span> results shown <a href="javascript:loadNextMatch();" title="Show 20 more results" class="uilink">show 20 more results</a> <a href="javascript:iPageSize=0; loadNextMatch();" title="Show all results" class="uilink">show all remaining <span id="resultsLeft"></span> results</a></p>
<c:if test="${!inlineResults}"><%-- load results dynamically from a javascript stream --%>
<script type="text/javascript">//<![CDATA[
// load results
var iPageSize = 20;
var sLastTranscript = "";
var iNumMatches = ${match_count};
var iMatch = 1;
function loadNextMatch()
{
document.getElementById("processing").style.display="";
$.getJSON('${baseUrl}/result?threadId=${threadId}&n='+(iMatch++), insertMatch);
if (iNumMatches - iMatch <= 0) document.getElementById("moreResults").style.display="none";
}
function noMoreResults()
{
document.getElementById("processing").style.display="none";
}
// insert new transcript/participant header
function insertTranscript(mediaSource, transcriptName, participantName)
{
var results = document.getElementById("results");
var tr = document.createElement("tr");
var td = document.createElement("td");
td.colSpan = 4;
tr.appendChild(td);
var img = document.createElement("img");
img.src = "${baseUrl}/images/"+mediaSource+".png";
img.border = "0";
td.appendChild(img);
var span = document.createElement("span");
span.innerHTML = transcriptName + " - ";
var b = document.createElement("b");
b.innerHTML = participantName + ":";
span.appendChild(b);
td.appendChild(span);
results.appendChild(tr);
}
// insert new match
function insertMatch(data)
{
var match = data.model;
var n = match.n;
var matchId = match.matchId;
if (data.errors.length > 0 || data.errors.size > 0)
{
noMoreResults();
return;
}
var agId = match.graphId;
var threadId = match.threadId;
var firstWordUid = match.firstMatchWordUid;
var transcriptName = match.graphName;
var participantName = match.speakerName
var mediaSource = match.mediaSource
if (sLastTranscript != transcriptName)
{
sLastTranscript = transcriptName;
insertTranscript(mediaSource, transcriptName, participantName);
}
var results = document.getElementById("results");
var tr = document.createElement("tr");
tr.className = "utterance";
var tdHeader = document.createElement("td");
tr.appendChild(tdHeader);
tdHeader.appendChild(document.createTextNode(""+n+"."));
var input = document.createElement("input");
input.type = "checkbox";
input.name = "utterance";
input.checked = "checked";
input. e);};
input.title = "To select individual results, untick 'select all ${match_count} results'";
input.value = matchId;
if (document.getElementById("chkAllInvisibleTop").checked) input.disabled = true;
try { input.id = document.frm.utterance.length; } catch(x) { input.id = 0; }
tdHeader.appendChild(input);
var a = document.createElement("a");
a.href = "transcript?ag_id="+agId+"&threadId="+threadId+"#"+firstWordUid;
a.title = "html";
a.target = transcriptName;
var tdPreText = document.createElement("td");
tdPreText.className = "preceding_context";
tdPreText.appendChild(document.createTextNode(match.pretext));
tr.appendChild(tdPreText);
var tdText = document.createElement("td");
tdText.className = "result_highlight";
var a = document.createElement("a");
a.href = "transcript?ag_id="+agId+"&threadId="+threadId+"#"+firstWordUid;
a.title = "open transcript";
a.target = transcriptName;
a.appendChild(document.createTextNode(match.text));
tdText.appendChild(a);
tr.appendChild(tdText);
var tdPostText = document.createElement("td");
tdPostText.className = "following_context";
tdPostText.appendChild(document.createTextNode(match.posttext));
tr.appendChild(tdPostText);
results.appendChild(tr);
document.getElementById("resultsLoaded").innerHTML = ""+(iMatch-1);
document.getElementById("resultsLeft").innerHTML = ""+(iNumMatches - (iMatch-1));
if (iPageSize != 0) window.scrollBy(0,25);
if (iPageSize == 0 || (iMatch - 1) % iPageSize != 0)
{
loadNextMatch();
}
else
{
document.getElementById("processing").style.display="none";
}
}
// allow shift+click to select a range of results
var iLastClicked = -1;
function chkResult(chk, e)
{
if (iLastClicked != -1 && e.shiftKey)
{
checkRange(iLastClicked, chk.id, chk.checked);
}
iLastClicked = chk.id;
}
// allow shift+click to select a range of layers
var lastClickedLayerId = null;
function chkLayer(layerId, e)
{
var chk = document.getElementById("csv_layer_option_" + layerId);
setVisible("layer_options_" + layerId, chk.checked)
if (lastClickedLayerId && e.shiftKey)
{
checkLayerRange(lastClickedLayerId, layerId, chk.checked);
}
lastClickedLayerId = layerId;
}
// layer IDs
var layerIds = []
<c:forEach items="${csv_layer_options}" var="csv_layer_option">
layerIds.push(${csv_layer_option.layer_id});</c:forEach>
<c:forEach items="${csv_segment_layer_options}" var="csv_layer_option">
layerIds.push(${csv_layer_option.layer_id});</c:forEach>
<c:forEach items="${csv_freeform_layer_options}" var="csv_layer_option">
layerIds.push(${csv_layer_option.layer_id});</c:forEach>
<c:forEach items="${csv_meta_layer_options}" var="csv_layer_option">
layerIds.push(${csv_layer_option.layer_id});</c:forEach>
// checkLayerRange
function checkLayerRange(startLayer, endLayer, checked)
{
var startIndex = layerIds.indexOf(startLayer);
var endIndex = layerIds.indexOf(endLayer);
for (var i = Math.min(startIndex,endIndex); i <= Math.max(startIndex,endIndex); i++)
{
var layerId = layerIds[i];
var chk = document.getElementById("csv_layer_option_" + layerId);
chk.checked = checked;
setVisible("layer_options_" + layerId, chk.checked)
} /// next checkbox
}
//]]></script>
</c:if>
<p><input type="checkbox" name="chkAllInvisibleBottom" id="chkAllInvisibleBottom" title="Select all results including those not visible here" checked="checked" >"checkAllIncludingInvisible(this);"/> [select all ${match_count} results]</p>
<script type="text/javascript">//<![CDATA[
// checkAll
function checkAllIncludingInvisible(chk)
{
var i;
for (i = 0; i < document.frm.utterance.length; i++)
{
document.frm.utterance[i].checked = chk.checked;
document.frm.utterance[i].disabled = chk.checked;
} /// next checkbox
document.frm.chkAllInvisibleTop.checked = chk.checked;
document.frm.chkAllInvisibleBottom.checked = chk.checked;
}
// checkAll
function checkAll(chk)
{
var i;
for (i = 0; i < document.frm.utterance.length; i++)
{
document.frm.utterance[i].checked = chk.checked;
document.frm.utterance[i].disabled = false;
} /// next checkbox
document.frm.chkAllInvisibleTop.checked = false;
document.frm.chkAllInvisibleBottom.checked = false;
}
// checkRange
function checkRange(start, end, checked)
{
var i;
for (i = Math.min(start,end); i <= Math.max(start,end); i++)
{
document.frm.utterance[i].checked = checked;
document.frm.utterance[i].disabled = false;
} /// next checkbox
document.frm.chkAllInvisibleTop.checked = false;
document.frm.chkAllInvisibleBottom.checked = false;
}
//]]></script>
<p>
<tags:button
id="btnCsvExport"
text="CSV export"
title="Export results to Excel (CSV)"
icon="images/csv.png"
>"document.frm.action='resultsStream'; document.frm.todo.value='csv'; document.frm.submit();"/>
<a title="click to show or hide spreadsheet options"
class="uilink"
href="javascript:showHide('csv_options');">options</a></p>
<input type="hidden" name="collection_name" value="${search_description}"/>
<input type="hidden" name="zeropad" value="${zeropad}"/>
<input type="hidden" name="todo" value=""/>
<div id="csv_options" style="display: none;">
<table width="100%"><tr><td valign="top" colspan="3">
CSV field delimiter:
<select name="csvFieldDelimiter">
<option value=","<c:if test="${csvFieldDelimiter eq ','}"> selected="selected"</c:if>>comma [,]</option>
<option value=";"<c:if test="${csvFieldDelimiter eq ';'}"> selected="selected"</c:if>>semicolon [;]</option>
<option value=" "<c:if test="${csvFieldDelimiter eq ' '}"> selected="selected"</c:if>>tab</option>
</select>
</td></tr><tr><td valign="top">
Fields to include in the spreadsheet:
<input type="hidden" name="threadId" value="${threadId}"/>
<br/><input type="checkbox" name="csv_option" class="match_data" value="collection_name" id="collection_name" checked="checked" /><label for="collection_name" title="Identifier for this search">Search name</label>
<br/><input type="checkbox" name="csv_option" class="match_data" value="result_number" id="result_number" checked="checked"/><label for="result_number" title="Result number">Number</label>
<br/><input type="checkbox" name="csv_option" class="match_data" value="transcript_name" id="transcript_name" checked="checked"/><label for="transcript_name" title="Name of the transcript">Transcript</label>
<br/><input type="checkbox" name="csv_option" class="match_data" value="series_offset" id="series_offset" /><label for="series_offset" title="Start time of the transcript relative to the beginning of the whole series">Series offset</label>
<br/><input type="checkbox" name="csv_option" class="match_data" value="series_length" id="series_length" /><label for="series_length" title="End time of the transcript relative to the beginning of the whole series">Series length</label>
<br/><input type="checkbox" name="csv_option" class="match_data" value="line_time" id="line_time" checked="checked"/><label for="line_time" title="Start time of the utterance relative to the beginning of the transcript">Line</label>
<br/><input type="checkbox" name="csv_option" class="match_data" value="line_end_time" id="line_end_time" checked="checked"/><label for="line_end_time" title="end time of the utterance relative to the beginning of the transcript">Line End</label>
<br/><input type="checkbox" name="csv_option" class="match_data" value="match" id="match" checked="checked"/><label for="match" title="Unique identifier for the match">Match ID</label>
<c:if test="${targetLayer.scopeString ne 'W'}"><br/><input type="checkbox" name="csv_option" class="match_data" value="target" id="target" checked="checked"/><label for="target" title="Unique identifier for the targeted annotation">Target ID</label></c:if>
<br/><input type="checkbox" name="csv_option" class="match_data" value="word_url" id="word_url" checked="checked"/><label for="word_url" title="URL for the match">URL</label>
<br/><input type="checkbox" name="csv_option" class="match_data" value="corpus" id="corpus" checked="checked"/><label for="corpus" title="Name of the corpus the transcript is in">Corpus</label>
<br/><input type="checkbox" name="csv_option" class="match_data" value="result_text" id="result_text" checked="checked"/><label for="result_text" title="The transcription of the match and its surrounding context">Text</label>
</td><td valign="top">
participant:
<br/><input type="checkbox" name="csv_option" class="participant_attribute" value="speaker_name" checked="checked"/>Name
<c:forEach items="${speaker_attributes}" var="speaker_attribute">
<br/><input
type="checkbox"
name="speaker_attribute" class="participant_attribute"
value="${speaker_attribute.attribute}"
id="participant_${speaker_attribute.attribute}"
${speaker_attribute.speaker_attribute_not_checked}
title="${speaker_attribute.description}"/>
<label for="participant_${speaker_attribute.attribute}">${speaker_attribute.label}</label>
</c:forEach><%-- speaker_attributes --%>
</td><td valign="top">
transcript:
<c:forEach items="${transcript_attributes}" var="transcript_attribute">
<br/><input
type="checkbox"
name="transcript_attribute" class="transcript_attribute"
value="${transcript_attribute.attribute}"
id="transcript_${transcript_attribute.attribute}"
${transcript_attribute.transcript_attribute_not_checked}
title="${transcript_attribute.description}"/>
<label for="transcript_${transcript_attribute.attribute}">${transcript_attribute.label}</label>
</c:forEach><%-- transcript_attributes --%>
</td><td class="csv_export_layer">
word layer:
<c:forEach items="${csv_layer_options}" var="csv_layer_option">
<br/><span title="${csv_layer_option.description}">
<input
type="checkbox"
name="csv_layer_option" class="layer"
id="csv_layer_option_${csv_layer_option.layer_id}"
value="${csv_layer_option.layer_id}"
<c:if test="${csv_layer_option.checked}">checked="checked"</c:if>
class="w"> event);"
/>
<span id="layer_options_${csv_layer_option.layer_id}">
<c:if test="${targetLayer.id != csv_layer_option.layer_id}">
<c:if test="${targetLayer.scopeString ne 'S'}">
<input type="text" size="1" name="include_count_${csv_layer_option.layer_id}" id="include_count_${csv_layer_option.layer_id}"
value="1" class="numeric"
title="How many linked annotations to export"/>
</c:if>
<c:if test="${targetLayer.scopeString eq 'S'}">
<%-- A segment can only be contained by one word --%>
<input type="hidden" name="include_count_${csv_layer_option.layer_id}" value="1"/>
</c:if>
</c:if>
</span>
<script type="text/javascript">//<![CDATA[
// Set visibility of options
setVisible('layer_options_${csv_layer_option.layer_id}', ${csv_layer_option.checked});
//]]></script>
<label for="csv_layer_option_${csv_layer_option.layer_id}">${csv_layer_option.short_description}</label>
</span></c:forEach><%-- csv_layer_options --%>
<br/>segment layer:
<c:forEach items="${csv_segment_layer_options}" var="csv_layer_option">
<br/><span title="${csv_layer_option.description}">
<input
type="checkbox"
name="csv_segment_layer_option"
id="csv_layer_option_${csv_layer_option.layer_id}"
value="${csv_layer_option.layer_id}"
<c:if test="${csv_layer_option.checked}">checked="checked"</c:if>
class="w"> event);"
/>
<span id="layer_options_${csv_layer_option.layer_id}">
<c:if test="${targetLayer.id != csv_layer_option.layer_id}">
<input type="text" size="1" name="include_count_${csv_layer_option.layer_id}" id="include_count_${csv_layer_option.layer_id}"
value="1" class="numeric"
title="How many linked annotations to export"/>
<select name="include_order_${csv_layer_option.layer_id}">
<option>first</option>
<option>last</option>
</select>
</c:if>
</span>
<script type="text/javascript">//<![CDATA[
// Set visibility of options
setVisible('layer_options_${csv_layer_option.layer_id}', ${csv_layer_option.checked});
//]]></script>
<label for="csv_layer_option_${csv_layer_option.layer_id}">${csv_layer_option.short_description}</label>
</span></c:forEach><%-- csv_segment_layer_options --%>
<br/>free-form layer:
<c:forEach items="${csv_freeform_layer_options}" var="csv_layer_option">
<br/><span title="${csv_layer_option.description}">
<input
type="checkbox"
name="csv_freeform_layer_option"
id="csv_layer_option_${csv_layer_option.layer_id}"
value="${csv_layer_option.layer_id}"
<c:if test="${csv_layer_option.checked}">checked="checked"</c:if>
class="w"> event);"
/>
<span id="layer_options_${csv_layer_option.layer_id}">
<c:if test="${targetLayer.id != csv_layer_option.layer_id}">
<input type="text" size="1" name="include_count_${csv_layer_option.layer_id}" id="include_count_${csv_layer_option.layer_id}"
value="1" class="numeric"
title="How many linked annotations to export"/>
<c:if test="${targetLayer.scopeString eq 'F'}">
<%-- a freeform-annotation may contain or be contained by other freeform-annotations --%>
<select name="relationship_${csv_layer_option.layer_id}">
<option value="subordinate">contained</option>
<option value="dominant">containing</option>
</select>
</c:if>
</c:if>
</span>
<script type="text/javascript">//<![CDATA[
// Set visibility of options
setVisible('layer_options_${csv_layer_option.layer_id}', ${csv_layer_option.checked});
//]]></script>
<label for="csv_layer_option_${csv_layer_option.layer_id}">${csv_layer_option.short_description}</label>
</span></c:forEach><%-- csv_segment_layer_options --%>
<br/>meta-data layer:
<c:forEach items="${csv_meta_layer_options}" var="csv_layer_option">
<br/><span title="${csv_layer_option.description}">
<input
type="checkbox"
name="csv_meta_layer_option"
id="csv_layer_option_${csv_layer_option.layer_id}"
value="${csv_layer_option.layer_id}"
<c:if test="${csv_layer_option.checked}">checked="checked"</c:if>
class="w"> event);"
/>
<span id="layer_options_${csv_layer_option.layer_id}">
<c:if test="${targetLayer.id != csv_layer_option.layer_id}">
<span id="span_share_start_${csv_layer_option.layer_id}"
class="export_anchor_<c:choose><c:when test="${csv_layer_option.anchored}">start</c:when><c:otherwise>none</c:otherwise></c:choose>"
title="an annotation that starts when the target starts">
<input
type="checkbox"
name="share_start_${csv_layer_option.layer_id}" id="share_start_${csv_layer_option.layer_id}"
value="${csv_layer_option.layer_id}"
>"document.getElementById('span_share_start_${csv_layer_option.layer_id}').className = (this.checked?'export_anchor_start':'export_anchor_none');"
<c:if test="${csv_layer_option.anchored}">checked="checked"</c:if>
/>
shares start
</span>
<input type="text" size="1" name="include_count_${csv_layer_option.layer_id}" id="include_count_${csv_layer_option.layer_id}"
value="${csv_layer_option.include_count}" class="numeric"
title="How many linked annotations to export"/>
<span id="span_share_end_${csv_layer_option.layer_id}"
class="export_anchor_<c:choose><c:when test="${csv_layer_option.anchored}">end</c:when><c:otherwise>none</c:otherwise></c:choose>"
title="an annotation that ends when the target ends">
shares end
<input
type="checkbox"
name="share_end_${csv_layer_option.layer_id}"
id="share_end_${csv_layer_option.layer_id}"
value="${csv_layer_option.layer_id}"
>"document.getElementById('span_share_end_${csv_layer_option.layer_id}').className = (this.checked?'export_anchor_end':'export_anchor_none');"
<c:if test="${csv_layer_option.anchored}">checked="checked"</c:if>
/>
</span>
<c:if test="${targetLayer.scopeString eq 'M'}">
<%-- a meta-annotation may contain or be contained by other meta-annotations --%>
<select name="relationship_${csv_layer_option.layer_id}">
<option value="subordinate">contained</option>
<option value="dominant">containing</option>
</select>
</c:if>
</c:if>
</span>
<script type="text/javascript">//<![CDATA[
// Set visibility of options
setVisible('layer_options_${csv_layer_option.layer_id}', ${csv_layer_option.checked});
//]]></script>
<label for="csv_layer_option_${csv_layer_option.layer_id}">${csv_layer_option.short_description}</label>
</span></c:forEach><%-- csv_segment_layer_options --%>
</td></tr></table>
</div>
<p>
<tags:button
id="btnExtractAudio"
text="extract audio"
title="Extract Audio"
icon="images/soundsplitter.gif"
>"document.frm.action='soundfragment'; document.frm.submit();"/>
</p>
<c:if test="${labbcat.systemAttributes['EMU-webApp'] == '1'}">
<p>
<tags:button
id="btnEmuWebApp"
text="EMU webApp"
title="Edit utterances in EMU webApp"
icon="images/emu.png"
>"emuWebApp(); return false;"/>
<a title="click to show or hide layer option"
href="javascript:showHide('emu_layer_selection');"
class="uilink">layer selection</a>
</p>
<div id="emu_layer_selection" style="display: none; margin-left: 1cm;">
Layers to show in the EMU webApp:
<tags:selectlayers
namePrefix="emu_"
horizontal="true"
layerWhere="scope <> 'F' AND scope <> 'M'"
selectedLayers="${emu_default_layers}"/>
</div>
</c:if>
<table><tbody>
<c:if test="${!empty binary_layer_options}">
<tr>
<td><select id="blob_layer_id" name="blob_layer_id">
<c:forEach var="layer" items="${binary_layer_options}">
<option value="${layer.layer_id}">${layer.short_description}</option></c:forEach>
</select>
</td>
<td>
<tags:button
id="btnBlob" text="extract" title="Extract Data"
icon="images/blob.png"
>"document.frm.action='annotationdata'; document.frm.submit();"/>
</td>
</tr>
</c:if>
<tr>
<td><select id="mimetype" name="mimetype" >"showIcon();">
<c:forEach var="serializer" items="${serializers}">
<option value="${serializer.value}"
<c:if test="${serializer.value eq mimetype}">selected="selected"</c:if>
>${serializer.key}</option></c:forEach>
</select>
</td>
<td>
<tags:button
id="btnConvert"
text="convert"
title="Convert"
icon="${baseUrl}/converters/converter.png"
>"document.frm.action='results'; document.frm.todo.value='convert'; document.frm.submit();"/>
</td>
</tr>
</tbody></table>
<p><a title="click to show or hide more options" href="javascript:showHide('more');" class="uilink">more</a></p>
<div id="more" <c:if test="${!param['more']}">style="display: none;"</c:if>>
<input type="hidden" name="generate_layer_id" value=""/>
<c:forEach var="layer" items="${utterance_generable_layers}">
<p><tags:button
id="btn${layer.layer_id}"
text="Generate <q>${layer.short_description}</q>"
title="Generate layer '${layer.short_description}' using '${layer.layer_manager}'"
icon="images/cog.png"
>"document.getElementById('frm').action='generateLayerUtterances'; document.getElementById('frm').target=''; document.getElementById('frm').generate_layer_id.value='${layer.layer_id}'; document.getElementById('frm').todo.value='generate'; document.getElementById('frm').submit(); return false;"/></p>
</c:forEach>
<p><tags:button
id="btnDictionary"
text="dictionary"
title="Create Dictionary"
icon="images/dictionary.png"
>"document.frm.action='results'; document.frm.todo.value='dictionary'; document.frm.submit();"/>
<a title="click to show or hide layer option"
href="javascript:showHide('layer_selection');"
class="uilink">layer selection</a></p>
<div id="layer_selection" style="display: none; margin-left: 1cm;">
Layer to use for dictionary definitions:
<c:forEach items="${transcript_layers}" var="transcript_layer"><br/><input type="radio" id="layer_id_${transcript_layer.layer_id}" name="layer_id" value="${transcript_layer.layer_id}" ${transcript_layer.layer_not_checked}/>${transcript_layer.short_description}
<c:if test="${transcript_layer.type eq 'D'}"> - Phoneme Conversion:
<input type="radio" name="phone_format_${transcript_layer.layer_id}"
value="" checked="checked" title="No conversion of phonemes"
>"document.getElementById('layer_id_${transcript_layer.layer_id}').checked = true;">As-is</input>
<input type="radio" name="phone_format_${transcript_layer.layer_id}"
value="HTK" title="Convert phonemes for HTK"
>"document.getElementById('layer_id_${transcript_layer.layer_id}').checked = true;">HTK</input>
<input type="radio" name="phone_format_${transcript_layer.layer_id}"
value="CMU" title="Convert phonemes for CMU Sphinx"
>"document.getElementById('layer_id_${transcript_layer.layer_id}').checked = true;">CMU</input>
<input type="radio" name="phone_format_${transcript_layer.layer_id}"
value="ARPAbet" title="Convert phonemes using ARPAbet"
>"document.getElementById('layer_id_${transcript_layer.layer_id}').checked = true;">ARPAbet</input>
<input type="radio" name="phone_format_${transcript_layer.layer_id}"
value="PhoNZE" title="Convert phonemes using PhoNZE"
>"document.getElementById('layer_id_${transcript_layer.layer_id}').checked = true;">PhoNZE</input>
<input type="radio" name="phone_format_${transcript_layer.layer_id}"
value="UTF8IPA" title="Convert phonemes using IPA"
>"document.getElementById('layer_id_${transcript_layer.layer_id}').checked = true;">IPA</input>
<input type="radio" name="phone_format_${transcript_layer.layer_id}"
value="DelimitedUTF8IPA" title="Convert phonemes using IPA with a space between each phoneme"
>"document.getElementById('layer_id_${transcript_layer.layer_id}').checked = true;">Space-delimited IPA</input>
</c:if>
</c:forEach>
</div>
</div>
<script type="text/javascript" src="${baseUrl}/js/shiftclickcheckbox.js"></script>
<script type="text/javascript">//<![CDATA[
createShiftClickGroup("match_data");
createShiftClickGroup("participant_attribute");
createShiftClickGroup("transcript_attribute");
//]]></script>
<script type="text/javascript">//<![CDATA[
// checkAll
function showIcon()
{
var icon = $("#mimetype").val().replace(/[/+]/g,"-") + ".png";
if (icon == ".png") icon = "converter.png";
$("#btnConvert_icon").attr("src", "${baseUrl}/converters/" + icon);
}
showIcon();
//]]></script>
</form>
<script type="text/javascript">//<![CDATA[
// Emu WebApp
function emuWebApp() {
var serverUrl = "${fn:replace(fn:replace(baseUrl, 'http:','ws:'), 'https:','wss:')}/emu";
var sep = "?"
$("input[name=utterance]:checked:not(:disabled)").each(function(i) {
serverUrl+= sep+"id="+$(this).val().replace(/;[^;=]*=[^;=]*/g,"");
sep = "&";
});
if (!serverUrl.includes("?")) {
// no selected utterances means all utterances
serverUrl+= "?threadId=${threadId}";
}
$("input[name=emu_layer_id]:checked").each(function(i) {
serverUrl+= "&layer="+$(this).attr("data-name");
});
console.log(serverUrl);
window.open('${baseUrl}/EMU-webApp/app?autoConnect=true&serverUrl='+encodeURIComponent(serverUrl), 'EMU-webApp', config='height=600,width=1200,toolbar=yes,scrollbars=yes,resizable=yes,directories=yes,status=yes').focus();
}
//]]></script>
<!--
Search Log:
${search_log}
-->
</c:if><%-- transcript_results --%>
<c:if test="${!empty convertThreadId}">
<tags:threadprogress threadId="${convertThreadId}"/>
</c:if>