-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
146 lines (141 loc) · 6.31 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>such translate</title>
<link rel="stylesheet" href="shibe.css">
<script src="./lexer/lexer.js"></script>
<script src="./lexer/lexicon.js_"></script>
<script src="./lexer/POSTagger.js"></script>
<link rel="stylesheet" href="onoff.css">
</head>
<body>
<div class="wow" style="padding-left: 10em">wow</div>
<div id="shibe">
<a href="https://github.com/ertyseidel/shibe"><div id="github"></div></a>
<div>
<h2>Shibe Generator</h2>
<div class="wow" style="padding-left: 20em">wow</div>
<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch">
<label class="onoffswitch-label" for="myonoffswitch">
<div class="onoffswitch-inner"></div>
<div class="onoffswitch-switch"></div>
</label>
</div>
<div class="wow" style="padding-left: 7em">wow</div><div class="wow" style="padding-left: 10em">wow</div>
<p>"Translates" a text into shibe. Paste a large text into the "input" box, hit "generate", and enjoy your own personal shibe. Works better with larger texts (Shakespeare, anyone?).</p>
</div>
<div>
<p>Thanks very much to the LGPL'd <a href="https://code.google.com/p/jspos/">jspos library</a>, itself a js port of <a href="http://www.markwatson.com/opensource/">Mark Watson's FastTag</a>, which handles all of the heavy lifting of this program.</p>
</div>
<div class="wow" style="padding-left: 12em">wow</div>
<div>
<p>Input text: (Try <a id="shakespeare" style="color:blue;text-decoration:underline;cursor:pointer">Romeo and Juliet</a>)</p><textarea id="input" cols="80" rows="10"></textarea>
</div>
<div class="wow" style="padding-left: 6em">good doge</div>
<div class="wow" style="padding-left: 15em">wow</div>
<div>
<p>Settings:</p>
<p><label for="wow">"wow" density: </label><input id="wow" type="number" value="0.05" min="0" max="1" step="0.05"/></p>
<p><label for="phrasedensity">phrase density: </label><input id="phrasedensity" type="number" value="0.2" min="0" max="1" step="0.05"</></p>
<p><label for="blankchance">blank line chance: </label><input id="blankchance" type="number" value="0.75" min="0" max="1" step="0.05"/></p>
<p><label for="blacklist">words to ignore (comma seperated):</label><input id="blacklist" type="text" value="such,very" /></p>
</div>
<div class="wow" style="padding-left: 10em">wow</div>
<div class="wow" style="padding-left: 20em">wow</div>
<div>
<p>Phrases to use</p>
<ul>
<li>One Per Line</li>
<li>Parts of speech in brackets
<ul>
<li>i.e. [NN] = noun, [JJ] = adjective</li>
<li><a style="color:blue;text-decoration:underline;cursor:pointer" onclick="var t=document.getElementById('taglist');if(t.style.display=='block'){t.style.display='none';}else{t.style.display='block';}">Show/Hide parts-of-speech List</a></li>
</ul>
</li>
<div class="wow" style="padding-left: 15em">trole</div>
<li>The more *s before a line, the more likely that phrase is to show up.</li>
<li>"wow"s are added automatically, controlled by the "wow density" input above.</li>
</ul>
</p><textarea id="phrases" cols="30" rows="10"></textarea>
</div>
<div class="wow" style="padding-left: 30em">wow</div>
<script type="text/javascript">
document.getElementById("phrases").value += "**such [NN]\n";
document.getElementById("phrases").value += "*so much [NN]\n";
document.getElementById("phrases").value += "*very [JJ]\n";
document.getElementById("phrases").value += "*so [JJ]\n";
document.getElementById("phrases").value += "*much [JJ]\n";
document.getElementById("phrases").value += "r u troleing me?\n";
document.getElementById("phrases").value += "good doge\n";
document.getElementById("phrases").value += "dogge\n";
</script>
<div id="taglist" style="display:none">
<pre>
CC Coord Conjuncn and,but,or
CD Cardinal number one,two
DT Determiner the,some
EX Existential there there
FW Foreign Word mon dieu
IN Preposition of,in,by
JJ Adjective big
JJR Adj., comparative bigger
JJS Adj., superlative biggest
LS List item marker 1,One
MD Modal can,should
NN Noun, sing. or mass dog
NNP Proper noun, sing. Edinburgh
NNPS Proper noun, plural Smiths
NNS Noun, plural dogs
POS Possessive ending 's
PDT Predeterminer all, both
PP$ Possessive pronoun my,one's
PRP Personal pronoun I,you,she
PRP$ Pers. Pos. pronoun My,His,Hers
RB Adverb quickly
RBR Adverb, comparative faster
RBS Adverb, superlative fastest
RP Particle up,off
SYM Symbol +,%,&
TO 'to' to
UH Interjection oh, oops
VB verb, base form eat
VBD verb, past tense ate
VBG verb, gerund eating
VBN verb, past part eaten
VBP Verb, present eat
VBZ Verb, present eats
WDT Wh-determiner which,that
WP Wh pronoun who,what
WP$ Possessive-Wh whose
WRB Wh-adverb how,where
</pre>
<div class="wow" style="padding-left: 10em">such verb</div>
</div>
<div>
<input class="button" type="button" onclick="createShibe(sortWords(lexWords()), getPhrases());" value="Generate"></button>
</div>
<div>
<p>Output:</p>
<p>If your output contains a lot of "undefined", you probably don't have any of that part of speech in your input text.</p>
<p>Hit "generate" until you get a shibe text you like!</p>
<textarea id="output" rows="20" cols="80"></textarea></div>
<div>
<p><a href="./contact">Feedback / Contact</a></p>
<div class="wow" style="padding-left: 10em">such web</div>
<p>Created by <a href="http://erty.me">Erty Seidel</a>.</p>
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-783271-7', 'erty.me');
ga('send', 'pageview');
</script>
</div>
<script src="./helper.js"></script>
<script src="./shibe.js"></script>
</body>
</html>