<commit_before><?xml version="1.0" encoding="UTF-8" ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Explore Classes</title>
    <link rel="sparql" href="/sparql" />
    <style>
        .describe { font-size: xx-small; }
    </style>
    <script src="https://www.google.com/jsapi" type="text/javascript"> </script>
    <script type="text/javascript">
      // <![CDATA[
      jQuery(function($) {
         if (window.location.hash.indexOf('#!') == 0) {
              var folderURL = window.location.hash.substring(2); // strip '#!'
              var authpattern = new RegExp("http.*:\/\/.*?/"); // could be 'http://' or 'https://'
              var authority = authpattern.exec(folderURL);
              google.load("visualization", "1.0", {callback:function() {
                new google.visualization.Query(calli.getCallimachusUrl("queries/findclasses.rq?results&folder="+folderURL)).send(function(result){
                  var tbody = $('#classtable tbody');
                  var data = result.getDataTable();
                  var rows = data.getNumberOfRows();
                  for (var i=0; i<rows; i++) {
                    var trow = $('<tr/>');
                    tbody.append(trow);
                    var tdata = $('<td/>');
                    // Add link to class
                    var anchor = $('<a/>');
                    anchor.attr('href', data.getValue(i, 0));
                    anchor.attr('resource', data.getValue(i, 0));
                    anchor.attr('title', "class description");
                    anchor.text(data.getValue(i, 1));
                    anchor.mousedown(function(){
                        var resource = this.getAttribute('resource');
                        var query = encodeURIComponent('describe<' + resource + '>');
                        this.href = $('link[rel=sparql]').attr('href') + '?query=' + query;
                    });
                    tdata.append(anchor);
                                // Add "assign templates" link
                    var classcreate = $('<span/>');
                    classcreate.attr('class', 'describe');
                    classcreate.text(' (');
                    var classcreateanchor = $('<a/>');
                    classcreateanchor.attr('href', calli.getCallimachusUrl("types/Class?create#!" + escape(data.getValue(i, 0))));
                    classcreateanchor.attr('title', "create templates for this class");
                    classcreateanchor.text("assign templates");
                    classcreate.append(classcreateanchor);
                    classcreate.append(')');
                    tdata.append(classcreate);
                    trow.append(tdata)
                    // Add comment
                    var tdatad = $('<td/>');
                    tdatad.text(data.getValue(i, 2));
                    trow.append(tdatad);
                  }
                });
              }});
        }
      });
      // ]]>
    </script>
</head>
<body>
    <h1>Explore Classes</h1>
    <form>
        <table id="classtable" class="ui-grid-content ui-widget-content" border="1">
            <thead>
                <tr>
                    <th class="ui-state-default">Class</th>
                    <th class="ui-state-default">Description</th>
                </tr><commit_msg>Prompt to create class in current explorer folder<commit_after><?xml version="1.0" encoding="UTF-8" ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Explore Classes</title>
    <link rel="sparql" href="/sparql" />
    <style>
        .describe { font-size: xx-small; }
    </style>
    <script src="https://www.google.com/jsapi" type="text/javascript"> </script>
    <script type="text/javascript">
      // <![CDATA[
      jQuery(function($) {
         if (window.location.hash.indexOf('#!') == 0) {
              var folderURL = window.location.hash.substring(2); // strip '#!'
              var authpattern = new RegExp("http.*:\/\/.*?/"); // could be 'http://' or 'https://'
              var authority = authpattern.exec(folderURL);
              google.load("visualization", "1.0", {callback:function() {
                new google.visualization.Query(calli.getCallimachusUrl("queries/findclasses.rq?results&folder="+folderURL)).send(function(result){
                  var tbody = $('#classtable tbody');
                  var data = result.getDataTable();
                  var rows = data.getNumberOfRows();
                  for (var i=0; i<rows; i++) {
                    var trow = $('<tr/>');
                    tbody.append(trow);
                    var tdata = $('<td/>');
                    // Add link to class
                    var anchor = $('<a/>');
                    anchor.attr('href', data.getValue(i, 0));
                    anchor.attr('resource', data.getValue(i, 0));
                    anchor.attr('title', "class description");
                    anchor.text(data.getValue(i, 1));
                    anchor.mousedown(function(){
                        var resource = this.getAttribute('resource');
                        var query = encodeURIComponent('describe<' + resource + '>');
                        this.href = $('link[rel=sparql]').attr('href') + '?query=' + query;
                    });
                    tdata.append(anchor);
                                // Add "assign templates" link
                    var classcreate = $('<span/>');
                    classcreate.attr('class', 'describe');
                    classcreate.text(' (');
                    var classcreateanchor = $('<a/>');
                    classcreateanchor.attr('href', folderURL + "?create=" + encodeURIComponent(calli.getCallimachusUrl("types/Class")) + "#!" + escape(data.getValue(i, 0)));
                    classcreateanchor.attr('title', "create templates for this class");
                    classcreateanchor.text("assign templates");
                    classcreate.append(classcreateanchor);
                    classcreate.append(')');
                    tdata.append(classcreate);
                    trow.append(tdata)
                    // Add comment
                    var tdatad = $('<td/>');
                    tdatad.text(data.getValue(i, 2));
                    trow.append(tdatad);
                  }
                });
              }});
        }
      });
      // ]]>
    </script>
</head>
<body>
    <h1>Explore Classes</h1>
    <form>
        <table id="classtable" class="ui-grid-content ui-widget-content" border="1">
            <thead>
                <tr>
                    <th class="ui-state-default">Class</th>
                    <th class="ui-state-default">Description</th>
                </tr>
{'fraction_non_alphanumeric': 0.160786065207682, 'fraction_numerical': 0.006252791424743189, 'mean_word_length': 1.5179910044977512, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 2, '>': 69, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3682137', 'n_tokens_mistral': 1870, 'n_tokens_neox': 1742, 'n_words': 320}