<%
//
// 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>