Update
This commit is contained in:
parent
723ffb3794
commit
4669b03f68
5 changed files with 224 additions and 128 deletions
1
.gitattributes
Normal file
1
.gitattributes
Normal file
|
@ -0,0 +1 @@
|
||||||
|
* linguist-vendored=false
|
89
README.md
89
README.md
|
@ -1,7 +1,6 @@
|
||||||
|
|
||||||
# Soli
|
# Soli
|
||||||
|
|
||||||
Soli romanization system accurately represents Hangul sounds with their Latin equivalents.
|
Soli is a romanization system for easily writing Hangul with Latin letters.
|
||||||
|
|
||||||
## Preview
|
## Preview
|
||||||
|
|
||||||
|
@ -13,11 +12,11 @@ There are two primary systems for romanizing Korean: the Revised Romanization of
|
||||||
|
|
||||||
- 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.
|
- 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
|
| Hangul | Soli | Other Variations |
|
||||||
--- | --- | ---
|
| ------ | ------- | ---------------------------------------- |
|
||||||
신라 | sinla | silla, shilla, silra, shinra
|
| 신라 | sinla | silla, shilla, silra, shinra |
|
||||||
종로 | jonglo | jongro, jongno, jokro, jokno
|
| 종로 | jonglo | jongro, jongno, jokro, jokno |
|
||||||
떡볶이 | ttogboki | tteokbokki, ttokppokki, topokki, toppogi
|
| 떡볶이 | 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 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 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.
|
||||||
|
@ -27,9 +26,11 @@ Hangul | Soli | Other Variations
|
||||||
<br>RR/MR: Hangeul, Han'gŭl, Han-geul
|
<br>RR/MR: Hangeul, Han'gŭl, Han-geul
|
||||||
|
|
||||||
### Exceptions
|
### Exceptions
|
||||||
|
|
||||||
- When ㅅ, ㅈ, ㅊ, or ㅎ are not followed by a vowel, they sound like t: 낮 naj → nat, 햇빛 hesbich → hetbit
|
- When ㅅ, ㅈ, ㅊ, or ㅎ are not followed by a vowel, they sound like t: 낮 naj → nat, 햇빛 hesbich → hetbit
|
||||||
|
|
||||||
## Hangul Jamo
|
## Hangul Jamo
|
||||||
|
|
||||||
### Vowels
|
### Vowels
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
|
@ -138,11 +139,13 @@ Hangul | Soli | Other Variations
|
||||||
</tr>
|
</tr>
|
||||||
<tr align=center>
|
<tr align=center>
|
||||||
<td>ㅘ</td>
|
<td>ㅘ</td>
|
||||||
<td colspan=4>wa</td>
|
<td>oa</td>
|
||||||
|
<td colspan=3>wa</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr align=center>
|
<tr align=center>
|
||||||
<td>ㅝ</td>
|
<td>ㅝ</td>
|
||||||
<td colspan=2>wo</td>
|
<td>uo</td>
|
||||||
|
<td>wo</td>
|
||||||
<td>wŏ</td>
|
<td>wŏ</td>
|
||||||
<td>we</td>
|
<td>we</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -258,11 +261,13 @@ Hangul | Soli | Other Variations
|
||||||
</tr>
|
</tr>
|
||||||
<tr align=center>
|
<tr align=center>
|
||||||
<td>ㄸ</td>
|
<td>ㄸ</td>
|
||||||
<td colspan=4>tt</td>
|
<td>t</td>
|
||||||
|
<td colspan=3>tt</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr align=center>
|
<tr align=center>
|
||||||
<td>ㅃ</td>
|
<td>ㅃ</td>
|
||||||
<td colspan=4>pp</td>
|
<td>p</td>
|
||||||
|
<td colspan=3>pp</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr align=center>
|
<tr align=center>
|
||||||
<td>ㅆ</td>
|
<td>ㅆ</td>
|
||||||
|
@ -271,7 +276,8 @@ Hangul | Soli | Other Variations
|
||||||
</tr>
|
</tr>
|
||||||
<tr align=center>
|
<tr align=center>
|
||||||
<td>ㅉ</td>
|
<td>ㅉ</td>
|
||||||
<td colspan=2>jj</td>
|
<td>j</td>
|
||||||
|
<td>jj</td>
|
||||||
<td>tch</td>
|
<td>tch</td>
|
||||||
<td>cc</td>
|
<td>cc</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -279,56 +285,57 @@ Hangul | Soli | Other Variations
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
- Hangul: 콩고물과 우유가 들어간 빙수는 차게 먹어야 특별한 맛이 잘 표현된다.
|
- Hangul: 콩고물과 우유가 들어간 빙수는 차게 먹어야 특별한 맛이 잘 표현된다.
|
||||||
<p>RR: Konggomulgwa uyuga deureogan bingsuneun chage meogeoya teukbyeolhan masi jal pyohyeondoenda.</p>
|
<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>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: Konggomulgwa uyuga dulogan bingsunun chage mogoya tugbyolhan masi jal pyohyondoenda.</p>
|
<p>Soli: Konggomulgoa uyuga dulogan bingsunun chage mogoya tugbyolhan masi jal pyohyondoenda.</p>
|
||||||
- Hangul: 참나무 타는 소리와 야경만큼 밤의 여유를 표현해 주는 것도 없다.
|
- Hangul: 참나무 타는 소리와 야경만큼 밤의 여유를 표현해 주는 것도 없다.
|
||||||
<p>RR: Chamnamu taneun soriwa yagyeongmankeum bamui yeoyureul pyohyeonhae juneun geotdo eopda.</p>
|
<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>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 soliwa yagyongmankum bamui yoyulul pyohyonhe junun gotdo obtda.</p>
|
<p>Soli: Chamnamu tanun solioa yagyongmankum bamui yoyulul pyohyonhe junun gotdo obtda.</p>
|
||||||
- Hangul: 모든 인간은 태어날 때부터 자유로우며 그 존엄과 권리에 있어 평등하다. 인간은 천부적으로 이성과 양심을 부여받았으며 서로 형제애의 정신으로 행동하여야 한다.
|
- 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>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>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 ttebuto jayuloumyo gu jonomgwa gwonlie iso pyongdunghada. inganun chonbujogulo isonggwa yangsimul buyobadasumyo solo hyongjeeui jongsinulo hengdonghayoya 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
|
- Cities
|
||||||
|
|
||||||
Hangul | Soli | Hangul | Soli | Hangul | Soli | Hangul | Soli | Hangul | Soli
|
| Hangul | Soli | Hangul | Soli | Hangul | Soli | Hangul | Soli | Hangul | Soli |
|
||||||
:---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---:
|
| :----: | :---: | :----: | :-------: | :----: | :---: | :----: | :----: | :----: | :--: |
|
||||||
서울 | Soul | 평양 | Pyongyang | 부산 | Busan | 인천 | Inchon | 대구 | Degu
|
| 서울 | Soul | 평양 | Pyongyang | 부산 | Busan | 인천 | Inchon | 대구 | Degu |
|
||||||
대전 | Dejon | 광주 | Gwangju | 수원 | Suwon | 울산 | Ulsan | 제주 | Jeju
|
| 대전 | Dejon | 광주 | Goangju | 수원 | Suuon | 울산 | Ulsan | 제주 | Jeju |
|
||||||
|
|
||||||
- List of regions and provinces
|
- List of regions and provinces
|
||||||
|
|
||||||
- 관북 Gwanbug<br>
|
- 관북 Goanbug<br>
|
||||||
1. 함북 Hambug
|
1. 함북 Hambug
|
||||||
- 관남 Gwannam<br>
|
- 관남 Goannam<br>
|
||||||
2. 함남 Hamnam
|
2. 함남 Hamnam
|
||||||
- 관서 Gwanso<br>
|
- 관서 Goanso<br>
|
||||||
3. 평북 Pyongbug<br>
|
3. 평북 Pyongbug<br>
|
||||||
4. 평남 Pyongnam
|
4. 평남 Pyongnam
|
||||||
- 해서 Heso<br>
|
- 해서 Heso<br>
|
||||||
5. 황해 Hwanghe
|
5. 황해 Hoanghe
|
||||||
- 수도권 Sudogwon<br>
|
- 수도권 Sudoguon<br>
|
||||||
6. 경기 Gyonggi
|
6. 경기 Gyonggi
|
||||||
- 관동 Gwandong<br>
|
- 관동 Goandong<br>
|
||||||
7. 강원 Gangwon
|
7. 강원 Ganguon
|
||||||
- 호서 Hoso<br>
|
- 호서 Hoso<br>
|
||||||
8. 충북 Chungbug<br>
|
8. 충북 Chungbug<br>
|
||||||
9. 충남 Chungnam
|
9. 충남 Chungnam
|
||||||
- 호남 Honam<br>
|
- 호남 Honam<br>
|
||||||
10. 전북 Jonbug<br>
|
10. 전북 Jonbug<br>
|
||||||
11. 전남 Jonnam
|
11. 전남 Jonnam
|
||||||
- 영남 Yongnam<br>
|
- 영남 Yongnam<br>
|
||||||
12. 경북 Gyongbug<br>
|
12. 경북 Gyongbug<br>
|
||||||
13. 경남 Gyongnam
|
13. 경남 Gyongnam
|
||||||
- 제주 Jeju<br>
|
- 제주 Jeju<br>
|
||||||
14. 제주 Jeju
|
14. 제주 Jeju
|
||||||
|
|
||||||
- Address
|
- Address
|
||||||
- Hangul: 서울특별시 서초구 반포대로 59 101동 501호 (서초동, 서초아파트 자이)
|
- Hangul: 서울특별시 서초구 반포대로 59 101동 501호 (서초동, 서초아파트 자이)
|
||||||
<br>Soli: Banpodelo 59 101dong 501ho (Sochodong, Socho Apartment Jai), Sochogu, Soul, Korea
|
<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
|
<br>Soli: Banpodelo 59 101-501 (Sochodong, Socho Apartment Jai), Sochogu, Soul, Korea
|
||||||
- Hangul: 서울특별시 서초구 반포대로 23길 6 (서초동)
|
- Hangul: 서울특별시 서초구 반포대로 23길 6 (서초동)
|
||||||
<br>Soli: Banpodelo 23 Gil 6 (Sochodong), Sochogu, Soul, Korea
|
<br>Soli: Banpodelo 23 Gil 6 (Sochodong), Sochogu, Soul, Korea
|
||||||
|
|
|
@ -1,34 +1,44 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Soli</title>
|
||||||
|
<link rel="stylesheet" href="./vendor/bootstrap.min.css" />
|
||||||
|
<script src="./js/soli.js"></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
<head>
|
<body>
|
||||||
<title>Soli</title>
|
<div class="container">
|
||||||
<link rel="stylesheet" href="./vendor/bootstrap.min.css">
|
<h1>Soli</h1>
|
||||||
<script src="./js/soli.js"></script>
|
<p>Soli is a tool to convert a text from Hangul to Latin alphabet.</p>
|
||||||
</head>
|
<form>
|
||||||
|
<div class="form-group mb-2">
|
||||||
<body>
|
<label for="input" class="fw-bold small">Hangul</label>
|
||||||
<div class="container">
|
<textarea id="input" class="form-control" rows="2" rows="2">
|
||||||
<h1>Soli</h1>
|
모든 인간은 태어날 때부터 자유로우며 그 존엄과 권리에 있어 평등하다. 인간은 천부적으로 이성과 양심을 부여받았으며 서로 형제애의 정신으로 행동하여야 한다.</textarea
|
||||||
<p>
|
>
|
||||||
Soli is a tool to convert a text from Hangul to Latin alphabet.
|
<button
|
||||||
</p>
|
type="button"
|
||||||
<form>
|
class="btn btn-sm btn-success my-1"
|
||||||
<div class="form-group mb-2">
|
onclick="convert();"
|
||||||
<label for="input" class="fw-bold small">Hangul</label>
|
>
|
||||||
<textarea id="input" class="form-control" rows="2"
|
Submit Query
|
||||||
rows="2">모든 인간은 태어날 때부터 자유로우며 그 존엄과 권리에 있어 평등하다. 인간은 천부적으로 이성과 양심을 부여받았으며 서로 형제애의 정신으로 행동하여야 한다.</textarea>
|
</button>
|
||||||
<button type="button" class="btn btn-sm btn-success my-1" onclick="convert();">Submit Query</button>
|
</div>
|
||||||
</div>
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<label for="output" class="fw-bold small"
|
||||||
<label for="output" class="fw-bold small">Romaja (romanization)</label>
|
>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
|
<textarea id="out" class="form-control" rows="2" readonly></textarea>
|
||||||
Clipboard</button>
|
<button
|
||||||
</div>
|
type="button"
|
||||||
</form>
|
class="btn btn-sm btn-success my-1"
|
||||||
</div>
|
onclick="clipboard();"
|
||||||
<!-- @date 2022 -->
|
>
|
||||||
</body>
|
Copy to Clipboard
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<!-- @date 2022 -->
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
192
dist/js/soli.js
192
dist/js/soli.js
|
@ -1,75 +1,150 @@
|
||||||
//@date 2022
|
//@date 2022
|
||||||
|
|
||||||
const dict = {
|
const dict = {
|
||||||
"ㄱ": "g",
|
ㄱ: "g",
|
||||||
"ㄴ": "n",
|
ㄴ: "n",
|
||||||
"ㄷ": "d",
|
ㄷ: "d",
|
||||||
"ㄹ": "l",
|
ㄹ: "l",
|
||||||
"ㅁ": "m",
|
ㅁ: "m",
|
||||||
"ㅂ": "b",
|
ㅂ: "b",
|
||||||
"ㅅ": "s",
|
ㅅ: "s",
|
||||||
"ㅇ": "ng",
|
ㅇ: "ng",
|
||||||
"ㅈ": "j",
|
ㅈ: "j",
|
||||||
"ㅊ": "ch",
|
ㅊ: "ch",
|
||||||
"ㅋ": "k",
|
ㅋ: "k",
|
||||||
"ㅌ": "t",
|
ㅌ: "t",
|
||||||
"ㅍ": "p",
|
ㅍ: "p",
|
||||||
"ㅎ": "h",
|
ㅎ: "h",
|
||||||
"ㄲ": "k",
|
ㄲ: "k",
|
||||||
"ㄸ": "tt",
|
ㄸ: "t",
|
||||||
"ㅃ": "pp",
|
ㅃ: "p",
|
||||||
"ㅆ": "s",
|
ㅆ: "s",
|
||||||
"ㅉ": "jj",
|
ㅉ: "j",
|
||||||
"ㄳ": "gs",
|
ㄳ: "gs",
|
||||||
"ㄵ": "nj",
|
ㄵ: "nj",
|
||||||
"ㄶ": "nh",
|
ㄶ: "nh",
|
||||||
"ㄺ": "lg",
|
ㄺ: "lg",
|
||||||
"ㄻ": "lm",
|
ㄻ: "lm",
|
||||||
"ㄼ": "lb",
|
ㄼ: "lb",
|
||||||
"ㄽ": "ls",
|
ㄽ: "ls",
|
||||||
"ㄾ": "lt",
|
ㄾ: "lt",
|
||||||
"ㄿ": "lp",
|
ㄿ: "lp",
|
||||||
"ㅀ": "lh",
|
ㅀ: "lh",
|
||||||
"ㅄ": "bs",
|
ㅄ: "bs",
|
||||||
"ㅏ": "a",
|
ㅏ: "a",
|
||||||
"ㅑ": "ya",
|
ㅑ: "ya",
|
||||||
"ㅓ": "o",
|
ㅓ: "o",
|
||||||
"ㅕ": "yo",
|
ㅕ: "yo",
|
||||||
"ㅗ": "o",
|
ㅗ: "o",
|
||||||
"ㅛ": "yo",
|
ㅛ: "yo",
|
||||||
"ㅜ": "u",
|
ㅜ: "u",
|
||||||
"ㅠ": "yu",
|
ㅠ: "yu",
|
||||||
"ㅡ": "u",
|
ㅡ: "u",
|
||||||
"ㅣ": "i",
|
ㅣ: "i",
|
||||||
"ㅐ": "e",
|
ㅐ: "e",
|
||||||
"ㅔ": "e",
|
ㅔ: "e",
|
||||||
"ㅒ": "ye",
|
ㅒ: "ye",
|
||||||
"ㅖ": "ye",
|
ㅖ: "ye",
|
||||||
"ㅘ": "wa",
|
ㅘ: "oa",
|
||||||
"ㅙ": "oe",
|
ㅙ: "oe",
|
||||||
"ㅚ": "oe",
|
ㅚ: "oe",
|
||||||
"ㅞ": "oe",
|
ㅞ: "oe",
|
||||||
"ㅝ": "wo",
|
ㅝ: "uo",
|
||||||
"ㅟ": "wi",
|
ㅟ: "ui",
|
||||||
"ㅢ": "ui"
|
ㅢ: "ui",
|
||||||
};
|
};
|
||||||
|
|
||||||
const hangul_f = ['ㄱ', 'ㄲ', 'ㄴ', 'ㄷ', 'ㄸ', 'ㄹ', 'ㅁ', 'ㅂ', 'ㅃ', 'ㅅ', 'ㅆ', 'ㅇ', 'ㅈ', 'ㅉ', 'ㅊ', 'ㅋ', 'ㅌ', 'ㅍ', 'ㅎ'];
|
const hangul_f = [
|
||||||
const hangul_m = ['ㅏ', 'ㅐ', 'ㅑ', 'ㅒ', 'ㅓ', 'ㅔ', 'ㅕ', 'ㅖ', 'ㅗ', 'ㅘ', 'ㅙ', 'ㅚ', 'ㅛ', 'ㅜ', 'ㅝ', 'ㅞ', 'ㅟ', 'ㅠ', 'ㅡ', 'ㅢ', 'ㅣ'];
|
"ㄱ",
|
||||||
const hangul_e = ['', 'ㄱ', 'ㄲ', 'ㄳ', 'ㄴ', 'ㄵ', 'ㄶ', 'ㄷ', 'ㄹ', 'ㄺ', 'ㄻ', 'ㄼ', 'ㄽ', 'ㄾ', 'ㄿ', 'ㅀ', 'ㅁ', 'ㅂ', 'ㅄ', 'ㅅ', 'ㅆ', 'ㅇ', 'ㅈ', 'ㅊ', 'ㅋ', 'ㅌ', 'ㅍ', 'ㅎ'];
|
"ㄲ",
|
||||||
|
"ㄴ",
|
||||||
|
"ㄷ",
|
||||||
|
"ㄸ",
|
||||||
|
"ㄹ",
|
||||||
|
"ㅁ",
|
||||||
|
"ㅂ",
|
||||||
|
"ㅃ",
|
||||||
|
"ㅅ",
|
||||||
|
"ㅆ",
|
||||||
|
"ㅇ",
|
||||||
|
"ㅈ",
|
||||||
|
"ㅉ",
|
||||||
|
"ㅊ",
|
||||||
|
"ㅋ",
|
||||||
|
"ㅌ",
|
||||||
|
"ㅍ",
|
||||||
|
"ㅎ",
|
||||||
|
];
|
||||||
|
const hangul_m = [
|
||||||
|
"ㅏ",
|
||||||
|
"ㅐ",
|
||||||
|
"ㅑ",
|
||||||
|
"ㅒ",
|
||||||
|
"ㅓ",
|
||||||
|
"ㅔ",
|
||||||
|
"ㅕ",
|
||||||
|
"ㅖ",
|
||||||
|
"ㅗ",
|
||||||
|
"ㅘ",
|
||||||
|
"ㅙ",
|
||||||
|
"ㅚ",
|
||||||
|
"ㅛ",
|
||||||
|
"ㅜ",
|
||||||
|
"ㅝ",
|
||||||
|
"ㅞ",
|
||||||
|
"ㅟ",
|
||||||
|
"ㅠ",
|
||||||
|
"ㅡ",
|
||||||
|
"ㅢ",
|
||||||
|
"ㅣ",
|
||||||
|
];
|
||||||
|
const hangul_e = [
|
||||||
|
"",
|
||||||
|
"ㄱ",
|
||||||
|
"ㄲ",
|
||||||
|
"ㄳ",
|
||||||
|
"ㄴ",
|
||||||
|
"ㄵ",
|
||||||
|
"ㄶ",
|
||||||
|
"ㄷ",
|
||||||
|
"ㄹ",
|
||||||
|
"ㄺ",
|
||||||
|
"ㄻ",
|
||||||
|
"ㄼ",
|
||||||
|
"ㄽ",
|
||||||
|
"ㄾ",
|
||||||
|
"ㄿ",
|
||||||
|
"ㅀ",
|
||||||
|
"ㅁ",
|
||||||
|
"ㅂ",
|
||||||
|
"ㅄ",
|
||||||
|
"ㅅ",
|
||||||
|
"ㅆ",
|
||||||
|
"ㅇ",
|
||||||
|
"ㅈ",
|
||||||
|
"ㅊ",
|
||||||
|
"ㅋ",
|
||||||
|
"ㅌ",
|
||||||
|
"ㅍ",
|
||||||
|
"ㅎ",
|
||||||
|
];
|
||||||
|
|
||||||
function convert() {
|
function convert() {
|
||||||
let input = document.getElementById("input").value.trim();
|
let input = document.getElementById("input").value.trim();
|
||||||
let out = "";
|
let out = "";
|
||||||
|
|
||||||
for (let i = 0; i < input.length; i++) {
|
for (let i = 0; i < input.length; i++) {
|
||||||
if (input[i].match(/[\uac00-\ud7af]|[\u1100-\u11ff]|[\u3130-\u318f]|[\ua960-\ua97f]|[\ud7b0-\ud7ff]/g)) {
|
if (
|
||||||
|
input[i].match(
|
||||||
|
/[\uac00-\ud7af]|[\u1100-\u11ff]|[\u3130-\u318f]|[\ua960-\ua97f]|[\ud7b0-\ud7ff]/g
|
||||||
|
)
|
||||||
|
) {
|
||||||
const ga = 44032;
|
const ga = 44032;
|
||||||
let unicode = input[i].charCodeAt(0);
|
let unicode = input[i].charCodeAt(0);
|
||||||
unicode = unicode - ga;
|
unicode = unicode - ga;
|
||||||
|
|
||||||
let fi = parseInt(unicode / 588);
|
let fi = parseInt(unicode / 588);
|
||||||
let mi = parseInt((unicode - (fi * 588)) / 28);
|
let mi = parseInt((unicode - fi * 588) / 28);
|
||||||
let ei = parseInt(unicode % 28);
|
let ei = parseInt(unicode % 28);
|
||||||
|
|
||||||
if (hangul_f[fi] && hangul_f[fi] != "ㅇ") {
|
if (hangul_f[fi] && hangul_f[fi] != "ㅇ") {
|
||||||
|
@ -91,7 +166,10 @@ function convert() {
|
||||||
|
|
||||||
for (var i = 0; i < out.length; i++) {
|
for (var i = 0; i < out.length; i++) {
|
||||||
if (["s", "j", "ch", "h"].includes(out[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])) {
|
if (
|
||||||
|
i + 1 < out.length &&
|
||||||
|
["a", "e", "i", "o", "u", "y", "w"].includes(out[i + 1])
|
||||||
|
) {
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
out = out.substring(0, i) + "t" + out.substring(i + 1);
|
out = out.substring(0, i) + "t" + out.substring(i + 1);
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 17 KiB |
Loading…
Reference in a new issue