Migrate
This commit is contained in:
commit
97071985a4
6 changed files with 585 additions and 0 deletions
1
.gitattributes
Normal file
1
.gitattributes
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
* linguist-vendored=false
|
||||||
341
README.md
Normal file
341
README.md
Normal file
|
|
@ -0,0 +1,341 @@
|
||||||
|
# Soli
|
||||||
|
|
||||||
|
Soli is a romanization system for easily writing Hangul with Latin letters.
|
||||||
|
|
||||||
|
## Preview
|
||||||
|
|
||||||
|
<img src="./docs/assets/img/preview.png">
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
There are two primary systems for romanizing Korean: the Revised Romanization of Korean and McCune–Reischauer. However, they can be challenging to read and write for both native Koreans and Korean learners.
|
||||||
|
|
||||||
|
- Soli makes things simpler by giving each Hangul character a single, consistent Latin spelling. In contrast, RR and MR sometimes transcribe Hangul into multiple spellings due to different ways of pronouncing it in Korean.
|
||||||
|
|
||||||
|
| Hangul | Soli | Other Variations |
|
||||||
|
| ------ | ------- | ---------------------------------------- |
|
||||||
|
| 신라 | sinla | silla, shilla, silra, shinra |
|
||||||
|
| 종로 | jonglo | jongro, jongno, jokro, jokno |
|
||||||
|
| 떡볶이 | togboki | tteokbokki, ttokppokki, topokki, toppogi |
|
||||||
|
|
||||||
|
- Soli gives Hangul consonants a consistent Latin representation. In contrast, RR and MR use different Latin letters for Hangul consonants depending on whether they're at the beginning or end of a word. For example, ㄱ, ㄷ, ㄹ, and ㅂ are transcribed as g, d, r, b at the start, and k, t, l, p at the end.
|
||||||
|
- Soli simplifies things by using the same Latin spelling for similar vowels: ㅜ/ㅡ become u, ㅐ/ㅔ become e, ㅒ/ㅖ become ye, ㅙ/ㅚ/ㅞ become oe, and ᅱ/ᅴ become ui. In contrast, RR adds 'a' or 'e' to certain vowels: ㅡ becomes eu, ㅐ becomes ae, and ᅫ becomes wae. This can be confusing and cause people to misread ㅡ as eh-u and ㅐ as ah-eh.
|
||||||
|
- Soli keeps things straightforward without diacritics, hyphens, or apostrophes.
|
||||||
|
- Hangul: 한글
|
||||||
|
<br>Soli: Hangul
|
||||||
|
<br>RR/MR: Hangeul, Han'gŭl, Han-geul
|
||||||
|
|
||||||
|
### Exceptions
|
||||||
|
|
||||||
|
- When ㅅ, ㅈ, ㅊ, or ㅎ are not followed by a vowel, they sound like t: 낮 naj → nat, 햇빛 hesbich → hetbit
|
||||||
|
|
||||||
|
## Hangul Jamo
|
||||||
|
|
||||||
|
### Vowels
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr align=center>
|
||||||
|
<th>Hangul</th>
|
||||||
|
<th>Soli</th>
|
||||||
|
<th>RR</th>
|
||||||
|
<th>MR</th>
|
||||||
|
<th>Yale</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅏ</td>
|
||||||
|
<td colspan=4>a</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅑ</td>
|
||||||
|
<td colspan=4>ya</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅓ</td>
|
||||||
|
<td>o</td>
|
||||||
|
<td>eo</td>
|
||||||
|
<td>ŏ</td>
|
||||||
|
<td>e</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅕ</td>
|
||||||
|
<td>yo</td>
|
||||||
|
<td>yeo</td>
|
||||||
|
<td>yŏ</td>
|
||||||
|
<td>ye</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅗ</td>
|
||||||
|
<td colspan=3>o</td>
|
||||||
|
<td>(w)o</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅛ</td>
|
||||||
|
<td colspan=4>yo</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅜ</td>
|
||||||
|
<td colspan=3>u</td>
|
||||||
|
<td>wu</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅠ</td>
|
||||||
|
<td colspan=4>yu</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅡ</td>
|
||||||
|
<td>u</td>
|
||||||
|
<td>eu</td>
|
||||||
|
<td>ŭ</td>
|
||||||
|
<td>u</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅣ</td>
|
||||||
|
<td colspan=4>i</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td colspan=5></td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅐ</td>
|
||||||
|
<td rowspan=2>e</td>
|
||||||
|
<td colspan=2>ae</td>
|
||||||
|
<td>ay</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅔ</td>
|
||||||
|
<td colspan=2>e</td>
|
||||||
|
<td>ey</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅒ</td>
|
||||||
|
<td rowspan=2>ye</td>
|
||||||
|
<td colspan=2>yae</td>
|
||||||
|
<td>yay</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅖ</td>
|
||||||
|
<td colspan=2>ye</td>
|
||||||
|
<td>yey</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅙ</td>
|
||||||
|
<td rowspan=3>oe</td>
|
||||||
|
<td colspan=2>wae</td>
|
||||||
|
<td>way</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅚ</td>
|
||||||
|
<td colspan=2>oe</td>
|
||||||
|
<td>(w)oy</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅞ</td>
|
||||||
|
<td>ue</td>
|
||||||
|
<td>we</td>
|
||||||
|
<td>wey</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅘ</td>
|
||||||
|
<td>oa</td>
|
||||||
|
<td colspan=3>wa</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅝ</td>
|
||||||
|
<td>uo</td>
|
||||||
|
<td>wo</td>
|
||||||
|
<td>wŏ</td>
|
||||||
|
<td>we</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅟ</td>
|
||||||
|
<td rowspan=2>ui</td>
|
||||||
|
<td colspan=3>wi</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅢ</td>
|
||||||
|
<td colspan=3>uy</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
### Consonants
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr align=center>
|
||||||
|
<th>Hangul</th>
|
||||||
|
<th>Soli</th>
|
||||||
|
<th>RR</th>
|
||||||
|
<th>MR</th>
|
||||||
|
<th>Yale</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㄱ</td>
|
||||||
|
<td>g</td>
|
||||||
|
<td>g/k</td>
|
||||||
|
<td>k/g</td>
|
||||||
|
<td>k</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㄴ</td>
|
||||||
|
<td colspan=4>n</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㄷ</td>
|
||||||
|
<td>d</td>
|
||||||
|
<td>d/t</td>
|
||||||
|
<td>t/d</td>
|
||||||
|
<td>t</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㄹ</td>
|
||||||
|
<td>l</td>
|
||||||
|
<td colspan=2>r/l</td>
|
||||||
|
<td>l</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅁ</td>
|
||||||
|
<td colspan=4>m</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅂ</td>
|
||||||
|
<td>b</td>
|
||||||
|
<td>b/p</td>
|
||||||
|
<td>p/b</td>
|
||||||
|
<td>p</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅅ</td>
|
||||||
|
<td colspan=4>s</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅇ</td>
|
||||||
|
<td colspan=4>-/ng</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅈ</td>
|
||||||
|
<td colspan=2>j</td>
|
||||||
|
<td>ch/j</td>
|
||||||
|
<td>c</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅊ</td>
|
||||||
|
<td colspan=2>ch</td>
|
||||||
|
<td>ch'</td>
|
||||||
|
<td>ch</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅋ</td>
|
||||||
|
<td colspan=2>k</td>
|
||||||
|
<td>k'</td>
|
||||||
|
<td>kh</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅌ</td>
|
||||||
|
<td colspan=2>t</td>
|
||||||
|
<td>t'</td>
|
||||||
|
<td>th</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅍ</td>
|
||||||
|
<td colspan=2>p</td>
|
||||||
|
<td>p'</td>
|
||||||
|
<td>ph</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅎ</td>
|
||||||
|
<td colspan=4>h</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td colspan=5></td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㄲ</td>
|
||||||
|
<td>k</td>
|
||||||
|
<td colspan=3>kk</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㄸ</td>
|
||||||
|
<td>t</td>
|
||||||
|
<td colspan=3>tt</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅃ</td>
|
||||||
|
<td>p</td>
|
||||||
|
<td colspan=3>pp</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅆ</td>
|
||||||
|
<td>s</td>
|
||||||
|
<td colspan=3>ss</td>
|
||||||
|
</tr>
|
||||||
|
<tr align=center>
|
||||||
|
<td>ㅉ</td>
|
||||||
|
<td>j</td>
|
||||||
|
<td>jj</td>
|
||||||
|
<td>tch</td>
|
||||||
|
<td>cc</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
- Hangul: 콩고물과 우유가 들어간 빙수는 차게 먹어야 특별한 맛이 잘 표현된다.
|
||||||
|
<p>RR: Konggomulgwa uyuga deureogan bingsuneun chage meogeoya teukbyeolhan masi jal pyohyeondoenda.</p>
|
||||||
|
<p>MR: K'onggomulgwa uyuga tŭrŏgan pingsunŭn ch'age mŏgŏya t'ŭkpyŏrhan mashi chal p'yohyŏndoenda.</p>
|
||||||
|
<p>Soli: Konggomulgoa uyuga dulogan bingsunun chage mogoya tugbyolhan masi jal pyohyondoenda.</p>
|
||||||
|
- Hangul: 참나무 타는 소리와 야경만큼 밤의 여유를 표현해 주는 것도 없다.
|
||||||
|
<p>RR: Chamnamu taneun soriwa yagyeongmankeum bamui yeoyureul pyohyeonhae juneun geotdo eopda.</p>
|
||||||
|
<p>MR: Ch'amnamu t'anŭn soriwa yagyŏngmank'ŭm pamŭi yŏyurŭl p'yohyŏnhae chunŭn kŏtto ŏpta.</p>
|
||||||
|
<p>Soli: Chamnamu tanun solioa yagyongmankum bamui yoyulul pyohyonhe junun gotdo obtda.</p>
|
||||||
|
- Hangul: 모든 인간은 태어날 때부터 자유로우며 그 존엄과 권리에 있어 평등하다. 인간은 천부적으로 이성과 양심을 부여받았으며 서로 형제애의 정신으로 행동하여야 한다.
|
||||||
|
<p>RR: Modeun inganeun taeeonal ttaebuteo jayuroumyeo geu joneomgwa gwollie isseo pyeongdeunghada. inganeun cheonbujeogeuro iseonggwa yangsimeul buyeobadasseumyeo seoro hyeongjeaeui jeongsineuro haengdonghayeoya handa.</p>
|
||||||
|
<p>MR: Modŭn in'ganŭn t'aeŏnal ttaebut'ŏ chayuroumyŏ kŭ chonŏmgwa kwŏllie issŏ p'yŏngdŭnghada. in'ganŭn ch'ŏnbujŏkŭro isŏnggwa yangshimŭl puyŏbadassŭmyŏ sŏro hyŏngjeaeŭi chŏngshinŭro haengdonghayŏya handa.</p>
|
||||||
|
<p>Soli: Modun inganun teonal tebuto jayuloumyo gu jonomgoa guonlie iso pyongdunghada. inganun chonbujogulo isonggoa yangsimul buyobadasumyo solo hyongjeeui jongsinulo hengdonghayoya handa.</p>
|
||||||
|
|
||||||
|
- Cities
|
||||||
|
|
||||||
|
| Hangul | Soli | Hangul | Soli | Hangul | Soli | Hangul | Soli | Hangul | Soli |
|
||||||
|
| :----: | :---: | :----: | :-------: | :----: | :---: | :----: | :----: | :----: | :--: |
|
||||||
|
| 서울 | Soul | 평양 | Pyongyang | 부산 | Busan | 인천 | Inchon | 대구 | Degu |
|
||||||
|
| 대전 | Dejon | 광주 | Goangju | 수원 | Suuon | 울산 | Ulsan | 제주 | Jeju |
|
||||||
|
|
||||||
|
- List of regions and provinces
|
||||||
|
|
||||||
|
- 관북 Goanbug<br>
|
||||||
|
1. 함북 Hambug
|
||||||
|
- 관남 Goannam<br>
|
||||||
|
2. 함남 Hamnam
|
||||||
|
- 관서 Goanso<br>
|
||||||
|
3. 평북 Pyongbug<br>
|
||||||
|
4. 평남 Pyongnam
|
||||||
|
- 해서 Heso<br>
|
||||||
|
5. 황해 Hoanghe
|
||||||
|
- 수도권 Sudoguon<br>
|
||||||
|
6. 경기 Gyonggi
|
||||||
|
- 관동 Goandong<br>
|
||||||
|
7. 강원 Ganguon
|
||||||
|
- 호서 Hoso<br>
|
||||||
|
8. 충북 Chungbug<br>
|
||||||
|
9. 충남 Chungnam
|
||||||
|
- 호남 Honam<br>
|
||||||
|
10. 전북 Jonbug<br>
|
||||||
|
11. 전남 Jonnam
|
||||||
|
- 영남 Yongnam<br>
|
||||||
|
12. 경북 Gyongbug<br>
|
||||||
|
13. 경남 Gyongnam
|
||||||
|
- 제주 Jeju<br>
|
||||||
|
14. 제주 Jeju
|
||||||
|
|
||||||
|
- Address
|
||||||
|
- Hangul: 서울특별시 서초구 반포대로 59 101동 501호 (서초동, 서초아파트 자이)
|
||||||
|
<br>Soli: Banpodelo 59 101dong 501ho (Sochodong, Socho Apartment Jai), Sochogu, Soul, Korea
|
||||||
|
<br>Soli: Banpodelo 59 101-501 (Sochodong, Socho Apartment Jai), Sochogu, Soul, Korea
|
||||||
|
- Hangul: 서울특별시 서초구 반포대로 23길 6 (서초동)
|
||||||
|
<br>Soli: Banpodelo 23 Gil 6 (Sochodong), Sochogu, Soul, Korea
|
||||||
44
dist/index.html
Normal file
44
dist/index.html
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Soli</title>
|
||||||
|
<link rel="stylesheet" href="./vendor/bootstrap.min.css" />
|
||||||
|
<script src="./js/soli.js"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<h1>Soli</h1>
|
||||||
|
<p>Soli is a tool to convert a text from Hangul to Latin alphabet.</p>
|
||||||
|
<form>
|
||||||
|
<div class="form-group mb-2">
|
||||||
|
<label for="input" class="fw-bold small">Hangul</label>
|
||||||
|
<textarea id="input" class="form-control" rows="2" rows="2">
|
||||||
|
모든 인간은 태어날 때부터 자유로우며 그 존엄과 권리에 있어 평등하다. 인간은 천부적으로 이성과 양심을 부여받았으며 서로 형제애의 정신으로 행동하여야 한다.</textarea
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="btn btn-sm btn-success my-1"
|
||||||
|
onclick="convert();"
|
||||||
|
>
|
||||||
|
Submit Query
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="output" class="fw-bold small"
|
||||||
|
>Lomaja (romanization)</label
|
||||||
|
>
|
||||||
|
<textarea id="out" class="form-control" rows="2" readonly></textarea>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="btn btn-sm btn-success my-1"
|
||||||
|
onclick="clipboard();"
|
||||||
|
>
|
||||||
|
Copy to Clipboard
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<!-- @date 2022 -->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
192
dist/js/soli.js
Normal file
192
dist/js/soli.js
Normal file
|
|
@ -0,0 +1,192 @@
|
||||||
|
//@date 2022
|
||||||
|
|
||||||
|
const dict = {
|
||||||
|
ㄱ: "g",
|
||||||
|
ㄴ: "n",
|
||||||
|
ㄷ: "d",
|
||||||
|
ㄹ: "l",
|
||||||
|
ㅁ: "m",
|
||||||
|
ㅂ: "b",
|
||||||
|
ㅅ: "s",
|
||||||
|
ㅇ: "ng",
|
||||||
|
ㅈ: "j",
|
||||||
|
ㅊ: "ch",
|
||||||
|
ㅋ: "k",
|
||||||
|
ㅌ: "t",
|
||||||
|
ㅍ: "p",
|
||||||
|
ㅎ: "h",
|
||||||
|
ㄲ: "k",
|
||||||
|
ㄸ: "t",
|
||||||
|
ㅃ: "p",
|
||||||
|
ㅆ: "s",
|
||||||
|
ㅉ: "j",
|
||||||
|
ㄳ: "gs",
|
||||||
|
ㄵ: "nj",
|
||||||
|
ㄶ: "nh",
|
||||||
|
ㄺ: "lg",
|
||||||
|
ㄻ: "lm",
|
||||||
|
ㄼ: "lb",
|
||||||
|
ㄽ: "ls",
|
||||||
|
ㄾ: "lt",
|
||||||
|
ㄿ: "lp",
|
||||||
|
ㅀ: "lh",
|
||||||
|
ㅄ: "bs",
|
||||||
|
ㅏ: "a",
|
||||||
|
ㅑ: "ya",
|
||||||
|
ㅓ: "o",
|
||||||
|
ㅕ: "yo",
|
||||||
|
ㅗ: "o",
|
||||||
|
ㅛ: "yo",
|
||||||
|
ㅜ: "u",
|
||||||
|
ㅠ: "yu",
|
||||||
|
ㅡ: "u",
|
||||||
|
ㅣ: "i",
|
||||||
|
ㅐ: "e",
|
||||||
|
ㅔ: "e",
|
||||||
|
ㅒ: "ye",
|
||||||
|
ㅖ: "ye",
|
||||||
|
ㅘ: "oa",
|
||||||
|
ㅙ: "oe",
|
||||||
|
ㅚ: "oe",
|
||||||
|
ㅞ: "oe",
|
||||||
|
ㅝ: "uo",
|
||||||
|
ㅟ: "ui",
|
||||||
|
ㅢ: "ui",
|
||||||
|
};
|
||||||
|
|
||||||
|
const hangul_f = [
|
||||||
|
"ㄱ",
|
||||||
|
"ㄲ",
|
||||||
|
"ㄴ",
|
||||||
|
"ㄷ",
|
||||||
|
"ㄸ",
|
||||||
|
"ㄹ",
|
||||||
|
"ㅁ",
|
||||||
|
"ㅂ",
|
||||||
|
"ㅃ",
|
||||||
|
"ㅅ",
|
||||||
|
"ㅆ",
|
||||||
|
"ㅇ",
|
||||||
|
"ㅈ",
|
||||||
|
"ㅉ",
|
||||||
|
"ㅊ",
|
||||||
|
"ㅋ",
|
||||||
|
"ㅌ",
|
||||||
|
"ㅍ",
|
||||||
|
"ㅎ",
|
||||||
|
];
|
||||||
|
const hangul_m = [
|
||||||
|
"ㅏ",
|
||||||
|
"ㅐ",
|
||||||
|
"ㅑ",
|
||||||
|
"ㅒ",
|
||||||
|
"ㅓ",
|
||||||
|
"ㅔ",
|
||||||
|
"ㅕ",
|
||||||
|
"ㅖ",
|
||||||
|
"ㅗ",
|
||||||
|
"ㅘ",
|
||||||
|
"ㅙ",
|
||||||
|
"ㅚ",
|
||||||
|
"ㅛ",
|
||||||
|
"ㅜ",
|
||||||
|
"ㅝ",
|
||||||
|
"ㅞ",
|
||||||
|
"ㅟ",
|
||||||
|
"ㅠ",
|
||||||
|
"ㅡ",
|
||||||
|
"ㅢ",
|
||||||
|
"ㅣ",
|
||||||
|
];
|
||||||
|
const hangul_e = [
|
||||||
|
"",
|
||||||
|
"ㄱ",
|
||||||
|
"ㄲ",
|
||||||
|
"ㄳ",
|
||||||
|
"ㄴ",
|
||||||
|
"ㄵ",
|
||||||
|
"ㄶ",
|
||||||
|
"ㄷ",
|
||||||
|
"ㄹ",
|
||||||
|
"ㄺ",
|
||||||
|
"ㄻ",
|
||||||
|
"ㄼ",
|
||||||
|
"ㄽ",
|
||||||
|
"ㄾ",
|
||||||
|
"ㄿ",
|
||||||
|
"ㅀ",
|
||||||
|
"ㅁ",
|
||||||
|
"ㅂ",
|
||||||
|
"ㅄ",
|
||||||
|
"ㅅ",
|
||||||
|
"ㅆ",
|
||||||
|
"ㅇ",
|
||||||
|
"ㅈ",
|
||||||
|
"ㅊ",
|
||||||
|
"ㅋ",
|
||||||
|
"ㅌ",
|
||||||
|
"ㅍ",
|
||||||
|
"ㅎ",
|
||||||
|
];
|
||||||
|
|
||||||
|
function convert() {
|
||||||
|
let input = document.getElementById("input").value.trim();
|
||||||
|
let out = "";
|
||||||
|
|
||||||
|
for (let i = 0; i < input.length; i++) {
|
||||||
|
if (
|
||||||
|
input[i].match(
|
||||||
|
/[\uac00-\ud7af]|[\u1100-\u11ff]|[\u3130-\u318f]|[\ua960-\ua97f]|[\ud7b0-\ud7ff]/g
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
const ga = 44032;
|
||||||
|
let unicode = input[i].charCodeAt(0);
|
||||||
|
unicode = unicode - ga;
|
||||||
|
|
||||||
|
let fi = parseInt(unicode / 588);
|
||||||
|
let mi = parseInt((unicode - fi * 588) / 28);
|
||||||
|
let ei = parseInt(unicode % 28);
|
||||||
|
|
||||||
|
if (hangul_f[fi] && hangul_f[fi] != "ㅇ") {
|
||||||
|
out += dict[hangul_f[fi]];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hangul_m[mi]) {
|
||||||
|
out += dict[hangul_m[mi]];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hangul_e[ei]) {
|
||||||
|
out += dict[hangul_e[ei]];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out += input[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
out = out.charAt(0).toUpperCase() + out.slice(1);
|
||||||
|
|
||||||
|
for (var i = 0; i < out.length; i++) {
|
||||||
|
if (["s", "j", "ch", "h"].includes(out[i])) {
|
||||||
|
if (
|
||||||
|
i + 1 < out.length &&
|
||||||
|
["a", "e", "i", "o", "u", "y", "w"].includes(out[i + 1])
|
||||||
|
) {
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
out = out.substring(0, i) + "t" + out.substring(i + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.getElementById("out").value = out;
|
||||||
|
}
|
||||||
|
|
||||||
|
function clipboard() {
|
||||||
|
// Retrieved from https://www.w3schools.com/howto/howto_js_copy_clipboard.asp on November 12, 2022
|
||||||
|
var copyText = document.getElementById("out");
|
||||||
|
|
||||||
|
copyText.select();
|
||||||
|
copyText.setSelectionRange(0, 99999); // For mobile devices
|
||||||
|
|
||||||
|
navigator.clipboard.writeText(copyText.value);
|
||||||
|
alert("Copied the text: " + copyText.value);
|
||||||
|
}
|
||||||
7
dist/vendor/bootstrap.min.css
Normal file
7
dist/vendor/bootstrap.min.css
Normal file
File diff suppressed because one or more lines are too long
BIN
docs/assets/img/preview.png
Normal file
BIN
docs/assets/img/preview.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Loading…
Reference in a new issue