File size: 10,949 Bytes
80f50ca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!-- 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>