-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
54 lines (47 loc) · 2.14 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Vocabulary gradient</title>
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<style>
body {
font-family: 'Open Sans', sans-serif;
}
#canvas {
border: solid 1px #000;
}
</style>
</head>
<body>
<h1>Enter the text you want to analyze</h1>
<textarea id="text" name="text" id="" rows="10" style="width: 100%;"></textarea>
<button onclick="process();">Submit</button>
<h1>Statistics</h1>
<div>The following statistics are based on the index of the word in the word frequency list. Lower index indicates that the word is more often used than higher index words. In other words, frequency(low index) > frequency(high index).</div>
<div id="statistics">
<div>Minimum index: <span id="min">∅</span></div>
<div>Average index: <span id="avg">∅</span></div>
<div>Median index: <span id="med">∅</span></div>
<div>Maximum index: <span id="max">∅</span></div>
<div>Std Dev: <span id="stddev">∅</span></div>
<div>Word count: <span id="word-count">∅</span></div>
<div>Unique word count: <span id="unique-word-count">∅</span></div>
<div>Fingerprint: <pre id="fingerprint">∅</pre></div>
<div>Processed in <span id="processing-time">∅</span> s.</div>
<div id="distribution" style="width: 100%; height: 500px;"></div>
</div>
<h1>Vocabulary code</h1>
<div id="chart"></div>
<br/>
<h1>Text</h1>
<div>The following section displays the text you have input, colored according to the expected frequency of the word, white/light being very frequent words while black/dark represents infrequent words. In yellow are displayed the words that are not part of the known frequency dictionary.</div>
<div id="processed-text"></div>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript" src="d3.js"></script>
<script type="text/javascript" src="big.js"></script>
<script type="text/javascript" src="vocabulary-code.js"></script>
<script type="text/javascript" src="word-frequencies.js"></script>
<script type="text/javascript" src="app.js"></script>
</body>
</html>