forked from stormysmoke/sent2vec-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
86 lines (72 loc) · 3.55 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
<!DOCTYPE html>
<html>
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-114508224-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-114508224-2');
</script>
<title>Sent2Vec</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700" rel="stylesheet">
<link rel="stylesheet" href="style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="client.js"></script>
<!-- Favicon -->
<link rel="apple-touch-icon" sizes="76x76" href="favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
<link rel="manifest" href="favicon/site.webmanifest">
<link rel="mask-icon" href="favicon/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="favicon/favicon.ico">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="favicon/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
</head>
<body>
<main>
<h1>Sent2Vec</h1>
<p>Sentence Embedding Demo</p>
<div id="intro">
<p><b>How does it work?</b></p>
<ol>
<li>Encode an arbitrary piece of text.</li>
<li>Extract the sentences that are closest in meaning to a query sentence of your choice.</li>
</ol>
<p><b>Note:</b> this demo does not answer questions. It extracts the sentences from the text that are semantically most similar to your query sentence (its k-nearest-neighbours).</p>
<p>Each extracted sentence has an associated <b>distance</b>. The closer this distance is to zero, the more semantically similar the sentence is to your query sentence.</p>
<p>To better see how it works, start by querying an exact copy of a sentence appearing in the text. Then alter one word, and so on, and observe the reported distances.</p>
</div>
<div class="loading" id="loading-background"></div>
<div class="loading" id="loading-spinner"></div>
<div id="div-query">
<h2>Extract</h2>
<p class="description">Enter a query sentence for which to find the k-nearest-neighbours:</p>
<input id="input-query" type="text" name="query">
<button id="submit-query">Extract</button>
</div>
<div id="div-result">
<h2>Result</h2>
<p class="description">The k-nearest-neighbours for your query sentence (k = 3):</p>
<div id="output-result"></div>
</div>
<div id="div-text">
<h2>Encode</h2>
<p class="description">Enter some text to encode:</p>
<button id="submit-text">Encode</button>
<textarea id="input-text"></textarea>
</div>
<div id="div-reference">
<h2>Reference</h2>
<p class="description">The sentence embedding model used in this demo has been created at the <a href="https://www.utoronto.ca/">University of Toronto</a>, and is described in the following paper:</p>
<ul class="description"><li>R. Kiros, Y. Zhu, R. Salakhutdinov, et al. <a href="http://papers.nips.cc/paper/5950-skip-thought-vectors"><b>Skip-Thought Vectors</b></a>.</li>
<ul><li>In <i>Advances in Neural Information Processing Systems 28 (NIPS 2015).</i></li></ul>
</ul>
</div>
</main>
</body>
</html>