-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
175 lines (165 loc) · 7.36 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- Javascript dependencies -->
<script type="text/javascript" src="js/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/vis.min.js"></script>
<script type="text/javascript" src="js/graph-create.js"></script>
<script type="text/javascript">
function load() {
$("#myOverlay").show();
loadWfGraphFiles();
}
load();
</script>
<!-- Stylesheets -->
<link href="css/bootstrap.min.css" rel="stylesheet"/>
<link href="css/vis.min.css" rel="stylesheet"/>
<link href="css/graph-create.css" rel="stylesheet"/>
<link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">
<title>WF Graph Viz</title>
</head>
<body>
<div id="myOverlay"><div class="loader"> Loading data... <br> Please wait. </div></div>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="/~lstanche/graph/"><i class="fa fa-home" aria-hidden="true"></i>
Word Form Graph Visualization</a>
</div>
<ul class="nav navbar-nav">
<li>
<a href ="#" onclick="$('#helpModal').modal('show');" style="cursor: pointer;">Help</a>
</li>
<li>
<a href ="#" onclick="$('#aboutModal').modal('show');" style="cursor: pointer;">About</a>
</li>
</ul>
</div>
</nav>
<div class="jumbotron">
<h1></h1>
<div class="container">
<p>
Search a word or phrase:
</p>
<p>
<div class="input-group">
<input type="text" class="form-control" placeholder="Enter a word..." id="searchWordInput">
<div class="input-group-btn">
<button class="btn btn-default" onclick="centerWord($('#searchWordInput').val().toLowerCase())">
Search <i class="fa fa-search" aria-hidden="true"></i>
</button>
</div>
<script type="text/javascript">
$('#searchWordInput').keypress(function (e) {
var key = e.which;
var word = $("#searchWordInput").val();
if (key == 13) // the enter key code
{
centerWord(word.toLowerCase());
return false;
}
});
</script>
</div>
</p>
</div>
</div>
<div class="sidebar">
<h4 style="margin-left: 5%; margin-top: 5%">Display Options</h4>
<div style="margin-left: 10%; margin-top: 5%">
<strong>Senses On/Off</strong><br>
<label class="switch">
<input type="checkbox" id="senseCheckbox" checked onchange="if (global_word.length > 0) {centerWord(global_word)}">
<div class="slider"></div>
</label>
<div class="form-group" style="width:50%">
<label for="sel1">Neighbor Limit</label>
<select class="form-control" id="sel1" onchange="if (global_word.length > 0) {centerWord(global_word)}">
<option value="10">10</option>
<option value="20">20</option>
<option value="30">30</option>
<option value="Unlimited">Unlimited</option>
</select>
<label for="depth">Depth</label>
<select class="form-control" id="depth" onchange="if (global_word.length > 0) {centerWord(global_word)}">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
</div>
</div>
</div>
<div class="container content">
<div class="row">
<div class="modal fade" id="aboutModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<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="aboutModalLabel">About the project...</h4>
</div>
<div class="modal-body">
<h4>Thank you for checking out the WF Graph Visualization project.</h4>
<p>
This tool was made as part of a senior project in 2017.
<br>
Singular words in most languages can have many different meanings (senses) so AI may have problems trying to understand
language. The graph helps us see the network between words and their senses, giving a weight that shows
the likely relevancy of a relationship between word and its sense.
</p>
<h4>
<a href="mailto:[email protected]?Subject=WFGraph%20Bug/Suggestion" target="_top">Please let me know if you find any bugs!</a>
</h4>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="helpModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<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="helpModalLabel">Welcome to the Word Form Graph Visualization Project</h4>
</div>
<div class="modal-body">
<h4>Note: Data load may take a while; There is a lot of it.</h4>
<ul>
<li>Search any word/phrase to start</li>
<li>Hover over a node to see full text</li>
<li>Drag nodes around to space them out</li>
<li>Use the scroll wheel to zoom in and out</li>
<li>Double click to explore a neighboring node</li>
</ul>
<h4>Legend:</h4>
<ul class="legend"><li><span class="word"></span> Word - blue </li> <li><span class="sense"></span> Sense - green </li></ul>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div>
<center>
<h3>
<div id="searchWord"></div>
</h3>
<div id="mynetwork" class="hidden">asdfasdfasdfas</div>
</center>
</div>
</div>
<hr>
<footer>
<p>© Theodore Tan - Senior Project - Last updated March 12th, 2017</p>
</footer>
</div>
</body>
</html>