-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.php
72 lines (72 loc) · 2.54 KB
/
main.php
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
<?php header('Content-type: text/html; charset=utf-8'); ?>
<html>
<head>
<title>C5 + Arc Eager Shift Reduce</title>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="includes/jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="includes/underscore-min.js"></script>
<script type="text/javascript" src="includes/raphael-min.js"></script>
<script type="text/javascript" src="includes/sigma.min.js"></script>
<script type="text/javascript" src="includes/dracula_graffle.js"></script>
<script type="text/javascript" src="includes/dracula_graph.js"></script>
<script type="text/javascript" src="includes/dracula_algorithms.js"></script>
<script type="text/javascript" src="includes/d3.min.js"></script>
<script type="text/javascript" src="includes/c5.js"></script>
<script type='text/javascript' src='includes/jsapi.js'></script>
<script type="text/javascript" src="generator/results/data.js"></script>
<script type="text/javascript">
var model;
function myFunction(){
model = c5(examples,'move',features);
drawGraph(model,'canvas');
renderTrainingData(examples,$("#training"),'move',features);
}
</script>
</head>
<body onload="myFunction()">
<div id="main">
<div id="data-container">
<div id='canvas'></div>
<input type="text" id="stack" name="stack" placeholder="Top word in stack"/>
<input type="text" id="buffer" name="buffer" placeholder="Next word in buffer"/>
<input type="text" id="stackTopHasArc" name="stackTopHasArc" placeholder="Top word in stack has an arc"/>
<input type="text" id="bufferNextHasArc" name="bufferNextHasArc" placeholder="Next word in buffer has an arc"/>
<input type="button" name="submit" value="minēt" onclick="
renderSamples(
[{
stack:$('#stack').val(),
buffer:$('#buffer').val(),
bufferNextHasArc:$('#bufferNextHasArc').val(),
stackTopHasArc:$('#stackTopHasArc').val()
}],
$('#samples'),
model,
'move',
features
);
"/>
<h3>Pāris minējumi</h3>
<table border="1" id='samples'>
<tr>
<th>Stack</th>
<th>Buffer</th>
<th>StackTopHasArc</th>
<th>BufferNextHasArc</th>
<th>Move</th>
</tr>
</table>
<h4>Treniņu dati</h4>
<table border="1" style="font-size:12px;" id='training'>
<tr>
<th>Stack</th>
<th>Buffer</th>
<th>StackTopHasArc</th>
<th>BufferNextHasArc</th>
<th>Move</th>
</tr>
</table>
</div>
</div>
</body>
</html>