-
Notifications
You must be signed in to change notification settings - Fork 110
/
example.html
45 lines (44 loc) · 1.98 KB
/
example.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
<!doctype html>
<html lang="en">
<head>
<title>termynal.js example</title>
<meta charset="utf-8">
<!-- include the termynal stylesheet -->
<link rel="stylesheet" href="termynal.css">
<!-- some custom styles for the page -->
<link href="https://fonts.googleapis.com/css?family=Fira+Mono">
<style>
body {
padding: 0; margin: 0;
background: #1a1e24;
width: 100%;
min-height: 100vh;
display: -webkit-box; display: -ms-flexbox; display: flex;
-webkit-box-align: center; -ms-flex-align: center; align-items: center;
-webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
</style>
</head>
<body>
<!-- the termynal container -->
<div id="termynal" data-termynal>
<span data-ty="input">pip install spacy</span>
<span data-ty="progress"></span>
<span data-ty>Successfully installed spacy</span>
<span data-ty></span>
<span data-ty="input">python -m spacy download en</span>
<span data-ty="progress"></span>
<span data-ty>Installed model 'en'</span>
<span data-ty></span>
<span data-ty="input">python</span>
<span data-ty="input" data-ty-prompt=">>>">import spacy</span>
<span data-ty="input" data-ty-prompt=">>>">nlp = spacy.load('en')</span>
<span data-ty="input" data-ty-prompt=">>>">doc = nlp(u'Hello world')</span>
<span data-ty="input" data-ty-prompt=">>>">print([(w.text, w.pos_) for w in doc])</span>
<span data-ty>[('Hello', 'INTJ'), ('world', 'NOUN')]</span>
</div>
<!-- include and initialise termynal.js -->
<script src="termynal.js" data-termynal-container="#termynal"></script>
</body>
</html>