emossage.js
16.7 KB
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
const wordToEmoji = new Map();
wordToEmoji.set("미소", String.fromCodePoint(0x1F600));
wordToEmoji.set("웃어", String.fromCodePoint(0x1F604));
wordToEmoji.set("머쓱", String.fromCodePoint(0x1F605));
wordToEmoji.set("ㅋㅋ", String.fromCodePoint(0x1F923));
wordToEmoji.set("씨익", String.fromCodePoint(0x1F642));
wordToEmoji.set("행복", String.fromCodePoint(0x1F60A));
wordToEmoji.set("뽀뽀", String.fromCodePoint(0x1F618));
wordToEmoji.set("존맛", String.fromCodePoint(0x1F60B));
wordToEmoji.set("메롱", String.fromCodePoint(0x1F61C));
wordToEmoji.set("돈무새", String.fromCodePoint(0x1F911));
wordToEmoji.set("흠", String.fromCodePoint(0x1F928));
wordToEmoji.set("-_-", String.fromCodePoint(0x1F611));
wordToEmoji.set("ㅡㅡ", String.fromCodePoint(0x1F611));
wordToEmoji.set("ㅡ_ㅡ", String.fromCodePoint(0x1F611));
wordToEmoji.set("쿨쿨", String.fromCodePoint(0x1F62A));
wordToEmoji.set("드르렁", String.fromCodePoint(0x1F634));
wordToEmoji.set("흥", String.fromCodePoint(0x2639));
wordToEmoji.set("ㅠㅠ", String.fromCodePoint(0x1F97A));
wordToEmoji.set("엉엉", String.fromCodePoint(0x1F62D));
wordToEmoji.set("울고", String.fromCodePoint(0x1F62D));
wordToEmoji.set("울어", String.fromCodePoint(0x1F62D));
wordToEmoji.set("하품", String.fromCodePoint(0x1F971));
wordToEmoji.set("빡쳐", String.fromCodePoint(0x1F621));
wordToEmoji.set("빡초", String.fromCodePoint(0x1F621));
wordToEmoji.set("빡친당", String.fromCodePoint(0x1F621));
wordToEmoji.set("빡친다", String.fromCodePoint(0x1F621));
wordToEmoji.set("빡치네", String.fromCodePoint(0x1F621));
wordToEmoji.set("개빡쳐", String.fromCodePoint(0x1F92C));
wordToEmoji.set("개빡초", String.fromCodePoint(0x1F92C));
wordToEmoji.set("개빡친당", String.fromCodePoint(0x1F92C));
wordToEmoji.set("개빡친다", String.fromCodePoint(0x1F92C));
wordToEmoji.set("개빡치네", String.fromCodePoint(0x1F92C));
wordToEmoji.set("짜증", String.fromCodePoint(0x1F620));
wordToEmoji.set("악마", String.fromCodePoint(0x1F608));
wordToEmoji.set("죽음", String.fromCodePoint(0x1F480));
wordToEmoji.set("죽어", String.fromCodePoint(0x1F480));
wordToEmoji.set("해골", String.fromCodePoint(0x1F480));
wordToEmoji.set("죽었", String.fromCodePoint(0x1F480));
wordToEmoji.set("똥", String.fromCodePoint(0x1F4A9));
wordToEmoji.set("자살하면그만이야", String.fromCodePoint(0x1F921));
wordToEmoji.set("삐에로", String.fromCodePoint(0x1F921));
wordToEmoji.set("광대", String.fromCodePoint(0x1F921));
wordToEmoji.set("귀신", String.fromCodePoint(0x1F47B));
wordToEmoji.set("외계인", String.fromCodePoint(0x1F47D));
wordToEmoji.set("고양이", String.fromCodePoint(0x1F63A));
wordToEmoji.set("냥이", String.fromCodePoint(0x1F63A));
wordToEmoji.set("괭이", String.fromCodePoint(0x1F63A));
wordToEmoji.set("사랑", String.fromCodePoint(0x2764));
wordToEmoji.set("아미", String.fromCodePoint(0x2763));
wordToEmoji.set("입술", String.fromCodePoint(0x1F48B));
wordToEmoji.set("백점", String.fromCodePoint(0x1F4AF));
wordToEmoji.set("100점", String.fromCodePoint(0x1F4AF));
wordToEmoji.set("짜중", String.fromCodePoint(0x1F4A2));
wordToEmoji.set("폭발", String.fromCodePoint(0x1F4A5));
wordToEmoji.set("펑", String.fromCodePoint(0x1F4A5));
wordToEmoji.set("쾅", String.fromCodePoint(0x1F4A5));
wordToEmoji.set("땀", String.fromCodePoint(0x1F4A6));
wordToEmoji.set("도망", String.fromCodePoint(0x1F4A8));
wordToEmoji.set("구멍", String.fromCodePoint(0x1F573));
wordToEmoji.set("말풍선", String.fromCodePoint(0x1F4AC));
wordToEmoji.set("zzz", String.fromCodePoint(0x1F4A4));
wordToEmoji.set("ZZZ", String.fromCodePoint(0x1F4A4));
wordToEmoji.set("ㅎㅇ", String.fromCodePoint(0x1F44B));
wordToEmoji.set("안녕", String.fromCodePoint(0x1F44B));
wordToEmoji.set("ㅇㅋ", String.fromCodePoint(0x1F44C));
wordToEmoji.set("오케이", String.fromCodePoint(0x1F44C));
wordToEmoji.set("브이", String.fromCodePoint(0x270C));
wordToEmoji.set("약속", String.fromCodePoint(0x270C));
wordToEmoji.set("록", String.fromCodePoint(0x1F91F));
wordToEmoji.set("락", String.fromCodePoint(0x1F91F));
wordToEmoji.set("로큰롤", String.fromCodePoint(0x1F91F));
wordToEmoji.set("약속", String.fromCodePoint(0x1F919));
wordToEmoji.set("왼쪽", String.fromCodePoint(0x1F448));
wordToEmoji.set("좌파", String.fromCodePoint(0x1F448));
wordToEmoji.set("오른쪽", String.fromCodePoint(0x1F449));
wordToEmoji.set("우파", String.fromCodePoint(0x1F449));
wordToEmoji.set("좆까", String.fromCodePoint(0x1F595));
wordToEmoji.set("ㅈ까", String.fromCodePoint(0x1F595));
wordToEmoji.set("ㅈㄲ", String.fromCodePoint(0x1F595));
wordToEmoji.set("ㄲㅈ", String.fromCodePoint(0x1F595));
wordToEmoji.set("꺼져", String.fromCodePoint(0x1F595));
wordToEmoji.set("따봉", String.fromCodePoint(0x1F44D));
wordToEmoji.set("엄지척", String.fromCodePoint(0x1F44D));
wordToEmoji.set("추천", String.fromCodePoint(0x1F44D));
wordToEmoji.set("좋아요", String.fromCodePoint(0x1F44D));
wordToEmoji.set("개추", String.fromCodePoint(0x1F44D));
wordToEmoji.set("따봉추", String.fromCodePoint(0x1F44D));
wordToEmoji.set("따봉도치야고마워", String.fromCodePoint(0x1F44D));
wordToEmoji.set("비추", String.fromCodePoint(0x1F44E));
wordToEmoji.set("야유", String.fromCodePoint(0x1F44E));
wordToEmoji.set("구려", String.fromCodePoint(0x1F44E));
wordToEmoji.set("주먹", String.fromCodePoint(0x1F44A));
wordToEmoji.set("박수", String.fromCodePoint(0x1F44F));
wordToEmoji.set("악수", String.fromCodePoint(0x1F91D));
wordToEmoji.set("문의", String.fromCodePoint(0x1F64F));
wordToEmoji.set("제발", String.fromCodePoint(0x1F64F));
wordToEmoji.set("부탁", String.fromCodePoint(0x1F64F));
wordToEmoji.set("^^", String.fromCodePoint(0x1F64F));
wordToEmoji.set("필기", String.fromCodePoint(0x270D));
wordToEmoji.set("글쓰기", String.fromCodePoint(0x270D));
wordToEmoji.set("셀카", String.fromCodePoint(0x1F933));
wordToEmoji.set("근육", String.fromCodePoint(0x1F4AA));
wordToEmoji.set("강력", String.fromCodePoint(0x1F4AA));
wordToEmoji.set("강해", String.fromCodePoint(0x1F4AA));
wordToEmoji.set("팔뚝", String.fromCodePoint(0x1F4AA));
wordToEmoji.set("다리", String.fromCodePoint(0x1F9B5));
wordToEmoji.set("발", String.fromCodePoint(0x1F9B6));
wordToEmoji.set("귀", String.fromCodePoint(0x1F442));
wordToEmoji.set("보청기", String.fromCodePoint(0x1F442));
wordToEmoji.set("코", String.fromCodePoint(0x1F443));
wordToEmoji.set("두뇌", String.fromCodePoint(0x1F9E0));
wordToEmoji.set("뇌", String.fromCodePoint(0x1F9E0));
wordToEmoji.set("이빨", String.fromCodePoint(0x1F987));
wordToEmoji.set("치아", String.fromCodePoint(0x1F987));
wordToEmoji.set("뼈다귀", String.fromCodePoint(0x1F9B4));
wordToEmoji.set("뼈다구", String.fromCodePoint(0x1F9B4));
wordToEmoji.set("뼈", String.fromCodePoint(0x1F9B4));
wordToEmoji.set("혀", String.fromCodePoint(0x1F445));
wordToEmoji.set("입술", String.fromCodePoint(0x1F444));
wordToEmoji.set("응애", String.fromCodePoint(0x1F476));
wordToEmoji.set("아기", String.fromCodePoint(0x1F476));
wordToEmoji.set("사람", String.fromCodePoint(0x1F9D1));
wordToEmoji.set("남자", String.fromCodePoint(0x1F468));
wordToEmoji.set("여자", String.fromCodePoint(0x1F469));
wordToEmoji.set("노인", String.fromCodePoint(0x1F9D3));
wordToEmoji.set("할아버지", String.fromCodePoint(0x1F474));
wordToEmoji.set("할부지", String.fromCodePoint(0x1F474));
wordToEmoji.set("할배", String.fromCodePoint(0x1F474));
wordToEmoji.set("할머니", String.fromCodePoint(0x1F475));
wordToEmoji.set("할무니", String.fromCodePoint(0x1F475));
wordToEmoji.set("할매", String.fromCodePoint(0x1F475));
wordToEmoji.set("싫어", String.fromCodePoint(0x1F64E));
wordToEmoji.set("NO", String.fromCodePoint(0x1F64E));
wordToEmoji.set("no", String.fromCodePoint(0x1F64E));
wordToEmoji.set("예스", String.fromCodePoint(0x1F64E));
wordToEmoji.set("yes", String.fromCodePoint(0x1F64E));
wordToEmoji.set("Yes", String.fromCodePoint(0x1F64E));
wordToEmoji.set("저요", String.fromCodePoint(0x1F64B));
wordToEmoji.set("나요", String.fromCodePoint(0x1F64B));
wordToEmoji.set("굽신", String.fromCodePoint(0x1F647));
wordToEmoji.set("도게자", String.fromCodePoint(0x1F647));
wordToEmoji.set("그랜절", String.fromCodePoint(0x1F647));
wordToEmoji.set("절", String.fromCodePoint(0x1F647));
wordToEmoji.set("넙죽", String.fromCodePoint(0x1F647));
wordToEmoji.set("하...", String.fromCodePoint(0x1F926));
wordToEmoji.set("하..", String.fromCodePoint(0x1F926));
wordToEmoji.set("아차", String.fromCodePoint(0x1F926));
wordToEmoji.set("어쩔티비", String.fromCodePoint(0x1F937));
wordToEmoji.set("저쩔티비", String.fromCodePoint(0x1F937));
wordToEmoji.set("우짤래미", String.fromCodePoint(0x1F937));
wordToEmoji.set("저짤래미", String.fromCodePoint(0x1F937));
wordToEmoji.set("의사", String.fromCodePoint(0x1F468));
wordToEmoji.set("학생", "👨🎓");
wordToEmoji.set("선생님", "👨🏫");
wordToEmoji.set("선생", "👨🏫");
wordToEmoji.set("쌤", "👨🏫");
wordToEmoji.set("판사", "👨⚖️");
wordToEmoji.set("농부", "👨🌾");
wordToEmoji.set("요리사", "👨🍳");
wordToEmoji.set("셰프", "👨🍳");
wordToEmoji.set("쉐프", "👨🍳");
wordToEmoji.set("직장인", "👨💼");
wordToEmoji.set("과학자", "👨🔬");
wordToEmoji.set("개발자", "👨💻");
wordToEmoji.set("프로그래머", "👨💻");
wordToEmoji.set("코더", "👨💻");
wordToEmoji.set("가수", "👨🎤");
wordToEmoji.set("아티스트", "👨🎤");
wordToEmoji.set("화가", "👨🎨");
wordToEmoji.set("파일럿", "👨✈️");
wordToEmoji.set("기장", "👨✈️");
wordToEmoji.set("우주인", "👨🚀");
wordToEmoji.set("소방관", "👨🚒");
wordToEmoji.set("경찰", "👮");
wordToEmoji.set("탐정", "🕵");
wordToEmoji.set("가드", "💂");
wordToEmoji.set("노동자", "👷");
wordToEmoji.set("왕자", "🤴");
wordToEmoji.set("공주", "👸");
wordToEmoji.set("무슬림", "👳");
wordToEmoji.set("젠틀맨", "🤵");
wordToEmoji.set("턱시도", "🤵");
wordToEmoji.set("신랑", "🤵");
wordToEmoji.set("신부", "👰");
wordToEmoji.set("임신", "🤰");
wordToEmoji.set("아기천사", "👼");
wordToEmoji.set("산타", "🎅");
wordToEmoji.set("산타클로스", "🎅");
wordToEmoji.set("히어로", "🦸");
wordToEmoji.set("영웅", "🦸");
wordToEmoji.set("슈퍼히어로", "🦸");
wordToEmoji.set("악당", "🦹");
wordToEmoji.set("나쁜놈", "🦹");
wordToEmoji.set("마법사", "🧙");
wordToEmoji.set("간달프", "🧙");
wordToEmoji.set("하인즈", "🧙");
wordToEmoji.set("덤블도어", "🧙");
wordToEmoji.set("요정", "🧚");
wordToEmoji.set("뱀파이어", "🧛");
wordToEmoji.set("흡혈귀", "🧛");
wordToEmoji.set("블라디미르", "🧛");
wordToEmoji.set("블라디", "🧛");
wordToEmoji.set("인어", "🧜");
wordToEmoji.set("엘프녀", "🧝♀️");
wordToEmoji.set("엘프", "🧝");
wordToEmoji.set("레골라스", "🧝");
wordToEmoji.set("지니", "🧞");
wordToEmoji.set("좀비", "🧟");
wordToEmoji.set("마사지", "💆");
wordToEmoji.set("미용", "💇");
wordToEmoji.set("걷", "🚶");
wordToEmoji.set("뛰", "🏃");
wordToEmoji.set("춤", "💃");
wordToEmoji.set("PPAP", "🕺");
wordToEmoji.set("ppap", "🕺");
wordToEmoji.set("펜싱", "🤺");
wordToEmoji.set("승마", "🏇");
wordToEmoji.set("말타기", "🏇");
wordToEmoji.set("스키", "⛷");
wordToEmoji.set("스노우보드", "🏂");
wordToEmoji.set("골프", "🏌");
wordToEmoji.set("서핑", "🏄");
wordToEmoji.set("수영", "🏊");
wordToEmoji.set("농구", "⛹");
wordToEmoji.set("웨이트", "🏋");
wordToEmoji.set("역기", "🏋");
wordToEmoji.set("쇠질", "🏋");
wordToEmoji.set("자전거", "🚴");
wordToEmoji.set("레슬링", "🤼");
wordToEmoji.set("명상", "🧘");
wordToEmoji.set("샤워", "🛀");
wordToEmoji.set("목욕", "🛀");
wordToEmoji.set("취침", "🛌");
wordToEmoji.set("수면", "🛌");
wordToEmoji.set("키스", "💏");
wordToEmoji.set("커플", "💑");
wordToEmoji.set("가족", "👪");
wordToEmoji.set("가정", "👪");
wordToEmoji.set("집안", "👪");
wordToEmoji.set("원숭이", "🐵");
wordToEmoji.set("우끼끼", "🐵");
wordToEmoji.set("몽키", "🐵");
wordToEmoji.set("고릴라", "🦍");
wordToEmoji.set("오랑우탄", "🦧");
wordToEmoji.set("개", "🐶");
wordToEmoji.set("멍멍", "🐶");
wordToEmoji.set("왈왈", "🐶");
wordToEmoji.set("늑대", "🐺");
wordToEmoji.set("여우", "🦊");
wordToEmoji.set("폭스", "🦊");
wordToEmoji.set("퐉스", "🦊");
wordToEmoji.set("라쿤", "🦝");
wordToEmoji.set("사자", "🦁");
wordToEmoji.set("호랑이", "🐯");
wordToEmoji.set("말", "🐴");
wordToEmoji.set("유니콘", "🦄");
wordToEmoji.set("얼룩말", "🦓");
wordToEmoji.set("시슴", "🦌");
wordToEmoji.set("사슴", "🦌");
wordToEmoji.set("고라니", "🦌");
wordToEmoji.set("음무", "🐮");
wordToEmoji.set("젖소", "🐮");
wordToEmoji.set("소", "🐮");
wordToEmoji.set("흑우", "🐃");
wordToEmoji.set("버팔로", "🐃");
wordToEmoji.set("꿀꿀", "🐷");
wordToEmoji.set("돼지", "🐷");
wordToEmoji.set("음메", "🐐");
wordToEmoji.set("염소", "🐐");
wordToEmoji.set("페이커", "🐐");
wordToEmoji.set("GOAT", "🐐");
wordToEmoji.set("goat", "🐐");
wordToEmoji.set("메시", "🐐");
wordToEmoji.set("낙타", "🐪");
wordToEmoji.set("데프트", "🦙");
wordToEmoji.set("라마", "🦙");
wordToEmoji.set("기린", "🦒");
wordToEmoji.set("코끼리", "🐘");
wordToEmoji.set("코뿔소", "🦏");
wordToEmoji.set("하마", "🦛");
wordToEmoji.set("쥐", "🐭");
wordToEmoji.set("찍찍", "🐭");
wordToEmoji.set("쥐새끼", "🐭");
wordToEmoji.set("햄스터", "🐹");
wordToEmoji.set("햄토리", "🐹");
wordToEmoji.set("토끼", "🐰");
wordToEmoji.set("조루", "🐰");
wordToEmoji.set("흑묘", "🐰");
wordToEmoji.set("고슴도치", "🦔");
wordToEmoji.set("박쥐", "🦇");
wordToEmoji.set("곰", "🐻");
wordToEmoji.set("코알라", "🐨");
wordToEmoji.set("판다", "🐼");
wordToEmoji.set("나무늘보", "🦥");
wordToEmoji.set("수달", "🦦");
wordToEmoji.set("스컹크", "🦨");
wordToEmoji.set("방구쟁이", "🦨");
wordToEmoji.set("방귀쟁이", "🦨");
wordToEmoji.set("캥거루", "🦘");
wordToEmoji.set("발자국", "🐾");
wordToEmoji.set("칠면조", "🦃");
wordToEmoji.set("닭대가리", "🐔");
wordToEmoji.set("닭", "🐔");
wordToEmoji.set("병아리", "🐤");
wordToEmoji.set("비둘기", "🕊");
wordToEmoji.set("구구", "🕊");
wordToEmoji.set("독수리", "🦅");
wordToEmoji.set("오리", "🦆");
wordToEmoji.set("꽥꽥", "🦆");
wordToEmoji.set("백조", "🦢");
wordToEmoji.set("부엉이", "🦉");
wordToEmoji.set("야행성", "🦉");
wordToEmoji.set("밤샘", "🦉");
wordToEmoji.set("플라밍고", "🦩");
wordToEmoji.set("앵무새", "🦜");
wordToEmoji.set("개구리", "🐸");
wordToEmoji.set("페페", "🐸");
wordToEmoji.set("악어", "🐊");
wordToEmoji.set("크로코다일", "🐊");
wordToEmoji.set("라코스테", "🐊");
wordToEmoji.set("거북이", "🐢");
wordToEmoji.set("도마뱀", "🦎");
wordToEmoji.set("뱀", "🐍");
wordToEmoji.set("용", "🐲");
wordToEmoji.set("드래곤", "🐲");
wordToEmoji.set("공룡", "🦕");
wordToEmoji.set("티라노", "🦖");
wordToEmoji.set("고래", "🐳");
wordToEmoji.set("돌고래", "🐬");
wordToEmoji.set("돌핀", "🐬");
wordToEmoji.set("물고기", "🐟");
wordToEmoji.set("생선", "🐟");
wordToEmoji.set("복어", "🐡");
wordToEmoji.set("독", "🐡");
wordToEmoji.set("상어", "🦈");
wordToEmoji.set("문어", "🐙");
wordToEmoji.set("타코", "🐙");
wordToEmoji.set("달팽이", "🐌");
wordToEmoji.set("나비", "🦋");
wordToEmoji.set("곤충", "🐛");
wordToEmoji.set("벌레", "🐛");
wordToEmoji.set("버그", "🐛");
wordToEmoji.set("개미", "🐜");
wordToEmoji.set("꿀벌", "🐝");
wordToEmoji.set("생일", "🎂");
wordToEmoji.set("축하", "🎉");
function convertToEmoji() {
var words = document.getElementById("Field4").value.split(' ');
console.log(words);
var output = "";
for (var wordIndex in words) {
console.log(wordIndex, ": ", words[wordIndex]);
var firstIndex = 0;
while (firstIndex < words[wordIndex].length) {
var foundEmoji = false;
for (let secondIndex = firstIndex; secondIndex < words[wordIndex].length + 1; ++secondIndex) {
var candidate = words[wordIndex].substring(firstIndex, secondIndex);
console.log("candidate: ", candidate);
if (wordToEmoji.has(candidate)) {
output += wordToEmoji.get(candidate);
console.log("candidate in map: ", wordToEmoji.get(candidate));
firstIndex = secondIndex;
foundEmoji = true;
break;
}
}
if (!foundEmoji) {
output += words[wordIndex][firstIndex];
firstIndex += 1;
}
}
console.log("output: ", output);
output += ' ';
}
document.getElementById("Field5").innerHTML = output;
}