-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
24 lines (21 loc) · 1.13 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
<html>
<head>
<title>ml5 - Sentiment</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/p5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.dom.min.js"></script>
<script src="https://unpkg.com/ml5@latest/dist/ml5.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body style = " font-family: courier; background-color: #f4e0ff">
<h1 style="font-family: courier new">Sophie's Sentiment Analysis Demo</h1>
<p>
This example uses model trained on movie reviews. This model scores the sentiment of text with
a value between 0 ("negative") and 1 ("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>
<p>
Try entering a variety phrases and individual words. What do you notice? What surprises you? I'll go first: "We hate you, please die" from <i> Scott Pilgrim vs. The World </i> has a sentiment score of 0.9996048212051392.
</p>
<script src="sketch.js"></script>
</body>
</html>