coreference / layouts /task_layout.html
davidjurgens's picture
Deploy Potato demo: Potato — Coreference
80f50ca verified
Raw
History Blame Contribute Delete
10.9 kB
<!-- CONFIG_HASH: fa1bbc2d9c8ac2c7790e9db00e3c771f_6711ef4d08d103ef7a099d263b60b640 -->
<!-- Generated annotation layout file -->
<!-- This file was automatically generated based on the annotation schemes in your config -->
<!-- You can customize this file to modify the layout of your annotation interface -->
<!-- Changes to this file will be preserved across server restarts -->
<div class="annotation_schema">
<form id="mentions" class="annotation-form span shadcn-span-container" action="javascript:void(0)" data-annotation-id="0" data-grid-columns="1">
<fieldset schema="mentions">
<legend class="shadcn-span-title">Highlight entity mentions in the text</legend>
<div class="shadcn-span-options">
<div class="shadcn-span-option">
<input class="mentions shadcn-span-checkbox"
for_span="true"
type="checkbox"
id="mentions_PERSON"
name="span_label:::mentions"
value="PERSON"
onclick="onlyOne(this); changeSpanLabel(this, 'mentions', 'PERSON', 'PERSON', '(110, 86, 207)', '');"
data-target-field=""
validation="">
<label for="mentions_PERSON" class="shadcn-span-label" data-toggle="tooltip" data-html="true" data-placement="top" title="Person names and pronouns">
<span style="background-color:rgb(110, 86, 207,0.4);">PERSON</span>
</label>
</div>
<div class="shadcn-span-option">
<input class="mentions shadcn-span-checkbox"
for_span="true"
type="checkbox"
id="mentions_ORG"
name="span_label:::mentions"
value="ORG"
onclick="onlyOne(this); changeSpanLabel(this, 'mentions', 'ORG', 'ORG', '(239, 68, 68)', '');"
data-target-field=""
validation="">
<label for="mentions_ORG" class="shadcn-span-label" data-toggle="tooltip" data-html="true" data-placement="top" title="Organization names">
<span style="background-color:rgb(239, 68, 68,0.4);">ORG</span>
</label>
</div>
<div class="shadcn-span-option">
<input class="mentions shadcn-span-checkbox"
for_span="true"
type="checkbox"
id="mentions_LOC"
name="span_label:::mentions"
value="LOC"
onclick="onlyOne(this); changeSpanLabel(this, 'mentions', 'LOC', 'LOC', '(113, 113, 122)', '');"
data-target-field=""
validation="">
<label for="mentions_LOC" class="shadcn-span-label" data-toggle="tooltip" data-html="true" data-placement="top" title="Location names">
<span style="background-color:rgb(113, 113, 122,0.4);">LOC</span>
</label>
</div>
<div class="shadcn-span-option">
<input class="mentions shadcn-span-checkbox"
for_span="true"
type="checkbox"
id="mentions_OTHER"
name="span_label:::mentions"
value="OTHER"
onclick="onlyOne(this); changeSpanLabel(this, 'mentions', 'OTHER', 'OTHER', '(245, 158, 11)', '');"
data-target-field=""
validation="">
<label for="mentions_OTHER" class="shadcn-span-label" data-toggle="tooltip" data-html="true" data-placement="top" title="Other referring expressions">
<span style="background-color:rgb(245, 158, 11,0.4);">OTHER</span>
</label>
</div>
</div></fieldset></form>
<div id="coref_chains" class="coref-container annotation-form"
data-annotation-type="coreference"
data-annotation-id="1"
data-span-schema="mentions"
data-allow-singletons="true"
data-highlight-mode="background"
data-coref-config='{&quot;schemaName&quot;: &quot;coref_chains&quot;, &quot;spanSchema&quot;: &quot;mentions&quot;, &quot;entityTypes&quot;: [&quot;PERSON&quot;, &quot;ORG&quot;, &quot;LOC&quot;, &quot;OTHER&quot;], &quot;allowSingletons&quot;: true, &quot;highlightMode&quot;: &quot;background&quot;, &quot;colors&quot;: [&quot;#6E56CF&quot;, &quot;#EF4444&quot;, &quot;#22C55E&quot;, &quot;#3B82F6&quot;, &quot;#F59E0B&quot;, &quot;#EC4899&quot;, &quot;#06B6D4&quot;, &quot;#F97316&quot;, &quot;#8B5CF6&quot;, &quot;#10B981&quot;, &quot;#DC2626&quot;, &quot;#A855F7&quot;, &quot;#14B8A6&quot;, &quot;#F43F5E&quot;, &quot;#84CC16&quot;]}'>
<div class="coref-header">
<h4 class="coref-title">Group mentions that refer to the same entity into coreference chains</h4>
<span class="coref-chain-count" id="coref_chains_chain_count">0 chains</span>
</div>
<div class="coref-entity-type-selector">
<label class="coref-section-label">Entity Type:</label>
<div class="coref-entity-types">
<div class="coref-entity-type" data-entity-type="PERSON"
data-color="#6E56CF">
<input type="radio" name="coref_chains_entity_type"
id="coref_chains_etype_PERSON"
value="PERSON"
class="coref-entity-type-radio">
<label for="coref_chains_etype_PERSON"
class="coref-entity-type-label"
style="--chain-color: #6E56CF">
<span class="coref-color-indicator" style="background-color: #6E56CF"></span>
<span class="coref-type-name">PERSON</span>
</label>
</div>
<div class="coref-entity-type" data-entity-type="ORG"
data-color="#EF4444">
<input type="radio" name="coref_chains_entity_type"
id="coref_chains_etype_ORG"
value="ORG"
class="coref-entity-type-radio">
<label for="coref_chains_etype_ORG"
class="coref-entity-type-label"
style="--chain-color: #EF4444">
<span class="coref-color-indicator" style="background-color: #EF4444"></span>
<span class="coref-type-name">ORG</span>
</label>
</div>
<div class="coref-entity-type" data-entity-type="LOC"
data-color="#22C55E">
<input type="radio" name="coref_chains_entity_type"
id="coref_chains_etype_LOC"
value="LOC"
class="coref-entity-type-radio">
<label for="coref_chains_etype_LOC"
class="coref-entity-type-label"
style="--chain-color: #22C55E">
<span class="coref-color-indicator" style="background-color: #22C55E"></span>
<span class="coref-type-name">LOC</span>
</label>
</div>
<div class="coref-entity-type" data-entity-type="OTHER"
data-color="#3B82F6">
<input type="radio" name="coref_chains_entity_type"
id="coref_chains_etype_OTHER"
value="OTHER"
class="coref-entity-type-radio">
<label for="coref_chains_etype_OTHER"
class="coref-entity-type-label"
style="--chain-color: #3B82F6">
<span class="coref-color-indicator" style="background-color: #3B82F6"></span>
<span class="coref-type-name">OTHER</span>
</label>
</div>
</div>
</div>
<!-- Chain Actions -->
<div class="coref-actions">
<button type="button" class="coref-btn coref-new-chain-btn"
id="coref_chains_new_chain"
title="Create a new chain from selected mentions">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
New Chain
</button>
<button type="button" class="coref-btn coref-add-to-chain-btn"
id="coref_chains_add_to_chain"
disabled title="Add selected mention to active chain">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path>
<path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
</svg>
Add to Chain
</button>
<button type="button" class="coref-btn coref-merge-btn"
id="coref_chains_merge_chains"
disabled title="Merge selected chains">
Merge Chains
</button>
<button type="button" class="coref-btn coref-remove-btn"
id="coref_chains_remove_mention"
disabled title="Remove selected mention from its chain">
Remove Mention
</button>
</div>
<!-- Chain Panel (sidebar-style list of all chains) -->
<div class="coref-chain-panel" id="coref_chains_chain_panel">
<div class="coref-chain-list" id="coref_chains_chain_list">
<p class="coref-no-chains-message">No coreference chains created yet.
Select spans and click "New Chain" to start.</p>
</div>
</div>
<!-- Hidden input to store chain data for form submission -->
<input type="hidden" name="span_link:::coref_chains"
id="coref_chains_chain_data" value="[]">
</div>
</div>