<commit_before><!DOCTYPE html>
<html lang="en">
<head>
  <title>Inverted Index</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
  <link rel="stylesheet" type="text/css" href="../css/style.css">
</head>
<body ng-app="invertedIndexModule"  ng-controller="invertedIndexController">

<nav class="navbar navbar-inverse">
  <div class="container-fluid">
    <div class="navbar-header">
      <a class="navbar-brand" href="#">Inverted Index Web App</a>
    </div>

      <ul class="nav navbar-nav navbar-right">
        <li><a href="#"><span></span> By <NAME></a></li>
      </ul>
  </div>
</nav>
  
<div class="container-fluid text-center">
  <div class="row content">
    <div class="col-sm-4 sidenav">
      <label class="btn btn-info btn-default btn-file" style="width: 100%; margin-top: 1em">
    	Upload Book Files  
      <input id="file_browser" accept=".json" type="file" style="display:none" multiple><span class="glyphicon glyphicon-book"></span>
		</label>
    <div class="input-group" style="width: 100%; margin-top: 1em">
      <select  ng-model="selectedFile" class="form-control" ng-options="file.name.replace('.json', '') for file in uploadedFiles"> 
      <option value="" selected="selected">Select a Book File</option>
      </select>            
      <span class="input-group-btn">
        <button class="btn btn-primary" type="button" tabindex="-1" ng-click="createIndex(selectedFile)">Create Index <span class="glyphicon glyphicon-list-alt"></span></button>
      </span>
    </div>
      <div>
        <h4>{{uploadedFiles.length > 0 ? uploadedFiles.length + ' Files Uploaded' : 'No Files Uploaded'}}</h4>
      </div>
      <div>
        <h5 class="warningfeedback">{{indexingFeedback}}</h5>
      </div>
    </div>
    <div class="col-sm-8 text-left main">
    <!--Rely on if filesIndex is undefined or not before we show this section-->
    <div ng-show="!filesIndex">
    	<h2>Welcome to the Inverted Index Web App...</h2>
    	<ol>
    		<li>Upload Json Book Files from your machine by clicking the Upload Book Files button on the left</li>
    		<li>Generate an Index for the book file by clicking on the book in the upload list</li>
    		<li>Search the Index by entering a search query in the search field and press the search button</li>
    		<li>Wait for the search results to be displayed</li>
    	</ol>
    </div>
      <div class="input-group" ng-show="filesIndex">
      <span style="min-width: 100px" class="input-group-btn">
          <select  ng-model="searchFile" class="form-control" ng-options="file.name.replace('.json', '') for file in indexedFiles"> 
        <option value="" selected="selected">All</option>
        </select> 
        </span>
        <input type="text" class="form-control" placeholder="Search Index" ng-model="queryText">
        <span class="input-group-btn">
          <button class="btn btn-default" type="button" ng-click="search(queryText, searchFile)">
            <span class="glyphicon glyphicon-search"></span>
          </button>
        </span>
       </div>
      <hr>
      <!-- Table section.-->
      <div ng-repeat="(key, value) in tableFiles">
      <!-- title of File -->
        <h4 style="text-align: center; min-width: 100%; ">File : {{ key.replace('.json', '')}}</h4>
        <!-- Create table -->
        <table class="table table-responsive table-striped table-bordered" style="max-height: 30px; overflow-y:scroll; text-align: center;">
        <thead style="background: black; color: white">
          <tr>
            <th style="text-align: center">Word</th>
            <!-- index[1] is a word<==>set map -->
            <th style="text-align: center" ng-repeat="tableHead in tableHeader[key]">Doc {{tableHead + 1}}</th>            
          </tr>
        </thead>        
        <tbody>
        <tr ng-repeat="(key2, value2) in value"> <td>{{key2}}</td> <td ng-repeat="row in tableHeader[key]"><span class="glyphicon glyphicon-{{value2.indexOf(row) >= 0?'ok':'remove'}}"></span></td></tr>
        </tbody>
      </table>
      </div>

      <div ng-show="showIndexTable">
      <div style="max-height: 500px; overflow-y: auto;" >
    	<table class="table table-responsive table-striped table-bordered" style="max-height: 30px; overflow-y:scroll; text-align: center;">
      	<thead style="background: black; color: white">
      		<tr>
      			<th style="text-align: center">Word </th>
						<th ng-repeat="docId in headerArray" style="text-align: center">Doc {{docId + 1}}</th>      			
      		</tr>
      	</thead>      	
      	<tbody>
      	<tr ng-repeat="item in createdIndex"> <td>{{item[0]}}</td> <td ng-repeat="value in headerArray"><span class="glyphicon glyphicon-{{item[1].has(value)?'ok':'remove'}}"></span></td></tr>
      	</tbody>
      </table>
      </div>
      </div>
  </div>
</div>

<script src="../js/inverted-index.js"></script>
<script src="../js/app.js"></script>
</body>
</html><commit_msg>remove unnecessary div<commit_after><!DOCTYPE html>
<html lang="en">
<head>
  <title>Inverted Index</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
  <link rel="stylesheet" type="text/css" href="../css/style.css">
</head>
<body ng-app="invertedIndexModule"  ng-controller="invertedIndexController">

<nav class="navbar navbar-inverse">
  <div class="container-fluid">
    <div class="navbar-header">
      <a class="navbar-brand" href="#">Inverted Index Web App</a>
    </div>

      <ul class="nav navbar-nav navbar-right">
        <li><a href="#"><span></span> By <NAME></a></li>
      </ul>
  </div>
</nav>
  
<div class="container-fluid text-center">
  <div class="row content">
    <div class="col-sm-4 sidenav">
      <label class="btn btn-info btn-default btn-file" style="width: 100%; margin-top: 1em">
    	Upload Book Files  
      <input id="file_browser" accept=".json" type="file" style="display:none" multiple><span class="glyphicon glyphicon-book"></span>
		</label>
    <div class="input-group" style="width: 100%; margin-top: 1em">
      <select  ng-model="selectedFile" class="form-control" ng-options="file.name.replace('.json', '') for file in uploadedFiles"> 
      <option value="" selected="selected">Select a Book File</option>
      </select>            
      <span class="input-group-btn">
        <button class="btn btn-primary" type="button" tabindex="-1" ng-click="createIndex(selectedFile)">Create Index <span class="glyphicon glyphicon-list-alt"></span></button>
      </span>
    </div>
      <div>
        <h4>{{uploadedFiles.length > 0 ? uploadedFiles.length + ' Files Uploaded' : 'No Files Uploaded'}}</h4>
      </div>
      <div>
        <h5 class="warningfeedback">{{indexingFeedback}}</h5>
      </div>
    </div>
    <div class="col-sm-8 text-left main">
    <!--Rely on if filesIndex is undefined or not before we show this section-->
    <div ng-show="!filesIndex">
    	<h2>Welcome to the Inverted Index Web App...</h2>
    	<ol>
    		<li>Upload Json Book Files from your machine by clicking the Upload Book Files button on the left</li>
    		<li>Generate an Index for the book file by clicking on the book in the upload list</li>
    		<li>Search the Index by entering a search query in the search field and press the search button</li>
    		<li>Wait for the search results to be displayed</li>
    	</ol>
    </div>
      <div class="input-group" ng-show="filesIndex">
      <span style="min-width: 100px" class="input-group-btn">
          <select  ng-model="searchFile" class="form-control" ng-options="file.name.replace('.json', '') for file in indexedFiles"> 
        <option value="" selected="selected">All</option>
        </select> 
        </span>
        <input type="text" class="form-control" placeholder="Search Index" ng-model="queryText">
        <span class="input-group-btn">
          <button class="btn btn-default" type="button" ng-click="search(queryText, searchFile)">
            <span class="glyphicon glyphicon-search"></span>
          </button>
        </span>
       </div>
      <hr>
      <!-- Table section.-->
      <div ng-repeat="(key, value) in tableFiles">
      <!-- title of File -->
        <h4 style="text-align: center; min-width: 100%; ">File : {{ key.replace('.json', '')}}</h4>
        <!-- Create table -->
        <table class="table table-responsive table-striped table-bordered" style="max-height: 30px; overflow-y:scroll; text-align: center;">
        <thead style="background: black; color: white">
          <tr>
            <th style="text-align: center">Word</th>
            <!-- index[1] is a word<==>set map -->
            <th style="text-align: center" ng-repeat="tableHead in tableHeader[key]">Doc {{tableHead + 1}}</th>            
          </tr>
        </thead>        
        <tbody>
        <tr ng-repeat="(key2, value2) in value"> <td>{{key2}}</td> <td ng-repeat="row in tableHeader[key]"><span class="glyphicon glyphicon-{{value2.indexOf(row) >= 0?'ok':'remove'}}"></span></td></tr>
        </tbody>
      </table>
      </div>
  </div>
</div>

<script src="../js/inverted-index.js"></script>
<script src="../js/app.js"></script>
</body>
</html>
{'fraction_non_alphanumeric': 0.18665192481656448, 'fraction_numerical': 0.010654337119308473, 'mean_word_length': 3.061224489795918, 'pattern_counts': {'":': 0, '<': 291, '<?xml version=': 0, '>': 295, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '71049', 'n_tokens_mistral': 3306, 'n_tokens_neox': 3140, 'n_words': 738}