<!DOCTYPE html>
<html>
  <head>
		<% my $plain_title = $title; $plain_title=~s/<[^>]+>//g; %>
    <title><%= $plain_title  %>:<%= $word %> · IDS word vector analysis</title>
    <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
    <link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Condensed" rel="stylesheet">
    <script src="https://code.jquery.com/jquery-latest.min.js"></script>
    <script src = "https://cdn.datatables.net/1.13.10/js/jquery.dataTables.min.js"></script>
    <script src = "https://cdn.datatables.net/fixedcolumns/3.2.5/js/dataTables.fixedColumns.min.js"></script>
    <script src = "https://cdn.datatables.net/plug-ins/1.13.10/sorting/scientific.js"></script>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML'></script>
    <script src="https://cdn.datatables.net/buttons/2.3.6/js/dataTables.buttons.min.js"></script>
    <script src="https://cdn.datatables.net/buttons/2.3.6/js/buttons.print.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
    <script src="https://cdn.datatables.net/buttons/2.3.6/js/buttons.html5.min.js"></script>

     <script src="https://cdnjs.cloudflare.com/ajax/libs/ical.js/1.5.0/ical.js"
      integrity="sha512-UxWd2RMDGpYwYuDeU2Fs+nd51gw4ZLQY0D9wWZ3NuanNSk6QQmWCZ6C+rvI0lJ/b/nZtBQ8RVESA9DN9r65dUg=="
      crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script
      src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.4/moment-with-locales.min.js"
      integrity="sha512-42PE0rd+wZ2hNXftlM78BSehIGzezNeQuzihiBCvUEB3CVxHvsShF86wBWwQORNxNINlBPuq7rG4WWhNiTVHFg=="
      crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <link rel="stylesheet" href="https://cdn.datatables.net/1.13.10/css/jquery.dataTables.min.css">
    <link rel="stylesheet" href="/derekovecs/css/derekovecs.css">
    <script
      src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"
      integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU="
      crossorigin="anonymous"></script>
    <script>
     MathJax.Hub.Config({
       config: ["MMLorHTML.js"],
       jax: ["input/TeX","input/MathML","output/HTML-CSS","output/NativeMML", "output/PreviewHTML"],
       extensions: ["tex2jax.js","mml2jax.js","MathMenu.js","MathZoom.js", "fast-preview.js", "AssistiveMML.js", "a11y/accessibility-menu.js"],
       TeX: {
         extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]
       }
     });     
     var urlParams = new URLSearchParams(window.location.search);
     var currentWords = urlParams.get("word");
     var CIIsearchWords = (currentWords && (currentWords.includes(" ") || currentWords.includes("|")) ? '('+currentWords.replace(/[ |]+/g, " oder ")+')' : currentWords);
     var collocatorTable = null;
     var plainTitle ="<%= $plain_title %>"  
     var korapPath="/";
     if (plainTitle.match(/-en/)) {
       korapPath="/instance/english";
     }
     var korapVC="";
     if (plainTitle.match(/WUDD/i)) {
       korapVC="&collection=corpusSigle+%3D+%2FW%5BDU%5DD17%2F";
       korapPath="/instance/test";
     }
     
     $(document).ready(function() {
       insertCalendarEvents(document.getElementById('downtimes'), '/derekovecs/getDowntimeCalendar' );

       $('#firstable').hide();
       //Set up a callback to hear back when MathJax is done rendering the equations
       //  it finds
       $('#ccd').load(
         '@Url.Action("ActionResultMethod","ControllerName",{controller parameters})', 
         function () {
           MathJax.Hub.Queue(
             ["Typeset",MathJax.Hub,"ccd"],
             function () {
               $("#mi_tt").attr("title",$("#pmi_ttt").html());
               $("#lfmd_tt").attr("title",$("#lfmd_ttt").html());
               $("#md_tt").attr("title",$("#md_ttt").html());
               $("#npmi_tt").attr("title",$("#npmi_ttt").html());
               $("#ll_tt").attr("title",$("#ll_ttt").html());
               $("#logdice_tt").attr("title",$("#logdice_ttt").html());
               $("#logdiceaf_tt").attr("title",$("#logdiceaf_ttt").html());
             }
           );
         });          

       //set things up so that we can shove raw html into what is shown in the tooltip; 
       //  in this case, we will have already put into the title attribute the html that 
       //  contains the MathJax rendered equations (via what we do in the callback).
       $(function () {
         $(document).tooltip({
           content: function () {
             return $(this).prop('title');
           }
         });
       });

       $("input").bind("keydown", function(event) {
         // track enter key
         var keycode = (event.keyCode ? event.keyCode : (event.which ? event.which : event.charCode));
         if (keycode == 13) { // keycode for enter key
           // force the 'Enter Key' to implicitly click the Update button
           document.getElementById('SEARCH').click();
           return false;
         } else  {
           return true;
         }});

       var collocatorTable_activated = false;
       $( "#tabs" ).on( "tabsactivate", function( event, ui ) {
         if (localStorage) localStorage['tab'] = ui.newTab.index();
         if(ui.newTab.index() == 3 && !collocatorTable_activated) {
           classicCollocatorTable.columns.adjust();
           collocatorTable.columns.adjust();
           collocatorTable_activated = true;
         }
       });

       $(function(){
         $("#SEARCH").click(function() {
           window.open($(location).attr('pathname')+'?'+$('form').serialize(), "_self");
         });
       });

       function changeCharColor(txt, heat, word) {
         var newText = "";
         for (var i=0, l=txt.length; i<l; i++) {
           newText += (i == 5 ? txt.charAt(i) : '<a href="http://korap.ids-mannheim.de' + korapPath + '/?ql=cosmas2&q=' +
                                                CIIsearchWords + ' /' +  (i > 5? '%2B' : '-') + 'w' +
                                                Math.abs(i-5) + ':' +  Math.abs(i-5) + ',s0 ' + word + korapVC +
                                                '" target="korap"><span style="background-color:' +
                                                getHeatColor(heat[i]/maxHeat)+'">'+txt.charAt(i)+'</span></a>');
         }
         return newText;
       }

       function getHeatColor(value) {
         var hue=((1-value)*120).toString(10);
         return ["hsl(",hue,",90%,70%)"].join("");
       }

       function bitvec2window(n, heat, word) {
         var str = n.toString(2).padStart(10, "0")
                    .replace(/^([0-9]{5})/, '$1x')
                    .replace(/0/g, '·')
                    .replace(/1/g, '+');
         return changeCharColor(str, heat, word);
       }

       % use Mojo::ByteStream 'b';
       var paraResults = <%= b(Mojo::JSON::to_json($lists)) %>;
       var urlprefix =  new URLSearchParams(window.location.search);
       if (paraResults.length > 0  && paraResults[0] != null) {
         var nvecs = [],
             nwords = [],
             nranks = [],
             nmarked = [];
         for(var i = 0; i < paraResults.length; i++) {
           nwords = nwords.concat(paraResults[i].map(function(a){return a.word;}));
           nvecs = nvecs.concat(paraResults[i].map(function(a){return a.vector;}));
           nranks = nranks.concat(paraResults[i].map(function(a){return a.rank;}));
           nmarked = nmarked.concat(paraResults[i].map(function(a){return a.marked;}));
         }
         showMap({target: " "+urlParams.get('word')+" ", mergedEnd: <%= $mergedEnd %>, words: nwords, vecs: nvecs, ranks: nranks, marked: nmarked} );
         var t = $('#firsttable').DataTable({
           data: [].concat.apply([], paraResults),
           "sScrollY": "780px",
           "bScrollCollapse": true,
           "bPaginate": false,
           "bJQueryUI": true,
           "dom": '<"top">rt<"bottom"flpB><"clear">',
           buttons: [
            { extend: 'copyHtml5',  text: '<i class="fa fa-files-o"></i>',  titleAttr: 'Copy' },
            { extend: 'csvHtml5', text: '<i class="fa fa-file-text-o"></i>', titleAttr: 'CSV', filename: currentWords+'_para_neighbours' },
            { extend: 'excelHtml5', text: '<i class="fa fa-file-excel-o"></i>', titleAttr: 'Excel', filename: currentWords+'_para_neighbours', exportOptions: { columns: ':visible' } ,
            }
            ],
           "initComplete":function(settings, json) {
             $('td.paradigmator a').on('mousedown', function(e) {
               return paradigmatorClick(e, paraResults[0][0].word, this.childNodes["0"].textContent);
             });
           },
           "columns": [
             { "data": "rank", type: "allnumeric" },
             { "data": "dist",  render: function ( data, type, row ) {return data.toFixed(3) }},
             { "data": "word",  class: "paradigmator", render: function ( data, type, row ) {
               urlprefix.set("word", data); return  '<a class="' + getMergedClass(row.rank) + '" href="?' + urlprefix + '">' + data + '</a>' 
             }}
           ],
           "columnDefs": [
             { className: "dt-right", "targets": [0,1] },
             { "searchable": false,
               "orderable": false,
               "targets": 0
             },
             { "orderSequence": [ "desc" ], "targets": [ 1 ] },
             { "orderSequence": [ "asc", "desc" ], "targets": [ 2 ] },
           ],
           "oLanguage": {
             "sSearch": "Filter: "
           },
           "order": [[ 1, 'desc' ]],
         } );

         t.on( 'order.dt search.dt', function () {
           t.column(0, {order:'applied'}).nodes().each( function (cell, i) {
             cell.innerHTML = i+1;
           } );
         } ).draw();

         $( "#first" ).clone().prependTo( "#tabs-2" );

       }


       var collocatorData = <%= b(Mojo::JSON::to_json($collocators)) %>;
       var maxHeat; // = Math.max.apply(Math,collocatorData.map(function(o){return o.cprob;}))

       if(typeof data !== 'undefined' && data.mergedEnd > 0) {
          vocabDistanceTable = makeVocabDistanceTable("#vocabdistt", baseURL);
       }

       if (collocatorData != null) {
         maxHeat = Math.max.apply(Math,collocatorData.map(function(o){return Math.max.apply(Math,o.heat);}))
         collocatorTable = $('#secondtable').DataTable({
           data: collocatorData,
           "sScrollY": "780px",
           "bScrollCollapse": true,
           "bPaginate": false,
           "bJQueryUI": true,
           "dom": '<"top">rt<"bottom"flpB><"clear">',
           buttons: [
            { extend: 'copyHtml5',  text: '<i class="fa fa-files-o"></i>',  titleAttr: 'Copy' },
            { extend: 'csvHtml5', text: '<i class="fa fa-file-text-o"></i>', titleAttr: 'CSV', filename: currentWords+'_syn_neighbours' },
            { extend: 'excelHtml5', text: '<i class="fa fa-file-excel-o"></i>', titleAttr: 'Excel', filename: currentWords+'_syn_neighbours', exportOptions: { columns: ':visible' } ,
            }
          ],
          "columns": [
             { "data": "rank", type: "allnumeric" },
             { "data": "pos", width: "7%", sClass: "dt-center mono compact", render: function ( data, type, row ) {return bitvec2window(data, row.heat, row.word) }},
             { "data": "max",  render: function ( data, type, row ) {return data.toFixed(3) }},
             { "data": "average", render: function ( data, type, row ) {return data.toFixed(3) }},
             { "data": "prob", type: "scientific", render: function ( data, type, row ) {return data.toExponential(3) }  },
             { "data": "cprob", type: "scientific", render: function ( data, type, row ) {return data.toExponential(3) }  },
             { "data": "overall", type: "scientific", render: function ( data, type, row ) {return data.toExponential(3) } },
             { "data": "word",  sClass: "collocator" },
             { "data": "rank", type: "allnumeric" }
           ],
           "columnDefs": [
             { className: "dt-right", "targets": [0,2,3,4,5,6] },
             { className: "dt-center", "targets": [ 1] },
             { "searchable": false,
               "orderable": false,
               "targets": [0, 8]
             },
             { "type": "scientific", targets: [2,3,4,5,6] },
             { "orderSequence": [ "desc" ], "targets": [ 2, 3, 4, 5, 6 ] },
             { "orderSequence": [ "asc", "desc" ], "targets": [ 1, 7 ] },
             { "targets": [8], "visible": false }
           ],
           "oLanguage": {
             "sSearch": "Filter: "
           },
           "order": [[ 4, 'desc' ]],
         } );
         $.ajaxSetup({
           type: 'POST',
           timeout: 30000,
           error: function(xhr) {
             $('#display_error')
               .html('Error: ' + xhr.status + ' ' + xhr.statusText);
           }
         });


         if($('#sprofiles').length) {
           similarProfileTable = $('#sprofiles').DataTable({
             ajax: {
               method: "GET",
               url: '/derekovecs/getSimilarProfiles',
               dataType: 'json',
               dataSrc: "",
               timeout: 30000,
               data: { w: paraResults[0][0].rank }
             },
             "initComplete":function(settings, json){
               $('td.paradigmator a').on('mousedown', function(e) {
                 if (e.which === 2) {
                   e.preventDefault();
                   queryKorAPalternatives(paraResults[0][0].word, this.childNodes["0"].textContent);
                   return false;
                 }
               });
             },
             "sScrollY": "780px",
             "bScrollCollapse": true,
             "bPaginate": false,
             "bJQueryUI": true,
             "dom": '<"top">rt<"bottom"flp><"clear">',
            "columns": [
               { "data": "v",  render: function ( data, type, row ) {return data.toFixed(3) }},
               { "data": "w",  sClass: "paradigmator", render: function ( data, type, row ) {urlprefix.set("word", data); return  '<a href="?' + urlprefix + '">' + data + '</a>' } }
             ],
             "columnDefs": [
               { className: "dt-right", "targets": [0] },
             ],
             "oLanguage": {
               "sSearch": "Filter: "
             },
             "order": [[ 0, 'desc' ]],
           });
         }

         //         var filterQuot = /(^quot?=[A-Z])|(quot$)/g;
         var filterQuot = /^quot/;
         var ccResult;
         var baseURL =  window.location.pathname.replace(/[/]$/, '')
         classicCollocatorTable = makeClassicCollocatorTable('#classicoloctable', baseURL, paraResults[0][0].rank)

         $('#show-details').change(function (e) {
           var columns = classicCollocatorTable.columns(".detail");
           if(this.checked) {
             columns.visible(true);
             $("#ccd").css('width', 'auto');
           } else {
             columns.visible(false);
             $("#ccd").css('width', '680px');
           }
           classicCollocatorTable.columns.adjust().draw();
         } );

         $("td.collocator").click(function(){
           queryKorAPCII(this.textContent + " /w1:5,s0 " + CIIsearchWords);
         });

         collocatorTable.on( 'order.dt search.dt', function () {
           collocatorTable.column(0, {order:'applied'}).nodes().each( function (cell, i) {
             cell.innerHTML = i+1;
           } );
         }).draw();
       }

       if (localStorage && !window.location.hash) { // let's not crash if some user has IE7
         var index = parseInt(localStorage['tab']||'0');
         $("#tabs").tabs({ active: index });
       }
       $("#tabs").css("visibility", "visible"); // now we can show the tabs
     });

     $(function(){
       $("#dropdownoptions").dialog({
         title: "<%= loc 'Options' %>",
         autoOpen: false,
         modal: false,
         draggable: false,
         height: "auto",
         width: "auto",
         resizable: false,
         buttons: {
           "<%= loc 'Cancel'%>": function() {
             $( this ).dialog( "close" );
           },
           "<%= loc 'Apply' %>": function() {
             window.open($(location).attr('pathname')+'?'+$('form').serialize(), "_self");
           }
         }
       });
     });

     $(function(){
       $("#showoptions").click(function(){
         $("#dropdownoptions").dialog("open");
         var target = $(this);
         $("#dropdownoptions").dialog("widget").position({
           my: 'left bottom',
           at: 'left bottom',
           of: target
         });
       });
     });

     $( function() {
       $( "#no_iterations" ).spinner({
         spin: function( event, ui ) {
           if ( ui.value < 1000 ) {
             $( this ).spinner( "value", 1000 );
             return false;
           } else if ( ui.value > 10000 ) {
             $( this ).spinner( "value", 10000 );
             return false;
           }
         }
       });
     } );

     $( function() {
       $( "#neighbours" ).spinner({
         spin: function( event, ui ) {
           if ( ui.value < 0 ) {
             $( this ).spinner( "value", 0 );
             return false;
           } else if ( ui.value > 200 ) {
             $( this ).spinner( "value", 200 );
             return false;
           }
         }
       });
     } );

     $( function() {
       $( "#cutoff" ).spinner({
         spin: function( event, ui ) {
           if ( ui.value < 100000 ) {
             $( this ).spinner( "value", 100000 );
             return false;
           } else if ( ui.value > 2000000 ) {
             $( this ).spinner( "value", 2000000 );
             return false;
           }
         }
       });
     } );

     $( function() {
       $( "#tabs" ).tabs().addClass('tabs-min');
     } );

     $( function() {
       $( ".controlgroup-vertical" ).controlgroup({
         "direction": "vertical"
       });
     } );

     $(function() {
       $( document ).tooltip({
         content: function() {
           return $(this).attr('title');
         }}
       )
     });

     $(function () {
       $(document).tooltip({
         content: function () {
           return $(this).prop('title');
         },
         show: null, 
         close: function (event, ui) {
           ui.tooltip.hover(
             function () {
               $(this).stop(true).fadeTo(400, 1);
             },    
             function () {
               $(this).fadeOut("400", function () {
                 $(this).remove();
               })
             });
         }
       });
     });
    </script>
    <script src="//d3js.org/d3.v3.min.js" charset="utf-8"></script>
    <script src="/derekovecs/js/calendar-events.js"></script>
    <script src="/derekovecs/js/tsne.js"></script>
    <script src="/derekovecs/js/som.js"></script>
    <script src="/derekovecs/js/labeler.js"></script>
    <script src="/derekovecs/js/derekovecs.js"></script>
    <script>

     var opt = {epsilon: <%= $epsilon %>, perplexity: <%= $perplexity %>},
         mapWidth = 800, // width map
         mapHeight = 800,
         jitterRadius = 7;

     var T = new tsnejs.tSNE(opt); // create a tSNE instance

     var Y;

     var data;
     var labeler;

     function applyJitter() {
       svg.selectAll('.tsnet')
          .data(labels)
          .transition()
          .duration(50)
          .attr("transform", function(d, i) {
            T.Y[i][0] = (d.x - mapWidth/2 - tx)/ss/20;
            T.Y[i][1] = (d.y - mapHeight/2 - ty)/ss/20;
            return "translate(" +
                                                                                     (d.x) + "," +
                                                                                     (d.y) + ")";
          });
     }

     function updateEmbedding() {
       var Y = T.getSolution();
       svg.selectAll('.tsnet')
          .data(data.words)
          .attr("transform", function(d, i) {
            return "translate(" +
                                                                                      ((Y[i][0]*20*ss + tx) + mapWidth/2) + "," +
                                                                                      ((Y[i][1]*20*ss + ty) + mapHeight/2) + ")"; });
     }

     var svg;
     var labels = [];
     var anchor_array = [];
     var text;

     function getMergedClass(i) {
       if(typeof data !== 'undefined' && i > data.mergedEnd) {
         return " merged"
       } else {
         return "";
       }
     }

     function getRankTooltip(i) {
       if(data.mergedEnd) {
         if(data.ranks[i] < data.mergedEnd) {
           return "rank: "+i +"  "+"freq. rank: "+(data.ranks[i]).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
         } else {
           return "rank: "+i +"  "+"freq. rank: "+(data.ranks[i]-data.mergedEnd).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + " (merged vocab)";
         }
       } else {
         return "rank: "+i +"  "+"freq. rank: "+data.ranks[i].toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
       }
     }

     function drawEmbedding() {
       var urlprefix =  new URLSearchParams(window.location.search);
       urlprefix.delete("word");
       urlprefix.append("word","");

       $("#embed").empty();
       var div = d3.select("#embed");

       // get min and max in each column of Y
       var Y = T.Y;

       svg = div.append("svg") // svg is global
                .attr("width", mapWidth)
                .attr("height", mapHeight);

       var g = svg.selectAll(".b")
                  .data(data.words)
                  .enter().append("g")
                  .attr("class", "tsnet");

       g.append("a")
        .attr("xlink:href", function(word) {
          return "?"+urlprefix+word; })
        .attr("class", function(d, i) {
          var res="";
          if(data.marked[i]) {
            res="marked ";
          }
          if(data.target.indexOf(" "+d+" ") >= 0) {
            res += "target";
          } 
          if(data.mergedEnd && data.ranks[i] >= data.mergedEnd) {
            return res+" merged";
          } else {
            return res;
          }
        })
        .attr("title", function(d, i) {
          return getRankTooltip(i);
        })
        .append("text")
        .attr("text-anchor", "top")
        .attr("font-size", 12)
        .text(function(d) { return d; });

       g.append("svg:title")
        .text(function(d, i) {
		      return getRankTooltip(i);
	      });

       var zoomListener = d3.behavior.zoom()
                            .scaleExtent([0.1, 10])
                            .center([0,0])
                            .on("zoom", zoomHandler);
       zoomListener(svg);
     }

     var tx=0, ty=0;
     var ss=1;
     var iter_id=-1;

     function zoomHandler() {
       tx = d3.event.translate[0];
       ty = d3.event.translate[1];
       ss = d3.event.scale;
       updateEmbedding();
     }

     var stepnum = 0;

     function stopStep() {
       clearInterval(iter_id);
       text = svg.selectAll("text");

       // jitter function needs different data and co-ordinate representation
       labels = d3.range(data.words.length).map(function(i) {
         var x = (T.Y[i][0]*20*ss + tx) + mapWidth/2;
         var y = (T.Y[i][1]*20*ss + ty) + mapHeight/2;
         anchor_array.push({x: x, y: y, r: jitterRadius});
         return {
           x: x,
           y: y,
           name: data.words[i]
         };
       });

       // get the actual label bounding boxes for the jitter function
       var index = 0;
       text.each(function() {
         labels[index].width = this.getBBox().width;
         labels[index].height = this.getBBox().height;
         index += 1;
       });


       //  setTimeout(updateEmbedding, 1);
       //  setTimeout(
       labeler =   d3.labeler()
                     .label(labels)
                     .anchor(anchor_array)
                     .width(mapWidth)
                     .height(mapHeight)
                     .update(applyJitter);
       //         .start(1000);

       iter_id = setInterval(jitterStep, 1);
     }

     var jitter_i=0;

     function jitterStep() {
       if(jitter_i++ > 100) {
         clearInterval(iter_id);
       } else {
         labeler.start2(10);
         applyJitter();
       }
     }

     var last_cost=1000;

     function step() {
       var i = T.iter;

       if(i > <%= $no_iterations %>) {
         stopStep();
       } else {
         var cost = Math.round(T.step() * 100000) / 100000; // do a few steps
         $("#cost").html("tsne iteration " + i + ", cost: " + cost.toFixed(5));
         if(i % 250 == 0 && cost >= last_cost) {
           stopStep();
         } else {
           last_cost = cost;
           updateEmbedding();
         }
       }
     }

     function showMap(j) {
       data=j;
       T.iter=0;
       iter_id = -1;
       last_cost=1000;
       T.initDataRaw(data.vecs); // init embedding
       drawEmbedding(); // draw initial embedding

       if(iter_id >= 0) {
         clearInterval(iter_id);
       }
       //T.debugGrad();
       iter_id = setInterval(step, 1);
       if(true) { // (<%= $show_som %>) {
         makeSOM(j, <%= $no_iterations %>);
       }
     }
     var queryword;

     function showCollocatorSOM() {
       var baseURL =  window.location.pathname.replace(/[/]$/, '')
       if (collocatorTable) {
         var ctableData = collocatorTable.rows().data();
         var nwords = [],
             nranks = [];
         for (var i=0; i < ctableData.length && i < 100; i++) {
           nranks.push(ctableData[i].rank);
           nwords.push(ctableData[i].word);
         }
         $.post(baseURL+'/getVecsByRanks',
                JSON.stringify(nranks),
                function(data, status){
                  showMap({target: " "+urlParams.get('word')+" ", mergedEnd: <%= $mergedEnd %>, words: nwords, vecs: data, ranks: nranks, marked: Array(100).fill(false)} );
                }, 'json');
       }
     }

     function onload() {
       queryword = document.getElementById('word');
     }

     function queryKorAP() {
       window.open('http://korap.ids-mannheim.de' + korapPath + '?q='+queryword.value+korapVC, 'KorAP');
     }

     function queryKorAPCII(query) {
       window.open('http://korap.ids-mannheim.de' +korapPath + '?ql=cosmas2&q='+query+korapVC, 'KorAP');
     }
    </script>
  </head>
  <body onload="onload()">    <div style="display:none;" id="pmi_ttt">Pointwise mutual information: $$\text{MI}=\text{MI}=\log_2\frac{p(w_1,w_2)}{p(w_1) p(w_2)}$$<p class="citation">Church, K. W. and Hanks, P. (1990): Word association norms, mutual information, and lexicography. Comput. Linguist. 16, 1 (March 1990), 22-29.</p></div>
    <div style="display:none;" id="md_ttt">Pointwise mutual information squared [1], also called mutual dependency [2]: $$\text{MI}^2=\text{MD}=\log_2\frac{p^2(w_1,w_2)}{p(w_1) p(w_2)}$$<p class="citation">[1] Daille, B. (1994): <a href="http://www.bdaille.com/index.php?option=com_docman&task=doc_download&gid=8&Itemid=">Approche mixte pour l’extraction automatique de terminologie: statistiques lexicales et filtres linguistiques</a>. PhD thesis, Université Paris 7.</p><p class="citation">[2] Thanopoulos, A., Fakotakis, N., Kokkinakis, G. (2002): <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.11.8101&rep=rep1&type=pdf">Comparative evaluation of collocation extraction metrics</a>. In: Proc. of LREC 2002: 620–625.</p></div>
    <div style="display:none;" id="lfmd_ttt">Pointwise mutual information cubed [1], also called log-frequency biased mutual dependency [2]: $$\text{MI}^3=\text{LFMD}=\log_2\frac{p^3(w_1,w_2)}{p(w_1) p(w_2)}$$<p class="citation">[1] Daille, B. (1994): <a href="http://www.bdaille.com/index.php?option=com_docman&task=doc_download&gid=8&Itemid=">Approche mixte pour l’extraction automatique de terminologie: statistiques lexicales et filtres linguistiques</a>. PhD thesis, Université Paris 7.</p><p class="citation">[2] Thanopoulos, A., Fakotakis, N., Kokkinakis, G. (2002): <a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.11.8101&rep=rep1&type=pdf">Comparative evaluation of collocation extraction metrics</a>. In: Proc. of LREC 2002: 620–625.</p></div>
    <div style="display:none;" id="npmi_ttt">Normalized pointwise mutual information: $$\frac{\log_2\frac{p(w_1,w_2)}{p(w_1)p(w_2)}}{-\log_2(p(w_1,w_2))}$$<p class="citation">Bouma, Gerlof (2009): <a href="https://svn.spraakdata.gu.se/repos/gerlof/pub/www/Docs/npmi-pfd.pdf">Normalized (pointwise) mutual information in collocation extraction</a>. In Proceedings of GSCL.</p></div>
    <div style="display:none;" id="ll_ttt">Log-likelihood: $$2\sum_{ij}O_{ij}\log\frac{O_{ij}}{E_{ij}}$$<p class="citation">Dunning, T. (1993): Accurate methods for the statistics of surprise and coincidence. Comput. Linguist. 19, 1 (March 1993), 61-74.</p>
      <p class="citation">Evert, Stefan (2004): <a href="http://purl.org/stefan.evert/PUB/Evert2004phd.pdf">The Statistics of Word Cooccurrences: Word Pairs and Collocations.</a> PhD dissertation, IMS, University of Stuttgart. Published in 2005, URN urn:nbn:de:bsz:93-opus-23714.</p></div>
    <div style="display:none;" id="logdice_ttt">Log-Dice: $$14 + \log_2 \frac{2f_{1,2}}{f_1 + f_2}$$<p class="citation">Rychlý, Pavel (2008): <a href="http://www.fi.muni.cz/usr/sojka/download/raslan2008/13.pdf">A lexicographer-friendly association score.</a> In Proceedings of Recent Advances in Slavonic Natural Language Processing, RASLAN, 6–9, 2008</p></div>
    <div style="display:none;" id="logdiceaf_ttt">Log-Dice using "auto-focus", i.e. the window that yields the highest score.</div>
	  <div id="ids_logo">
		  <a href="http://www.ids-mannheim.de/" target="_blank"><img src="/derekovecs/img/IDS-neu_farbig.svg" alt="Leibniz-Institut für Deutsche Sprache"/></a>
	  </div>
     <div id="header">
      <div id="pagetitle">
        <h1>DeReKoVecs</h1>
        <h2><%== $title %></h2>
      </div>
      <div id="options"  class="widget">
        <form id="queryform">
          <input id="word" type="text" name="word"  placeholder="<%= loc 'words_to_be_searched' %>" value="<%= $word %>"
                 title="<%= loc 'search_description' %>"/>
          <input id="SEARCH" type="button" value="<%= loc 'SEARCH' %>">
          <input type="button" id="showoptions" name="showoptions" value="<%= loc 'Options' %>" />
        </form>
        <div id="dropdownoptions" style="display: none">
          <form id="optionsform">
            <div class="controlgroup-vertical">
              <label for="cutoff">cut-off</label>
              <input id="cutoff" type="text" name="cutoff" size="10"  value="<%= $cutoff %>" title="Only consider the most frequent x word forms.">
              <label for="dedupe">dedupe</label>
              <input id="dedupe" type="checkbox" name="dedupe" value="1" <%= ($dedupe ? "checked" : "") %> title="radically filter out any near-duplicates">
              % if($mergedEnd > 0) {
                <label for="sbf">backw.</label>
                <input id="sbf" type="checkbox" name="sbf" value="1" <%= ($searchBaseVocabFirst ? "checked" : "") %> title="If checkecked base vocabulary will be searched first. Otherwise merged vocabulray will be searched first.">
              % }
              <label for="neighbours">max. neighbours:</label>
              <input id="neighbours" size="4" name="n" value="<%= $no_nbs %>">
              <label for="no_iterations">max. iterations</label>
              <input id="no_iterations" name="N" size="4" value="<%= $no_iterations %>">
              <!-- <label for="dosom">SOM</label>
                   <input id="dosom" type="checkbox" name="som" value="1" <%= ($show_som ? "checked" : "") %>> -->
              % if($collocators) {
                <label for="sortby">window/sort</label>
                <select id="sortby" name="sort">
                  <option value="0"  <%= ($sort!=1 && $sort!=2? "selected":"") %>>auto focus</option>
                  <!-- <option value="1"  <%= ($sort==1? "selected":"") %>>any single position</option>
                       <option value="2" <%= ($sort==2? "selected":"") %>>whole window</option> -->
                </select>
              % }
              <input type="button" value="→ KorAP" onclick="queryKorAP();" title="query word with KorAP"/>
              <input id="show-details" type="checkbox" name="show-details" value="1" >
              <label for="show-details">
                Show details
              </label>
            </div>
          </form>
        </div>
      </div>
    </div>
    <div id="topwrapper">
      <div style="visibility: hidden;" id="tabs">
        <ul>
          % if (defined $word && $word ne '') {
            % if($mergedEnd && $distantWords) {
            <li><a href="#tabs-0" title="Cos offsets of the words furthest away from their position in the reference corpus."">Offsets</a></li>
            % }
            <li><a href="#tabs-1"><%= loc 'paradigmatic_tsne' %></a></li>
            <li><a href="#tabs-2"><%= loc 'paradigmatic_som' %></a></li>
            <li><a href="#tabs-3"><%= loc 'syntagmatic' %></a></li>
          % }
          <li><a href="#tabs-4">Info</a></li>
        </ul>
        % if($mergedEnd && $distantWords) {
        <div id="tabs-0" style="display: flex;  padding: 5px; flex-flow: row wrap;">
          <div id="vocabdist" style="width: 230px; margin-bottom: 15px;">
            <table class="display compact nowrap" id="vocabdistt">
              <thead>
                <tr>
                  <th align="right">#</th><th id="cosD" align="right">D<sub>cos</sub></th><th align="left">word</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td align="right">
                  </td>
                  <td align="right">
                  </td>
                  <td></td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
        % }
        <div id="tabs-1" style="display: flex;  padding: 5px; flex-flow: row wrap;">
          % if($lists && (@$lists) > 0 && (@$lists)[0]) {
            <div id="wrapper">
              <div id="first" style="width: 230px; margin-bottom: 15px;">
                <table class="display compact nowrap" id="firsttable">
                  <thead>
                    <tr>
                      <th align="right">#</th><th align="right">S<sub>cos</sub></th><th align="left">similars by w2v</th>
                    </tr>
                  </thead>
                  <tbody>
                    <tr>
                      <td align="right">
                      </td>
                      <td align="right">
                      </td>
                      <td></td>
                    </tr>
                  </tbody>
                </table>
              </div>
              % if(0 && $haveSProfiles) {
                <div id="sprofilesdiv" style="width: 200px; padding-right: 10px;"> 
                  <table class="display compact nowrap" id="sprofiles">
                    <thead>
                      <tr>
                        <th align="right">cos</th><th align="left">similars by coll. profile</th>
                      </tr>
                    </thead>
                    <tbody>
                      <tr>
                        <td align="right">
                        </td>
                        <td></td>
                      </tr>
                    </tbody>
                  </table>
                </div>
              %}
              <div id="second">
                <div id="embed">
                </div>
                <div id="cost">
                </div>
              </div>
            </div>
          % } elsif($word !~ /^\s*$/) {
          <div id="wrapper">
            <script>
             $( function() {
               $( "<%== loc 'notfounddialog' %>").dialog({
                 autoOpen: true,
                 modal: true,
                 draggable: false,
                 height: "auto",
                 width: "auto",
                 resizable: false,
                 buttons: {
                   "OK": function() {
                     $( this ).dialog( "close" );
                   } /* ,
                   "Apply": function() {
                     window.open($(location).attr('pathname')+'?'+$('form').serialize(), "_self");
                   }  */
                 }
               });
             });
            </script>
            <div id="not-found-dialog_de" style="display: none" title="Nicht gefunden">
              <p>FEHLER: Konnte "<%= $word %>" nicht finden.</p>
              <p>Wenn Sie der Meinung sind, dass es Vokabluar enthalten sein sollte, können Sie versuchen den Cut-Off-Parameter in den Optionen zu erhöhen.</p>
            </div>
            <div id="not-found-dialog_en" style="display: none" title="Not found">
              <p>ERROR: "<%= $word %>" not found in vocabluary.</p>
              <p>If you are sure you have spelled the word as intended, you can try to increase the cutoff parameter in the options menu.</p>
            </div>
          </div>
          % }
        </div>
        <div id="tabs-2" style="display: flex;  padding: 5px; flex-flow: row wrap;">
          % if(defined $word && $word ne "") {
            <div id="som2" style="width: 800;">
             <div id="sominfo1"><span id="somcolor1">   </span> <span id="somword1"> </span> <span id="somcolor2">   </span> <span id="somword2"> </span> <span id="somcolor3">   </span></div>
               <div id="sominfo" style="text-align: right">SOM iteration <span id="iterations">0</span></div>
            </div>
          % }
        </div>
        <div id="tabs-3" style="display: flex;  padding:5px; flex-flow: row wrap;">
          <div style="margin-right: 20px; margin-bottom: 10px;" id="secondt">
            <table class="display compact nowrap"  id="secondtable">
              <thead>
                <tr>
                  % if($collocators) {
                    <th>#</th>
                    <th align="center" title="Activation of the respective collocator in the columns around the target normalized by its maximum (red). Columns selected by the auto-focus funtion (which window of all possible column-combinations maximizes ⊥(a/c)?) are marked with +. Click on the column postions to lauch a KorAP query with target word and collocator in the respective position.">w'</th>
                    <th align="right" title="Maximum activation of the collocator anywhere in the output layer.">max(a)</th>
                    <th title="Average raw activation of the collocator in the columns selected by auto-focus." align="right">⟨a⟩</th>
                    <th title="Sum of activations over the selected colunns normalized by the total activation sum of the selected columns." align="right">Σa/Σw'</th>
                    <th title="Co-norm of the column-normalized activations over the colunns selected by the auto-focus." align="right">⊥(a/c)</th>
                    <th title="Sum of the activations over the whole window normalized by the total window sum (no auto-focus)." align="right">Σa/Σw</th>
                    <th align="left"><%= loc 'collocate_w2v' %></th>
                  % }
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td align="right">
                  </td>
                  <td align="right">
                  </td>
                  <td align="right">
                  </td>
                  <td align="right">
                  </td>
                  <td align="right">
                  </td>
                  <td align="right">
                  </td>
                </tr>
              </tbody>
            </table>
          </div>
          <div id="ccd" style="">
            <table class="display compact nowrap" id="classicoloctable">
              <thead>
                % if($collocators) {
                  <tr>
                    <th id="ll_tt">LL</th>
                    <th id="mi_tt">MI</th>
                    <th id="md_tt">MI²</th>
                    <th id="lfmd_tt">MI³</th>
                    <th id="npmi_tt">nPMI</th>
                    <th id="dice_tt">dice</th>
                    <th id="logdice_tt">LD</th>
                    <th id="logdiceaf_tt">LDaf</th>
                    <th id="delta_tt" title="Delta to log-Dice score in reference corpus. ⚠: If the collocate is not within the top 200 of the reference corpus, a reference value of min(lD)-0.1 is assumed.">Δ</th>
                    <th id="af_win" title="Positions around the target word that are selected by the auto-focus function are marked with ◾. Positions at which the collocate appears at least once are marked with ◽."><span class="regular"><%= loc 'af_window' %></span></th>
                    <th title="PMI³ restricted to left neighbour">l-PMI³</th>
                    <th title="PMI³ restricted to right neighbour">r-PMI³</th>
                    <th title="nPMI restricted to left neighbour">l-nPMI</th>
                    <th title="nPMI restricted to right neighbour">r-nPMI</th>
                    <th id="rawfreq_tt" title="raw frequency sum of collocation within window">raw</th>
                    <th><%= loc 'collocate_ca' %></th>
                  </tr>
                % }
              </thead>
              <tbody>
                <tr>
                  <td align="right"></td>
                  <td align="right"></td>
                  <td align="right"></td>
                  <td align="right"></td>
                  <td align="right"></td>
                  <td align="right"></td>
                  <td align="right"></td>
                  <td align="right"></td>
                  <td align="right"></td>
                  <td align="left"> </td>
                  <td align="right"></td>
                  <td align="right"></td>
                  <td align="right"></td>
                  <td align="right"></td>
                  <td align="left"> </td>
                </tr>
              </tbody>
            </table>
          </div>
          <!--
               <div style="clear:both" ></div>
               <div style="float: right; overflow: hidden" id="extra"><button onClick="showCollocatorSOM()"> </button></div>
          -->
        </div>
        <div id="tabs-4" style="display: flex;  padding:5px; flex-flow: row wrap;">
          <div id="info">
            <h3><%== loc 'about' %></h3>
            %= include(loc('abouttext'))
            % if($training_args && (@$lists)[0]) {
                <h3><%= loc 'training_parameters' %></h3>
                % if($training_args =~ /-type\s*3/) {
                  <p>Calculations are based on a word embedding model trained with an extension of <a href="https://github.com/wlin12/wang2vec/">wang2vec</a> using the following parameters:</p>
                  <div class="mono"><%= $training_args %></div>
                % } else {
                  <p>Calculations are based on a word embedding model trained with <a href="https://code.google.com/p/word2vec/">word2vec</a> using the following parameters:</p>
                  <div class="mono"><%= $training_args %></div>
              % }
           % }
           <h3>Source Code</h3>
           <ul>
            <li><a href="https://korap.ids-mannheim.de/gerrit/plugins/gitiles/ids-kl/dereko2vec">dereko2vec</a></li>
            <li><a href="https://korap.ids-mannheim.de/gerrit/plugins/gitiles/ids-kl/derekovecs">derekovecs</a></li>
           </ul>
           <h3><%== loc 'references' %></h3>
            %= include 'references'
           </div>
        </div>
      </div> <!-- tabs -->
    </div> <!-- topwrapper  -->
    <div style="clear: both;"></div>
    </div>
      <div class="footer">
        <span class="footertext">
          %= include(loc('footer'))
        </span>
      </div>
  </body>
</html>
