<commit_before>{% extends "base.html" %}
{% set active_page = 'viz' %}
{% set is_analysis = True %}

{% block head %}
<style>
/* Prevents I-bar cursor over text in Firefox */
body { cursor: default }
</style>
<script type="text/javascript" src="{{ url_for('static', filename='jquery.multiselect.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='d3.tip.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='scripts_viz.js') }}"></script>
<link href="{{ url_for('static', filename='jquery.multiselect.css') }}" rel="stylesheet">

<script>
	var dataset = {
		"name": "tokens",
		"children": [
			{% for key, value in wordDict.iteritems() %}
				{"name": "{{ key|e }}", "size": {{ value|e }} },
			{% endfor %}
		]
	};
</script>
{% endblock %}

{% block title %}analyzer{% endblock %}

{% block formstart %}
<form id="viz" action="" method="POST" enctype="multipart/form-data">
{% endblock %}


{% block field %}

<legend>BubbleViz Options</legend>
<div id="vizoptionsbox">
	<div id="vizcreateoptions">
		
		<div class="vizoptions">
			<select id="segmentlist" name="segmentlist" multiple="multiple">
				{% for item in segments %}
				<option value="{{ item }}" {{ 'selected' if item in request.form.getlist('segmentlist') }}>{{ item }}</option>
				{% endfor %}
			</select>
			<br />
			Large graphs can take a while to render.
		</div>

	</div>

	<div class="vizoptions">
		<label for="minlength">Minimum Word Length:
		<input id="minlength" name="minlength" value="{{ request.form['minlength'] if request.form['minlength'] else '0' }}"/>
		<!-- <input type="hidden" id="ml" name="ml" value="{{ request.form['minlength'] if request.form['minlength'] else '0' }}" /> -->
		</label>
	</div>

	<div class="vizoptions">
		<label for="graphsize">Graph Size:
		<input id="graphsize" name="graphsize" value="{{ request.form['graphsize'] if request.form['graphsize'] else '800' }}"/>
		<!-- <input type="hidden" id="gs" name="gs" value="{{ request.form['graphsize'] if request.form['graphsize'] else '800' }}" /> -->
		</label>
	</div>

</div>
{% endblock %}

{% block content %}
{% if words == "" %}
<h4 id="nosegments">Please select the segments for the graph.</h4>

{% else %}

<div id="viz"></div>

{% endif %}
{% endblock %}


{% block submit %}
<input class="bttn bttn-action" id="getviz" type="submit" value="Get Graph"/>
{% endblock %}<commit_msg>Changes call to d3.tip.js to d3.tip.min.js<commit_after>{% extends "base.html" %}
{% set active_page = 'viz' %}
{% set is_analysis = True %}

{% block head %}
<style>
/* Prevents I-bar cursor over text in Firefox */
body { cursor: default }
</style>
<script type="text/javascript" src="{{ url_for('static', filename='jquery.multiselect.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='d3.tip.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='scripts_viz.js') }}"></script>
<link href="{{ url_for('static', filename='jquery.multiselect.css') }}" rel="stylesheet">

<script>
	var dataset = {
		"name": "tokens",
		"children": [
			{% for key, value in wordDict.iteritems() %}
				{"name": "{{ key|e }}", "size": {{ value|e }} },
			{% endfor %}
		]
	};
</script>
{% endblock %}

{% block title %}analyzer{% endblock %}

{% block formstart %}
<form id="viz" action="" method="POST" enctype="multipart/form-data">
{% endblock %}


{% block field %}

<legend>BubbleViz Options</legend>
<div id="vizoptionsbox">
	<div id="vizcreateoptions">
		
		<div class="vizoptions">
			<select id="segmentlist" name="segmentlist" multiple="multiple">
				{% for item in segments %}
				<option value="{{ item }}" {{ 'selected' if item in request.form.getlist('segmentlist') }}>{{ item }}</option>
				{% endfor %}
			</select>
			<br />
			Large graphs can take a while to render.
		</div>

	</div>

	<div class="vizoptions">
		<label for="minlength">Minimum Word Length:
		<input id="minlength" name="minlength" value="{{ request.form['minlength'] if request.form['minlength'] else '0' }}"/>
		<!-- <input type="hidden" id="ml" name="ml" value="{{ request.form['minlength'] if request.form['minlength'] else '0' }}" /> -->
		</label>
	</div>

	<div class="vizoptions">
		<label for="graphsize">Graph Size:
		<input id="graphsize" name="graphsize" value="{{ request.form['graphsize'] if request.form['graphsize'] else '800' }}"/>
		<!-- <input type="hidden" id="gs" name="gs" value="{{ request.form['graphsize'] if request.form['graphsize'] else '800' }}" /> -->
		</label>
	</div>

</div>
{% endblock %}

{% block content %}
{% if words == "" %}
<h4 id="nosegments">Please select the segments for the graph.</h4>

{% else %}

<div id="viz"></div>

{% endif %}
{% endblock %}


{% block submit %}
<input class="bttn bttn-action" id="getviz" type="submit" value="Get Graph"/>
{% endblock %}
{'fraction_non_alphanumeric': 0.22005958291956307, 'fraction_numerical': 0.004766633565044687, 'mean_word_length': 3.937254901960784, 'pattern_counts': {'":': 8, '<': 91, '<?xml version=': 0, '>': 91, 'https://': 0, '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': '4780074', 'n_tokens_mistral': 1872, 'n_tokens_neox': 1661, 'n_words': 403}