<commit_before><!DOCTYPE html>
<html lang="${request.locale_name}">
    <head>
        <meta charset="utf-8">
        <title>Visual SPARQL query builder for an RDF database</title>
        <!--
        <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
        <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js"></script>
      -->
        <script src="static/js/third-party/d3.min.js" charset="utf-8"></script>
        <script src="static/js/third-party/jquery-1.12.4.min.js"></script>
        <script src="static/js/third-party/jquery-ui-1.11.4/jquery-ui.min.js"></script>

        <!-- The Templates plugin is included to render the upload/download listings -->
        <script src="//blueimp.github.io/JavaScript-Templates/js/tmpl.min.js"></script>

        <script src="static/js/third-party/bootstrap.js"></script>
        <script src="static/js/third-party/handlebars-v4.0.5.js"></script>


        <script src="static/js/MainAskomics.js"></script>
        <script src="static/js/query-handler.js"></script>
        <script src="static/js/integration.js"></script>
        <script src="static/js/AskomicsRestManagement.js"></script>
        <script src="static/js/AskomicsUserAbstraction.js"></script>
        <script src="static/js/AskomicsGraphBuilder.js"></script>
        <script src="static/js/AskomicsAttributesView.js"></script>
        <script src="static/js/AskomicsNodeView.js"></script>
        <script src="static/js/AskomicsLinksView.js"></script>
        <script src="static/js/AskomicsForceLayoutManager.js"></script>

        <link href="static/css/bootstrap.css" rel="stylesheet">
        <link rel="stylesheet" type="text/css" href="static/css/style.css">
    </head>

    <body>
        <nav class="navbar navbar-default">
            <div id="navbar_content" class="container">
                <div class="navbar-header">
                    <a class="navbar-brand site-header" href="/">${project}</a>
                </div>

                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                    <ul class="nav navbar-nav navbar-right">
                        <li id="interrogation" class="active"><a href="#" onclick="loadStartPoints();">Ask!</a></li>
                        <li id="integration"><a href="#">Upload</a></li>
                        <li id="statistics"><a href="#" onclick="loadStatistics(true);" >Stats</a></li>
                        <li id="about"><a href="#">About</a></li>
                    </ul>
                </div>
            </div>
        </nav>
        <div id="content_interrogation" class="container">
            <div id="init" class="row">
                <div class="form-group">
                    <label for="startpoint" class="col-md-offset-2">Please select a start point for your query :</label>
                    <select id='startpoints' size='4' class="form-control col-md-offset-2"></select>
                </div>
                <button  id="starter" class="btn btn-default col-md-offset-2" onclick="startVisualisation()">Start</button>
                <br><br><br>
                <div class="col-md-offset-2"><p>Or upload a sparql query file</p>
                    <div class="uploadBtn btn btn-default">
                        <span>Upload query</span>
                        <input id="uploadBtn" type="file" class="upload">
                    </div>
                </div>
            </div>
            <div id="queryBuilder" class="row" hidden>
                <div id="graph" class="col-md-6">
                    <div class="uploadBtn btn btn-default">
                        <span>Upload query</span>
                        <input id="uploadBtn" type="file" class="upload">
                    </div>
                    <div class="btn-group btn-group-query">
                        <span id="btn-qdown" class="btn btn-default">Download query</span>
                    </div>
                    <div id="svgdiv"></div>
                    <div id="uploadedQuery" class="uploadedQuery" hidden contenteditable></div>
			<div class="btn-group">
                            <button id="btn-down" type="submit" class="btn btn-default" onclick="downloadResultsFile(10000)">
                                <span class="glyphicon glyphicon-save"></span> Download results
                            </button>
                            <!--<button id="btn-file" type="button" class="btn btn-default" onclick="generateResultFile(10000)">
                                Results file
                            </button>-->
                        </div>
                        <div class="btn-group btn-group-query">
                            <button type="button" class="btn btn-default" onclick="viewQueryResults()">Launch query</button>
                            <button type="button" class="btn btn-default" onclick="window.location.reload()">Reset</button>
                        </div>

                </div>

                <div id="viewDetails" class="col-md-6">
                    <h3 class="header-div">Filter <span id="objectName" class="label label-default"></span> on
                    <div class="btn-group btn-group-query">
                        <span id="showNode" class="glyphicon glyphicon-eye-open" aria-hidden="true"></span>
                        <span id="deleteNode" class="glyphicon glyphicon-remove-circle" aria-hidden="true"></span>
                    </div></h3>

                    <hr/>
                </div>
             </div>
            <div id="results" class="row results-div"></div>
        </div>

        <div id="content_integration" class="container" hidden>
            <div id="overview" class="row"></div>
        </div>
        <div id="content_statistics" class="container" hidden>
            <div id="statistics" class="row"></div>
        </div>

        <div id="content_about" class="container" hidden>
          <hr/>
          <h3 class="header-div">Project</h3>
          <p>
          AskOmics is being developed by <NAME> and <NAME> as
          a contribution to the <a href="http://www.agence-nationale-recherche.fr/?Project=ANR-11-BSV6-0017">MiRNAdapt project</a>,
          but should be applicable to any RDF dataset.
          </p>
          <p>
          It is based on an abstract representation of the MiRNAdapt data which
          was created manually but should be replaced by the result of RDFmap in
          the future.
          </p>
          <p>
          AskOmics uses <a href="http://d3js.org/">D3.js</a> to provide a visual
          representation of the abstraction as a graph.
          By starting from a node of interest and iteratively selecting its
          neighbors, the user creates a path on the abstraction graph.
          This path can then be transformed into a SPARQL query that can be
          executed on the original dataset.
         </p>
          <hr/>
          <h3 class="header-div">Contributors</h3>
           <ul>
            <li><NAME></li>
            <li><NAME></li>
            <li><NAME></li>
            <li><NAME></li>
			<li><NAME></li>
            <li><NAME></li>
            <li><NAME></li>
            <li><NAME></li>
            <li><NAME></li>
			<li><NAME></li>
          </ul>
        </div>

        <!-- Modal  -->
        <div class="modal fade" id="modal"  role="dialog" tabindex="-1" aria-labelledby="myModalLabel" aria-hidden="true" >
          <div class="modal-dialog modal-sm">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="modalMessage"></h4>
              </div>
              <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal" id="modalButton"></button>
              </div>
            </div><!-- /.modal-content -->
          </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->

        <!-- Modal  -->
        <div class="modal fade" id="modalSuggestionLink"  role="dialog" tabindex="-1" aria-labelledby="myModalLabel" aria-hidden="true" >
          <div class="modal-dialog modal-md">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="modalMessageSuggestionLink"></h4>
              </div>
              <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal" id="modalButtonSuggestionLink"></button>
              </div>
            </div><!-- /.modal-content -->
          </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->


        <!-- The template to display preview of source files -->
        <script id="template-source_file-preview" type="text/x-handlebars-template">
            {{#each files}}
                <form class="template-source_file form-horizontal text-center">
                    <h4 class="file_name">{{ this.name }}</h4>
                    <br>
                    {{#if error}}
                        <p class="error">{{ error }}</p>
                    {{else}}
                        <table class='table table-striped preview_table'>
                            <thead>
                                <tr>
                                {{#each headers}}
                                    <th class='column_header'>
                                        {{#unless @first}}
                                            <input type='checkbox' class='toggle_column' checked />
                                        {{/unless}}
                                        {{ this }}

                                        <img src='/static/images/icons/ok.png' class='relation_present' title='Data with this name is already present in the database' width='24' height='24' />
                                        <img src='/static/images/icons/new.png' class='relation_new' title='No data with this name was found in the database' width='24' height='24' />
                                    </th>
                                {{/each}}

                                </tr>
                                <tr>
                                {{#each headers}}
                                    <th>
                                        <select class='column_type form-control'>
                                            {{#if @first}}
                                                <optgroup label='Relationship'>
                                                    <option value='entity_start'>Entity (Start)</option>
                                                    <option value='entity'>Entity</option>
                                            {{else}}
                                                <optgroup label='Attributes'>
                                                    <option value='numeric'>Numeric</option>
                                                    <option value='text'>Text</option>
                                                    <option value='category'>Category</option>
                                                </optgroup>
                                                <optgroup label='Position attributes'>
                                                    <option value='taxon'>Taxon</option>
                                                    <option value='ref'>Reference</option>
                                                    <option value='start'>Start</option>
                                                    <option value='end'>End</option>
                                                </optgroup>
                                                <optgroup label='Relationship'>
                                                    <option value='entity'>Relation</option>
                                                    <option value='entitySym'>Symmetric Relation</option>
                                                </optgroup>
                                            {{/if}}
                                        </select>
                                    </th>
                                {{/each}}

                                </tr>
                            </thead>
                            <tbody>
                                {{#each preview_data}}
                                    <tr>
                                        {{#each this}}
                                            <td>
                                                {{ this }}
                                            </td>
                                        {{/each}}
                                    </tr>
                                {{/each}}
                            </tbody>
                        </table>
                        <pre class='preview_field'></pre>
                        <p class="insert_status text-left alert hidden"></p>
                        <div class="warning-message hidden"></div>
                        <div class="form-group form-inline">
                            <div class="btn-group" role="group" aria-label="metadata">
                                <input type="button" class="btn btn-success preview_button" value="Preview RDF" />
                                <input type="button" class="btn btn-primary load_data" value="Insert in database" />
                            </div>
                        </div>
                    {{/if}}
                </form>
                <hr />
            {{/each}}
        </script>

        <!-- The template to display ttl preview -->
        <script id="template-ttl-preview" type="text/x-handlebars-template">{{ header }}

=============
=  Content  =
=============

{{ content_ttl }}

=================
=  Abstraction  =
=================

{{ abstraction_ttl }}

======================
=  Domain knowledge  =
======================

{{ domain_knowledge_ttl }}
        </script>
    </body>
</html>
<commit_msg>repair the css pygments to preview rdf.<commit_after><!DOCTYPE html>
<html lang="${request.locale_name}">
    <head>
        <meta charset="utf-8">
        <title>Visual SPARQL query builder for an RDF database</title>
        <!--
        <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
        <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js"></script>
      -->
        <script src="static/js/third-party/d3.min.js" charset="utf-8"></script>
        <script src="static/js/third-party/jquery-1.12.4.min.js"></script>
        <script src="static/js/third-party/jquery-ui-1.11.4/jquery-ui.min.js"></script>

        <!-- The Templates plugin is included to render the upload/download listings -->
        <script src="//blueimp.github.io/JavaScript-Templates/js/tmpl.min.js"></script>

        <script src="static/js/third-party/bootstrap.js"></script>
        <script src="static/js/third-party/handlebars-v4.0.5.js"></script>


        <script src="static/js/MainAskomics.js"></script>
        <script src="static/js/query-handler.js"></script>
        <script src="static/js/integration.js"></script>
        <script src="static/js/AskomicsRestManagement.js"></script>
        <script src="static/js/AskomicsUserAbstraction.js"></script>
        <script src="static/js/AskomicsGraphBuilder.js"></script>
        <script src="static/js/AskomicsAttributesView.js"></script>
        <script src="static/js/AskomicsNodeView.js"></script>
        <script src="static/js/AskomicsLinksView.js"></script>
        <script src="static/js/AskomicsForceLayoutManager.js"></script>

        <link href="static/css/bootstrap.css" rel="stylesheet" type="text/css">
        <link href="static/css/style.css" rel="stylesheet" type="text/css">
        <link href="static/css/pygment.css" rel="stylesheet" type="text/css">
    </head>

    <body>
        <nav class="navbar navbar-default">
            <div id="navbar_content" class="container">
                <div class="navbar-header">
                    <a class="navbar-brand site-header" href="/">${project}</a>
                </div>

                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                    <ul class="nav navbar-nav navbar-right">
                        <li id="interrogation" class="active"><a href="#" onclick="loadStartPoints();">Ask!</a></li>
                        <li id="integration"><a href="#">Upload</a></li>
                        <li id="statistics"><a href="#" onclick="loadStatistics(true);" >Stats</a></li>
                        <li id="about"><a href="#">About</a></li>
                    </ul>
                </div>
            </div>
        </nav>
        <div id="content_interrogation" class="container">
            <div id="init" class="row">
                <div class="form-group">
                    <label for="startpoint" class="col-md-offset-2">Please select a start point for your query :</label>
                    <select id='startpoints' size='4' class="form-control col-md-offset-2"></select>
                </div>
                <button  id="starter" class="btn btn-default col-md-offset-2" onclick="startVisualisation()">Start</button>
                <br><br><br>
                <div class="col-md-offset-2"><p>Or upload a sparql query file</p>
                    <div class="uploadBtn btn btn-default">
                        <span>Upload query</span>
                        <input id="uploadBtn" type="file" class="upload">
                    </div>
                </div>
            </div>
            <div id="queryBuilder" class="row" hidden>
                <div id="graph" class="col-md-6">
                    <div class="uploadBtn btn btn-default">
                        <span>Upload query</span>
                        <input id="uploadBtn" type="file" class="upload">
                    </div>
                    <div class="btn-group btn-group-query">
                        <span id="btn-qdown" class="btn btn-default">Download query</span>
                    </div>
                    <div id="svgdiv"></div>
                    <div id="uploadedQuery" class="uploadedQuery" hidden contenteditable></div>
			<div class="btn-group">
                            <button id="btn-down" type="submit" class="btn btn-default" onclick="downloadResultsFile(10000)">
                                <span class="glyphicon glyphicon-save"></span> Download results
                            </button>
                            <!--<button id="btn-file" type="button" class="btn btn-default" onclick="generateResultFile(10000)">
                                Results file
                            </button>-->
                        </div>
                        <div class="btn-group btn-group-query">
                            <button type="button" class="btn btn-default" onclick="viewQueryResults()">Launch query</button>
                            <button type="button" class="btn btn-default" onclick="window.location.reload()">Reset</button>
                        </div>

                </div>

                <div id="viewDetails" class="col-md-6">
                    <h3 class="header-div">Filter <span id="objectName" class="label label-default"></span> on
                    <div class="btn-group btn-group-query">
                        <span id="showNode" class="glyphicon glyphicon-eye-open" aria-hidden="true"></span>
                        <span id="deleteNode" class="glyphicon glyphicon-remove-circle" aria-hidden="true"></span>
                    </div></h3>

                    <hr/>
                </div>
             </div>
            <div id="results" class="row results-div"></div>
        </div>

        <div id="content_integration" class="container" hidden>
            <div id="overview" class="row"></div>
        </div>
        <div id="content_statistics" class="container" hidden>
            <div id="statistics" class="row"></div>
        </div>

        <div id="content_about" class="container" hidden>
          <hr/>
          <h3 class="header-div">Project</h3>
          <p>
          AskOmics is being developed by <NAME> and <NAME> as
          a contribution to the <a href="http://www.agence-nationale-recherche.fr/?Project=ANR-11-BSV6-0017">MiRNAdapt project</a>,
          but should be applicable to any RDF dataset.
          </p>
          <p>
          It is based on an abstract representation of the MiRNAdapt data which
          was created manually but should be replaced by the result of RDFmap in
          the future.
          </p>
          <p>
          AskOmics uses <a href="http://d3js.org/">D3.js</a> to provide a visual
          representation of the abstraction as a graph.
          By starting from a node of interest and iteratively selecting its
          neighbors, the user creates a path on the abstraction graph.
          This path can then be transformed into a SPARQL query that can be
          executed on the original dataset.
         </p>
          <hr/>
          <h3 class="header-div">Contributors</h3>
           <ul>
            <li><NAME></li>
            <li><NAME></li>
            <li><NAME></li>
            <li><NAME></li>
			<li><NAME></li>
            <li><NAME></li>
            <li><NAME></li>
            <li><NAME></li>
            <li><NAME></li>
			<li><NAME></li>
          </ul>
        </div>

        <!-- Modal  -->
        <div class="modal fade" id="modal"  role="dialog" tabindex="-1" aria-labelledby="myModalLabel" aria-hidden="true" >
          <div class="modal-dialog modal-sm">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="modalMessage"></h4>
              </div>
              <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal" id="modalButton"></button>
              </div>
            </div><!-- /.modal-content -->
          </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->

        <!-- Modal  -->
        <div class="modal fade" id="modalSuggestionLink"  role="dialog" tabindex="-1" aria-labelledby="myModalLabel" aria-hidden="true" >
          <div class="modal-dialog modal-md">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="modalMessageSuggestionLink"></h4>
              </div>
              <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal" id="modalButtonSuggestionLink"></button>
              </div>
            </div><!-- /.modal-content -->
          </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->


        <!-- The template to display preview of source files -->
        <script id="template-source_file-preview" type="text/x-handlebars-template">
            {{#each files}}
                <form class="template-source_file form-horizontal text-center">
                    <h4 class="file_name">{{ this.name }}</h4>
                    <br>
                    {{#if error}}
                        <p class="error">{{ error }}</p>
                    {{else}}
                        <table class='table table-striped preview_table'>
                            <thead>
                                <tr>
                                {{#each headers}}
                                    <th class='column_header'>
                                        {{#unless @first}}
                                            <input type='checkbox' class='toggle_column' checked />
                                        {{/unless}}
                                        {{ this }}

                                        <img src='/static/images/icons/ok.png' class='relation_present' title='Data with this name is already present in the database' width='24' height='24' />
                                        <img src='/static/images/icons/new.png' class='relation_new' title='No data with this name was found in the database' width='24' height='24' />
                                    </th>
                                {{/each}}

                                </tr>
                                <tr>
                                {{#each headers}}
                                    <th>
                                        <select class='column_type form-control'>
                                            {{#if @first}}
                                                <optgroup label='Relationship'>
                                                    <option value='entity_start'>Entity (Start)</option>
                                                    <option value='entity'>Entity</option>
                                            {{else}}
                                                <optgroup label='Attributes'>
                                                    <option value='numeric'>Numeric</option>
                                                    <option value='text'>Text</option>
                                                    <option value='category'>Category</option>
                                                </optgroup>
                                                <optgroup label='Position attributes'>
                                                    <option value='taxon'>Taxon</option>
                                                    <option value='ref'>Reference</option>
                                                    <option value='start'>Start</option>
                                                    <option value='end'>End</option>
                                                </optgroup>
                                                <optgroup label='Relationship'>
                                                    <option value='entity'>Relation</option>
                                                    <option value='entitySym'>Symmetric Relation</option>
                                                </optgroup>
                                            {{/if}}
                                        </select>
                                    </th>
                                {{/each}}

                                </tr>
                            </thead>
                            <tbody>
                                {{#each preview_data}}
                                    <tr>
                                        {{#each this}}
                                            <td>
                                                {{ this }}
                                            </td>
                                        {{/each}}
                                    </tr>
                                {{/each}}
                            </tbody>
                        </table>
                        <pre class='preview_field'></pre>
                        <p class="insert_status text-left alert hidden"></p>
                        <div class="warning-message hidden"></div>
                        <div class="form-group form-inline">
                            <div class="btn-group" role="group" aria-label="metadata">
                                <input type="button" class="btn btn-success preview_button" value="Preview RDF" />
                                <input type="button" class="btn btn-primary load_data" value="Insert in database" />
                            </div>
                        </div>
                    {{/if}}
                </form>
                <hr />
            {{/each}}
        </script>

        <!-- The template to display ttl preview -->
        <script id="template-ttl-preview" type="text/x-handlebars-template">{{ header }}

=============
=  Content  =
=============

{{ content_ttl }}

=================
=  Abstraction  =
=================

{{ abstraction_ttl }}

======================
=  Domain knowledge  =
======================

{{ domain_knowledge_ttl }}
        </script>
    </body>
</html>

{'fraction_non_alphanumeric': 0.14595496246872394, 'fraction_numerical': 0.005351681957186544, 'mean_word_length': 1.2824397208121827, 'pattern_counts': {'":': 0, '<': 662, '<?xml version=': 0, '>': 662, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 144, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '488408', 'n_tokens_mistral': 7209, 'n_tokens_neox': 6764, 'n_words': 1427}