-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSentiment-Analysis.html
41 lines (37 loc) · 1.69 KB
/
Sentiment-Analysis.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
<html>
<head>
<title>Sentiment Analysis</title>
<link rel="stylesheet" href="Sentiment-Analysis.css">
<style>
#rotation {
animation-name: rotate;
animation-duration: 6s;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
@keyframes rotate {
from {transform: rotate(0deg);}
to {transform: rotate(360deg);}
}
</style>
<script src="https://unpkg.com/ml5@0.4.3/dist/ml5.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<h1>Sentiment Analysis <i id="rotation" class="fa fa-cog" style="color:rgb(0, 121, 168);"></i></h1><br>
<p>This example uses ML5 model trained on movie reviews. This model scores the sentiment of text with a value between 0
("negative") and 10 ("positive"). The movie reviews were truncated to a maximum of 200 words and only
the 20,000 most common words in the reviews are used.</p><br>
<div id="show_div">
<p id="wait">Please wait <i id="rotation" class="fa fa-cog"></i> loading the model...</p>
</div>
<textarea id="text" cols="40" rows="5" maxlength="100"
style="max-width: 400px; max-height:200px; min-width: 400px; min-height:200px ;"
onkeyup="on_key_up()" onclick="document.getElementById('text').innerText =''"> Please write something here...</textarea>
<div id="newdiv">
<p style="font-size: 50px;">Score: <span id="score" style="font-size: 50px;">None </span>
<span id="show" style="font-size: 50px;margin-left: 99px;"></span></p>
</div>
<script src="Sentiment-Analysis.js"></script>
</body>
</html>