index.xhtml 35.4 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 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795
<!-- -*- Mode: XHTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
<!-- vim:set ft=xhtml ts=2 sw=2 sts=2 autoindent: -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>brat</title>
    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8"/>
    <meta name="google" value="notranslate"/>
    <link href="static/jquery-theme/jquery-ui-redmond.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="client/lib/head.load.min.js"></script>
    <script type="text/javascript">
      head.js(
          // libraries
          'client/lib/jquery.min.js',
          'client/lib/jquery-ui.min.js',
          'client/lib/jquery.svg.min.js',
          'client/lib/jquery.svgdom.min.js',
          'client/lib/jquery.ba-bbq.min.js',
          'client/lib/jquery.sprintf.js',
          'client/lib/jquery.json.min.js',
          'client/lib/webfont.js',
          // brat helpers
          'client/src/configuration.js',      
          'client/src/util.js',
          'client/src/annotation_log.js',
          // brat modules
          'client/src/dispatcher.js',
          'client/src/url_monitor.js',
          'client/src/ajax.js',
          'client/src/visualizer.js',
          'client/src/visualizer_ui.js',
          'client/src/annotator_ui.js',
          'client/src/spinner.js'
      );
      head.ready(function() {
          // var dispatcher = new Dispatcher(); // XXX DEBUG
          dispatcher = new Dispatcher();
          var urlMonitor = new URLMonitor(dispatcher);
          var ajax = new Ajax(dispatcher);
          var visualizer = new Visualizer(dispatcher, 'svg');
          var svg = visualizer.svg;
          var visualizerUI = new VisualizerUI(dispatcher, svg);
          var annotatorUI = new AnnotatorUI(dispatcher, svg);
          var spinner = new Spinner(dispatcher, '#spinner');
          var logger = new AnnotationLog(dispatcher);
          // Util.profileEnable();
          dispatcher.post('init');
      });

    </script>
    <link rel="stylesheet" type="text/css" href="style-vis.css"/>
    <link rel="stylesheet" type="text/css" href="style-ui.css"/>
    <link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
  </head>
  <body>
    <!-- page-centered div following in part Billbad's answer at
         http://stackoverflow.com/questions/396145/whats-the-best-way-of-centering-a-div-vertically-with-css         
      -->
    <div class="center_wrapper" id="no_svg_wrapper">
      <div>
        <div>
          <fieldset id="no_document_message">
            <h1 class="unselectable">No document selected</h1>
            <p class="unselectable">To select a document:</p>
            <ul>
              <li class="unselectable">press the <strong>TAB</strong> key, or</li>
              <li class="unselectable">click on &quot;<strong>Collection</strong>&quot; in the blue menu bar on top</li>
            </ul>
          </fieldset>
          <fieldset id="loading_message" style="display:none">
            <h1 class="unselectable">Loading ...</h1>
            <p class="unselectable">This may take a while, in
              particular when loading a larger document collection.
              Please wait.
            </p>
          </fieldset>
        </div>
      </div>
    </div>
    <div class="center_wrapper" id="no_js_wrapper">
      <div>
        <div>
          <fieldset>
            <h1 class="unselectable">No JavaScript</h1>
            <p class="unselectable">Your browser has JavaScript
              disabled, or does not support it.</p>
            <p class="unselectable">
              <span class="logo">brat</span>
              needs JavaScript in order to run.
            </p>
            <p class="unselectable">Please enable JavaScript or try
              a <a href="http://brat.nlplab.org/supported-browsers.html">supported browser</a>
            </p>
          </fieldset>
        </div>
      </div>
    </div>
    <script>
      var njsw = document.getElementById('no_js_wrapper');
      njsw.parentNode.removeChild(njsw);
    </script>
    <img id="spinner" src="static/img/spinner.gif"/>
    <div id="messagepullup" class="messages" style="display: none"/>
    <div id="messages" class="messages"/>
    <div id="pulluptrigger"/>
    <div id="commentpopup"/>
    <div id="relationspopups"/>
    <div id="header" class="ui-widget">
      <div id="mainHeader" class="ui-widget-header">
        <div id="mainlogo" class="logo unselectable">brat</div>
        <span id="navbuttons">
          <img id="prev" alt="Previous document (Cursor Left)" title="Previous document (Cursor Left)" src="static/img/arrow-180.png"/><img id="next" alt="Next document (Cursor Right)" title="Next document (Cursor Right)" src="static/img/arrow.png"/>
        </span>
        <div id="document_name">
          <input readonly="readonly" class="ui-widget-header"/>
        </div>
        <!-- <span id="document_ctime"/> -->
      </div>
      <div id="pulldown" class="unselectable ui-widget-content">
        <div id="pulldown_padder">
          <div>
            <!-- <input id="auth_button" type="button" value="Login"/> -->
            <input id="collection_browser_button" type="button" value="Collection" tabindex="-1" title="Open Collection Browser (Tab)"/>
            <input id="data_button" type="button" value="Data" tabindex="-1" title="Import, Export Data; Manage Collection"/>
            <input id="search_button" type="checkbox" class="login" value="true" tabindex="-1"/><label id="search_button_label" for="search_button" title="Search text and annotations">Search</label><input id="clear_search_button" type="button" value="x" tabindex="-1" title="Clear search" style="display: none"/>
            <!--<input id="undo_button" type="button" class="login" value="Undo" tabindex="-1"/>-->
            <input id="core_help_button" type="button" value="Corpus tutorial" tabindex="-1" title="Show Corpus Tutorial"/>
            <input id="options_button" type="button" value="Options" tabindex="-1" title="Set Visual, Annotation and Network Options"/>
          </div>
          <!-- Dummy span, fixes visual glitch (issue #535). TODO: better fix -->
          <span class="document_edit_time unselectable">&nbsp;</span>
          <div id="document_mtime" class="document_edit_time unselectable">&nbsp;</div>
          <a id="help_link" target="manual" href="http://brat.nlplab.org/manual.html">Help <img src="static/img/Fugue-shadowless-question.png"/></a>
        </div>
      </div>
    </div>
    <div id="svg"></div>
    <form id="import_form" class="dialog" title="Import">
      <fieldset id="import_form_docid">
        <legend>Document ID</legend>
        <input id="import_docid" class="borderless"/>
      </fieldset>
      <fieldset id="import_form_text">
        <legend>Document text</legend>
        <textarea id="import_text" class="borderless"/>
      </fieldset>
    </form>
    <!-- Data dialog -->
    <form id="data_form" class="dialog" title="Data">
      <!-- Data dialog export section -->
      <fieldset class="small-buttons">
        <legend>Export</legend>
        <div class="optionRow">
          <span id="document_export" class="optionLabel">Document data</span>
          <span id="source_files"/>
        </div>
        <div id="document_visualization" class="optionRow">
          <span class="optionLabel">Visualization</span>
          <span id="stored_file_spinner" class="ui-button ui-widget ui-corner-all ui-state-default ui-button-text-only">
            <span class="ui-button-text">
              <img style="vertical-align:bottom" height="18" 
                   src="static/img/spinner.gif"/>
            </span>
          </span>
          <span id="stored_file_regenerate" title="Regenerate static visualization of the current document">regenerate</span>
          <span id="download_stored"/>
        </div>
        <div class="optionRow">
          <span class="optionLabel">Collection data</span>
          <span id="source_collection" title="Download the entire current collection as a .tar.gz package"/>
        </div>
      </fieldset>
      <!-- Data dialog comparison section -->
      <!-- <fieldset class="small-buttons">
        <legend>Compare</legend>
        <div class="optionRow">
          <span class="optionLabel">Side-by-side</span>
          <span id="side-by-side_cmp" title="Enter side-by-side comparison mode"/>
        </div>
      </fieldset>
      -->
      <!-- Data dialog automatic annotation section -->
      <div id="auto_tagging_login_control" class="login">
        <fieldset id="auto_tagging_fieldset" class="small-buttons">
          <legend>Automatic annotation</legend>
          <div class="optionRow">Automatically tag current document</div>
          <div id="tagger_buttons"/>
        </fieldset>
        <fieldset id="no_tagger_message" style="display:none">
          <legend>Automatic annotation</legend>
          <div style="color:gray; font-size:80%; text-align:center; margin:1em">(No tools set up. Please contact server administrator if needed.)</div>
        </fieldset>
      </div>
      <!-- Data dialog import section -->
      <fieldset class="login small-buttons">
        <legend>Import</legend>
        <div class="optionRow">
          <span class="optionLabel">New document</span>
          <input id="import_button" type="button" class="login ui-button-text" value="Enter text" tabindex="-1" title="Import a new document into the current collection"/>
        </div>
        <div class="optionRow">
          <span class="optionLabel">New collection</span>
          <input id="import_collection_button" type="button" class="login ui-button-text" value="Upload tar.gz" tabindex="-1" title="Import an entire collection into the current installation"/>
        </div>
      </fieldset>
      <!-- Data dialog delete section -->
      <div style="display: none;">
        <fieldset class="login small-buttons">
          <legend>Delete</legend>
          <div class="optionRow">
            <span class="optionLabel">Current document</span>
            <input id="delete_document_button" type="button" class="login ui-button-text" value="Delete document" tabindex="-1" title="Permanently remove the current document and its annotations from the collection."/>
          </div>
          <div class="optionRow">
            <span class="optionLabel">Current collection</span>
            <input id="delete_collection_button" type="button" class="login ui-button-text" value="Delete collection" tabindex="-1" title="Permanently remove the entire current collection and all documents in it."/>
          </div>
        </fieldset>
      </div>
    </form>
    <!-- Options dialog -->
    <form id="options_form" class="dialog" title="Options">
      <fieldset id="options_form_visual">
        <legend>Visual options</legend>
        <div class="optionRow">
          <span class="optionLabel">Abbreviate labels</span>
          <span id="label_abbreviations" class="radio_group small-buttons">
            <input type="radio" id="label_abbreviations_off" value="off"
                   name="label_abbrev_radio"/>
            <label for="label_abbreviations_off"
                   title="Always display full form of labels.">Off</label>
            <input type="radio" id="label_abbreviations_on" value="on" 
                   name="label_abbrev_radio" checked="checked"/>
            <label for="label_abbreviations_on"
                   title="Abbreviate annotation labels in limited space.">On</label>
          </span>
        </div>
        <div class="optionRow">
          <span class="optionLabel">Text background</span>        
          <span id="text_backgrounds" class="radio_group small-buttons">
            <input type="radio" id="text_backgrounds_blank" value="blank" 
                   name="text_background_radio"/>
            <label for="text_backgrounds_blank"
                   title="Blank white text backgrounds.">Blank</label>
            <input type="radio" id="text_backgrounds_striped" value="striped" 
                   name="text_background_radio" checked="checked"/>
            <label for="text_backgrounds_striped"
                   title="Striped text backgrounds with every second sentence on light gray background.">Striped</label>
          </span>
        </div>
        <div class="optionRow">
          <span class="optionLabel">Layout density</span>
          <span id="layout_density" class="radio_group small-buttons">
            <input type="radio" id="layout_density1" value="1" 
                   name="layout_radio"/>
            <label for="layout_density1"
                   title="Dense annotation layout: minimizes space taken by annotations.">Dense</label>
            <input type="radio" id="layout_density2" value="2" 
                   name="layout_radio" checked="checked" />
            <label for="layout_density2"
                   title="Normal annotation layout density: balances between annotation size and readability.">Normal</label>
            <input type="radio" id="layout_density3" value="3" 
                   name="layout_radio"/>
            <label for="layout_density3"
                   title="Spacious annotation layout: allows extra space for annotations to improve readability.">Spacious</label>
          </span>
        </div>
        <div class="optionRow">
          <span class="optionLabel">Visualization width</span>
          <input id="svg_width_value" maxlength="3" size="3" value="100"
                 style="text-align:right"/>
          <span id="svg_width_unit" class="radio_group small-buttons">
            <input type="radio" id="svg_width_unit_percent" value="%" 
                   name="svg_width_radio" checked="checked"/>
            <label for="svg_width_unit_percent">percent</label>
            <input type="radio" id="svg_width_unit_pixels" value="px" 
                   name="svg_width_radio"/>
            <label for="svg_width_unit_pixels">pixels</label>
          </span>
        </div>
      </fieldset>
      <fieldset id="options_form_annotation" class="login">
        <legend>Annotation options</legend>
        <div class="optionRow">
          <span class="optionLabel">Annotation mode</span>
          <span id="annotation_speed" class="radio_group small-buttons">
            <input type="radio" id="annotation_speed1" value="1" 
                   name="annspeed_radio" checked="checked"/>
            <label for="annotation_speed1"
                   title="Careful annotation mode: ask for additional confirmation of annotation changes. Suitable for annotators in training and for mature corpora requiring few changes.">Careful</label>
            <input type="radio" id="annotation_speed2" value="2" 
                   name="annspeed_radio"/>
            <label for="annotation_speed2"
                   title="Normal annotation mode. Suitable for standard annotation processes.">Normal</label>
            <input type="radio" id="annotation_speed3" value="3" 
                   name="annspeed_radio"/>
            <label for="annotation_speed3"
                   title="Rapid annotation mode: activate automatic support for speeding up annotation process. Suitable for experienced annotators performing an established task.">Rapid</label>
            <select id="rapid_model"/>
          </span>
        </div>
      </fieldset>
      <!--
      <fieldset id="options_form_network">
        <legend>Network options</legend>
        <div class="optionRow">
          <span class="optionLabel">Collaboration</span>
          <span class="small-buttons">
            <input id="autorefresh_mode" type="checkbox"/>
            <label for="autorefresh_mode" 
                   title="Toggle the autorefresh mode on/off. When autorefresh is on, the system will periodically check with the server for updates to the document you are working on. This is useful when collaborating on annotation but consumes some resources, so you may wish to turn autorefresh off if there are no simultaneous edits.">Autorefresh</label>
          </span>
        </div>
      </fieldset>
      -->
    </form>
    <!-- More collection information dialog -->
    <form id="more_information_dialog" class="dialog" title="Collection information">
      <fieldset>
        <textarea id="more_info_readme" readonly="readonly" class="borderless"/>
      </fieldset>
    </form>
    <!-- Search dialog -->
    <form id="search_form" class="dialog" title="Search">
      <div id="search_tabs">
        <ul>
          <li><a href="#search_tab_text">Text</a></li>
          <li><a href="#search_tab_entity">Entity</a></li>
          <li><a href="#search_tab_event">Event</a></li>
          <li><a href="#search_tab_relation">Relation</a></li>
          <li><a href="#search_tab_note">Note</a></li>
          <!-- XXX removed per #900
          <li><a href="#search_tab_load">Load</a></li>
          -->
        </ul>
        <div id="search_tab_text">
          <table class="fullwidth">
            <tr>
              <td>Text</td>
              <td>
                <input id="search_form_text_text" class="fullwidth"
                    placeholder="Text to match"/>
              </td>
            </tr>
          </table>
        </div>
        <div id="search_tab_entity">
          <table class="fullwidth">
            <tr>
              <td>Type</td>
              <td>
                <select id="search_form_entity_type"/>
              </td>
            </tr>
            <tr>
              <td>Text</td>
              <td>
                <input id="search_form_entity_text" class="fullwidth"
                    placeholder="Text to match (empty=anything)"/>
              </td>
            </tr>
          </table>
        </div>
        <div id="search_tab_event">
          <table class="fullwidth">
            <tr>
              <td>Type</td>
              <td colspan="3">
                <select id="search_form_event_type"/>
              </td>
            </tr>
            <tr>
              <td>Trigger</td>
              <td colspan="3">
                <input id="search_form_event_trigger" class="fullwidth"
                    placeholder="Text to match (empty=anything)"/>
              </td>
            </tr>
            <tbody id="search_form_event_roles"/>
          </table>
        </div>
        <div id="search_tab_relation">
          <table class="fullwidth">
            <tr>
              <td>Type</td>
              <td colspan="2">
                <select id="search_form_relation_type" class="fullwidth"/>
              </td>
            </tr>
            <tr>
              <td>Arg1</td>
              <td>
                <select id="search_form_relation_arg1_type" class="fullwidth"/>
              </td>
              <td>
                <input id="search_form_relation_arg1_text" class="fullwidth"
                    placeholder="Text to match (empty=anything)"/>
              </td>
            </tr>
            <tr>
              <td>Arg2</td>
              <td>
               <select id="search_form_relation_arg2_type" class="fullwidth"/>
              </td>
              <td>
                <input id="search_form_relation_arg2_text" class="fullwidth"
                    placeholder="Text to match (empty=anything)"/>
              </td>
            </tr>
          </table>
        </div>
        <div id="search_tab_note">
          <table class="fullwidth">
            <tr>
              <td>Category</td>
              <td>
                <select id="search_form_note_category" class="fullwidth">
                  <option value="">- Any -</option>
                  <option value="entity">Entity</option>
                  <option value="event">Event</option>
                  <option value="relation">Relation</option>
                  <option value="sentence">Sentence</option>
                </select>
              </td>
            </tr>
            <tr id="search_form_note_type_row">
              <td>Type</td>
              <td>
                <select id="search_form_note_type" class="fullwidth"/>
              </td>
            </tr>
            <tr>
              <td>Text</td>
              <td>
                <input id="search_form_note_text" class="fullwidth"
                    placeholder="Text to match (empty=anything)"/>
              </td>
            </tr>
          </table>
        </div>
        <!-- XXX removed per #900
        <div id="search_tab_load">
          <table class="fullwidth">
            <tr>
              <td>File:</td>
              <td>
                <input type="file" name="file" id="search_form_load_file" class="fullwidth"/>
                <input type="hidden" name="action" value="searchLoad"/>
              </td>
            </tr>
          </table>
        </div>
        -->
      </div>
      <fieldset id="search_options">
        <legend>Options</legend>
        <a href="" id="advanced_search_option_toggle">Show advanced</a>
        <div class="optionRow">
          <span class="optionLabel">Search in current</span>
          <span id="search_scope" class="radio_group small-buttons">
            <input type="radio" id="search_scope_doc" value="document" 
                   name="search_scope_radio" checked="checked"/>
            <label for="search_scope_doc"
                   title="Search in current document only.">document</label>
            <input type="radio" id="search_scope_coll" value="collection" 
                   name="search_scope_radio"/>
            <label for="search_scope_coll"
                   title="Search in all documents in current collection.">collection</label>
          </span>
        </div>
        <div class="advancedOptions">
        <div class="optionRow">
          <span class="optionLabel">Concordancing</span>
          <span id="concordancing" class="radio_group small-buttons">
            <input type="radio" id="concordancing_off" value="document" 
                   name="concordancing_radio" checked="checked"/>
            <label for="concordancing_off"
                   title="Display matched search results only.">off</label>
            <input type="radio" id="concordancing_on" value="collection" 
                   name="concordancing_radio"/>
            <label for="concordancing_on"
                   title="In addition to search results, display also the text context of the matches in Key Word In Context (KWIC) format.">on</label>
          </span>
        </div>
        <div id="context_size_div" class="optionRow">
          <span class="optionLabel" style="margin-left:1em;">Context length</span> <input id="context_length" maxlength="3" size="3" value="50"/> characters
        </div>
        <div class="optionRow">
          <span class="optionLabel">Match text as</span>
          <span id="text_match" class="radio_group small-buttons">
            <input type="radio" id="text_match_word" value="word" 
                   name="text_match_radio" checked="checked"/>
            <label for="text_match_word"
                   title="Match whole words only.">whole word</label>
            <input type="radio" id="text_match_substr" value="substring" 
                   name="text_match_radio"/>
            <label for="text_match_substr"
                   title="Match any substring.">any substring</label>
            <input type="radio" id="text_match_regex" value="regex" 
                   name="text_match_radio"/>
            <label for="text_match_regex"
                   title="Treat given text as regular expression.">regex</label>
          </span>
        </div>
        <div class="optionRow">
          <span class="optionLabel">Match case</span>
          <span id="match_case" class="radio_group small-buttons">
            <input type="radio" id="match_case_off" value="document" 
                   name="match_case_radio" checked="checked"/>
            <label for="match_case_off"
                   title="Ignore character case in text search ('abc' matches 'ABC')">off</label>
            <input type="radio" id="match_case_on" value="collection" 
                   name="match_case_radio"/>
            <label for="match_case_on"
                   title="Require identical character case in text search ('abc' does not match 'ABC')">on</label>
          </span>
        </div>
        </div>
      </fieldset>
    </form>
    <!-- Span dialog (view only) -->
    <form id="viewspan_form" class="dialog" title="Span">
      <fieldset id="viewspan_selected_fset">
        <legend>Text</legend>
        <a target="brat_linked" id="viewspan_highlight_link" href="#">Link</a>
        <div id="viewspan_selected"/>
      </fieldset>

      <fieldset id="viewspan_search_fieldset">
        <legend>Search</legend>
        <div id="viewspan_search_links"/>
      </fieldset>

      <fieldset>
        <legend>Notes</legend>
        <input id="viewspan_notes" class="borderless" readonly="readonly"/>
      </fieldset>
    </form>
    <!-- Span dialog (view+edit) -->
    <form id="span_form" class="dialog" title="Span">
      <!-- Span dialog annotated text -->
      <fieldset id="span_selected_fset">
        <legend>Text</legend>
        <a target="brat_linked" id="span_highlight_link" href="#">Link</a>
        <div id="span_selected"/>
      </fieldset>
      <!-- Span dialog search links -->
      <fieldset id="span_search_fieldset">
        <legend>Search</legend>
        <div id="span_search_links"/>
      </fieldset>
      <!-- Span dialog type selector -->
      <fieldset>
        <div id="entity_and_event_wrapper" class="split_wrapper">
          <div id="span_entity_section" class="wrapper_half_left">
            <div id="entity_label" class="label-like">Entity type</div>
            <div id="entity_types" class="scroll_wrapper_upper">
              <div class="scroller"/> 
            </div>
            <!-- NOTE: the attribute labels must be *outside* of the
                 divs they logically belong to prevent scrollers
                 overflowing them. -->
            <div id="entity_attribute_label" 
                 class="label-like wrapper_lower_label">Entity attributes</div>
            <div id="entity_attributes" class="scroll_wrapper_lower">
              <div class="scroller small-buttons"/> 
            </div>
          </div><div id="span_event_section" class="wrapper_half_right">
            <div id="event_label" class="label-like">Event type</div>
            <div id="event_types" class="scroll_wrapper_upper">
              <div class="scroller"/> 
            </div>            
            <div id="event_attribute_label"
                 class="wrapper_lower_label label-like">Event attributes</div>
            <div id="event_attributes" class="scroll_wrapper_lower">
              <div class="scroller small-buttons"/> 
            </div>
          </div>
        </div>
      </fieldset>
      <!-- Span dialog normalization -->
      <fieldset id="norm_fieldset">
        <legend>Normalization</legend>
        <div id="norm_container">
          <select id="span_norm_db"/>
          <a id="span_norm_db_link" target="brat_linked" href="#" title="Search DB"><img src="static/img/Fugue-shadowless-magnifier.png" style="vertical-align: middle"/></a>
          <span class="span_norm_label">ID:</span>
          <input id="span_norm_id" class="span_norm_id_input"
                 style="width:20%"/>
          <span class="span_norm_label">Ref:</span>
          <input id="span_norm_txt" class="span_norm_txt_input"
                 readonly="readonly" style="width:45%"
                 placeholder="Click here to search"/>
          <a id="span_norm_ref_link" target="brat_linked" href="#" title="See in DB"><img src="static/img/Fugue-shadowless-external.png" style="vertical-align: middle"/></a>
          <input id="clear_norm_button" type="button" 
                 value="&#x2715;" title="Clear normalization"/>
        </div>
      </fieldset>
      <!-- Span dialog notes -->
      <fieldset>
        <legend>Notes</legend>
        <div id="notes_container">
          <input id="span_notes" class="borderless"/>
          <input id="clear_notes_button" type="button" 
                 value="&#x2715;" title="Clear notes"/>
        </div>
      </fieldset>
    </form>
    <!-- Rapid mode span dialog -->
    <form id="rapid_span_form" class="dialog" title="Span type">
      <fieldset id="rapid_span_selected_fset">
        <legend>Text</legend>
        <div id="rapid_span_selected"/>
      </fieldset>
      <div id="rapid_span_types" class="scroll_fset" style="height:250px">
        <fieldset>
          <legend>Select type</legend>
          <div class="scroller" id="rapid_span_types_div">
            <!-- filled dynamically -->
          </div>
        </fieldset>
      </div>
    </form>
    <!-- Arc dialog -->
    <form id="arc_form" class="dialog" title="Arc">
      <fieldset id="arc_origin_fset">
        <legend>From</legend>
        <a target="brat_linked" id="arc_highlight_link" href="#">Link</a>
        <div id="arc_origin"/>
      </fieldset>

      <fieldset id="arc_target_fset">
        <legend>To</legend>
        <div id="arc_target"/>
      </fieldset>

      <div id="arc_roles" class="scroll_fset">
        <fieldset>
          <legend>Type</legend>
          <div class="scroller"/>
        </fieldset>
      </div>

      <fieldset id="arc_notes_fieldset">
        <legend>Notes</legend>
        <input id="arc_notes" class="borderless"/>
      </fieldset>

    </form>
    <!-- Login dialog -->
    <form id="auth_form" class="dialog" title="Login">
      <fieldset>
        <legend>Username</legend>
        <input id="auth_user" placeholder="Username" class="borderless"/>
      </fieldset>
      <fieldset>
        <legend>Password</legend>
        <input id="auth_pass" type="password" placeholder="Password" class="borderless"/>
      </fieldset>
    </form>
    <!-- Split span annotation dialog -->
    <form id="split_form" class="dialog" title="Split the Span">
      <fieldset>
        <legend>Split Roles</legend>
        <div id="split_roles" class="scroll_fset"/>
      </fieldset>
    </form>
    <!-- Browser dialog -->
    <form id="collection_browser" class="dialog" title="Open">
      <fieldset>
        <legend>Collection</legend>
        <input id="collection_input" readonly="readonly" placeholder="Document" class="borderless"/>
      </fieldset>
      <fieldset>
        <legend>Collection Information</legend>
        <div id="readme_container">
          <input id="readme" readonly="readonly" class="borderless"/>
          <input id="more_readme_button" type="button" value="More..." title="Show full collection information text"/>
        </div>
      </fieldset>
      <fieldset>
        <legend>Document</legend>
        <input id="document_input" placeholder="Document" class="borderless"/>
      </fieldset>
      <table id="document_select" class="ui-widget unselectable">
        <thead class="ui-widget-header"/>
        <tbody class="ui-widget-content"/>
      </table>
    </form>
    <!-- Normalization DB search dialog -->
    <form id="norm_search_dialog" class="dialog" title="Search">
      <fieldset>
        <legend>Query</legend>
        <div id="norm_search_container">
          <input id="norm_search_query" placeholder="Query string" class="borderless"/>
          <input id="norm_search_button" type="button" value="Search"/>
        </div>
      </fieldset>
      <fieldset>
        <legend>ID</legend>
        <input id="norm_search_id" placeholder="Identifier" class="borderless" readonly="readonly"/>
      </fieldset>
      <table id="norm_search_result_select" class="ui-widget unselectable">
        <thead class="ui-widget-header"/>
        <tbody class="ui-widget-content"/>
      </table>
    </form>
    <!-- Spinner -->
    <div id="waiter" class="dialog" title="Please wait">
      <img src="static/img/spinner.gif"/>
    </div>
    <!-- "About" dialog -->
    <div id="about" class="dialog unselectable" title="About brat">
      <div id="aboutlogo" class="logo">brat</div>
      <!--This software is distributed under the <a target="licence" href="http://www.opensource.org/licenses/isc-license">ISC Licence</a>.-->
      <div align="center">brat rapid annotation tool</div>
      <div style="font-size:60%" align="center">v1.3 "Crunchy Frog"</div>
      <div id="copyright">&copy; 2010-2012 The brat contributors</div>
    </div>
    <!-- Welcome/tutorial dialog -->
    <div id="tutorial" class="dialog unselectable" title="Tutorial">
      <h2>Welcome to Polish Coreference Corpus Online</h2>
      <div id="browserwarning">
        <p>
        Please be aware that
        <span class="logo">brat</span>
        is currently only fully supported on
        <a href="http://www.google.com/chrome">Google Chrome</a>
        and
        <a href="http://www.apple.com/safari/">Safari</a>.
        In other browsers, it may exhibit various degrees of problems,
        from minor annoyances to severe ones that make
        <span class="logo">brat</span>
        unusable. For more information, see the page on
        <a href="http://brat.nlplab.org/supported-browsers.html" target="manual">browser support</a>.
        </p>
        <p>
          Please consider using <span class="logo">brat</span> in
          a fully supported browser for a better user experience.
        </p>
      </div>
      <p>Below is a mini-tutorial for basic usage. This online version of the Polish
        Coreference Corpus is a read-only visualization based on the 
        <a href="http://brat.nlplab.org">brat</a> collaborative annotation environment.
        Details about the corpus itself are available at the corpus 
        <a href="http://zil.ipipan.waw.pl/PolishCoreferenceCorpus">webpage</a>.</p>
      <p>You can always reopen this tutorial by navigating to the top right corner of the page and clicking
      "Corpus tutorial" button.</p>
      
      <h3>Selecting a document</h3>
      <p>After closing this tutorial, you will see the collection
        browser, which allows you to access the different texts in the corpus,
        divided into two major groups: short and long texts. Short texts are
        divided into subfolders only for the performance of the online 
        browsing interface. Simply double-click on a folder name
        to show its contents or on a document name to open it.
      </p>
      <p>You can later return to the collection browser by pressing the
        TAB key or by clicking on &quot;Collection&quot; in the menu.
      </p>
      <h3>Visualization</h3>
      <p>When a document is selected, the main window area shows a
        visualization of the text and annotations of that
        document. Placing the mouse cursor over an annotation shows
        further information about that annotation.
      </p>
      <p>
      	The only visible text annotations are mentions (yellow tags over
      	text spans, with "Mention", "Men" or "M" label). When you hover your mouse over a
      	mention, it will highlight its span in green. A popup will also show a note,
      	describing the head of the mention and its dominating expression (if it is
      	not a singleton). 
      </p>
      <p>All other mentions in text, which are in the same identity 
      cluster with that mention, will also be highlighted green.
      </p>
      <p>All the other mentions in text, which are in the near-identity relation with
      that mention, will be highlighteed purple.
      </p>
      <h3>Menu</h3>
      <p>Placing the mouse cursor over the blue bar on top of the
        window opens the tool menu. This provides access to the
        following features:
        <ul>
          <li><b>Collection</b>: collection browser</li>
          <li><b>Data</b>: export annotation data</li>
          <li><b>Search</b>: search current document or collection</li>
          <li><b>Options</b>: system configuration options</li>
          <li><b>Corpus tutorial</b>: this tutorial</li>
        </ul>
      </p>
    </div>
  </body>
</html>