diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..da67874 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* linguist-vendored=false diff --git a/README.md b/README.md index 65edb8b..5f38d91 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ - # 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 @@ -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. -Hangul | Soli | Other Variations ---- | --- | --- -신라 | sinla | silla, shilla, silra, shinra -종로 | jonglo | jongro, jongno, jokro, jokno -떡볶이 | ttogboki | tteokbokki, ttokppokki, topokki, toppogi +| 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. @@ -27,9 +26,11 @@ Hangul | Soli | Other Variations
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 @@ -138,11 +139,13 @@ Hangul | Soli | Other Variations - + + - + + @@ -258,11 +261,13 @@ Hangul | Soli | Other Variations - + + - + + @@ -271,7 +276,8 @@ Hangul | Soli | Other Variations - + + @@ -279,56 +285,57 @@ Hangul | Soli | Other Variations
waoawa
wouowo we
ttttt
ppppp
jjjjj tch cc
## Usage + - Hangul: 콩고물과 우유가 들어간 빙수는 차게 먹어야 특별한 맛이 잘 표현된다.

RR: Konggomulgwa uyuga deureogan bingsuneun chage meogeoya teukbyeolhan masi jal pyohyeondoenda.

MR: K'onggomulgwa uyuga tŭrŏgan pingsunŭn ch'age mŏgŏya t'ŭkpyŏrhan mashi chal p'yohyŏndoenda.

-

Soli: Konggomulgwa uyuga dulogan bingsunun chage mogoya tugbyolhan masi jal pyohyondoenda.

+

Soli: Konggomulgoa uyuga dulogan bingsunun chage mogoya tugbyolhan masi jal pyohyondoenda.

- Hangul: 참나무 타는 소리와 야경만큼 밤의 여유를 표현해 주는 것도 없다.

RR: Chamnamu taneun soriwa yagyeongmankeum bamui yeoyureul pyohyeonhae juneun geotdo eopda.

MR: Ch'amnamu t'anŭn soriwa yagyŏngmank'ŭm pamŭi yŏyurŭl p'yohyŏnhae chunŭn kŏtto ŏpta.

-

Soli: Chamnamu tanun soliwa yagyongmankum bamui yoyulul pyohyonhe junun gotdo obtda.

+

Soli: Chamnamu tanun solioa yagyongmankum bamui yoyulul pyohyonhe junun gotdo obtda.

- Hangul: 모든 인간은 태어날 때부터 자유로우며 그 존엄과 권리에 있어 평등하다. 인간은 천부적으로 이성과 양심을 부여받았으며 서로 형제애의 정신으로 행동하여야 한다.

RR: Modeun inganeun taeeonal ttaebuteo jayuroumyeo geu joneomgwa gwollie isseo pyeongdeunghada. inganeun cheonbujeogeuro iseonggwa yangsimeul buyeobadasseumyeo seoro hyeongjeaeui jeongsineuro haengdonghayeoya handa.

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.

-

Soli: Modun inganun teonal ttebuto jayuloumyo gu jonomgwa gwonlie iso pyongdunghada. inganun chonbujogulo isonggwa yangsimul buyobadasumyo solo hyongjeeui jongsinulo hengdonghayoya handa.

+

Soli: Modun inganun teonal tebuto jayuloumyo gu jonomgoa guonlie iso pyongdunghada. inganun chonbujogulo isonggoa yangsimul buyobadasumyo solo hyongjeeui jongsinulo hengdonghayoya handa.

- Cities -Hangul | Soli | Hangul | Soli | Hangul | Soli | Hangul | Soli | Hangul | Soli -:---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: -서울 | Soul | 평양 | Pyongyang | 부산 | Busan | 인천 | Inchon | 대구 | Degu -대전 | Dejon | 광주 | Gwangju | 수원 | Suwon | 울산 | Ulsan | 제주 | Jeju +| 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 - - 관북 Gwanbug
-  1. 함북 Hambug - - 관남 Gwannam
-  2. 함남 Hamnam - - 관서 Gwanso
-  3. 평북 Pyongbug
-  4. 평남 Pyongnam + - 관북 Goanbug
+  1. 함북 Hambug + - 관남 Goannam
+  2. 함남 Hamnam + - 관서 Goanso
+  3. 평북 Pyongbug
+  4. 평남 Pyongnam - 해서 Heso
-  5. 황해 Hwanghe - - 수도권 Sudogwon
-  6. 경기 Gyonggi - - 관동 Gwandong
-  7. 강원 Gangwon +  5. 황해 Hoanghe + - 수도권 Sudoguon
+  6. 경기 Gyonggi + - 관동 Goandong
+  7. 강원 Ganguon - 호서 Hoso
-  8. 충북 Chungbug
-  9. 충남 Chungnam +  8. 충북 Chungbug
+  9. 충남 Chungnam - 호남 Honam
-  10. 전북 Jonbug
-  11. 전남 Jonnam +  10. 전북 Jonbug
+  11. 전남 Jonnam - 영남 Yongnam
-  12. 경북 Gyongbug
-  13. 경남 Gyongnam +  12. 경북 Gyongbug
+  13. 경남 Gyongnam - 제주 Jeju
-  14. 제주 Jeju +  14. 제주 Jeju - Address - Hangul: 서울특별시 서초구 반포대로 59 101동 501호 (서초동, 서초아파트 자이) -
Soli: Banpodelo 59 101dong 501ho (Sochodong, Socho Apartment Jai), Sochogu, Soul, Korea -
Soli: Banpodelo 59 101-501 (Sochodong, Socho Apartment Jai), Sochogu, Soul, Korea +
Soli: Banpodelo 59 101dong 501ho (Sochodong, Socho Apartment Jai), Sochogu, Soul, Korea +
Soli: Banpodelo 59 101-501 (Sochodong, Socho Apartment Jai), Sochogu, Soul, Korea - Hangul: 서울특별시 서초구 반포대로 23길 6 (서초동) -
Soli: Banpodelo 23 Gil 6 (Sochodong), Sochogu, Soul, Korea +
Soli: Banpodelo 23 Gil 6 (Sochodong), Sochogu, Soul, Korea diff --git a/dist/index.html b/dist/index.html index 1ce3878..86fd612 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1,34 +1,44 @@ + + Soli + + + - - Soli - - - - - -
-

Soli

-

- Soli is a tool to convert a text from Hangul to Latin alphabet. -

-
-
- - - -
-
- - - -
-
-
- - - + +
+

Soli

+

Soli is a tool to convert a text from Hangul to Latin alphabet.

+
+
+ + + +
+
+ + + +
+
+
+ + diff --git a/dist/js/soli.js b/dist/js/soli.js index 0e6efd4..7643df4 100644 --- a/dist/js/soli.js +++ b/dist/js/soli.js @@ -1,75 +1,150 @@ //@date 2022 const dict = { - "ㄱ": "g", - "ㄴ": "n", - "ㄷ": "d", - "ㄹ": "l", - "ㅁ": "m", - "ㅂ": "b", - "ㅅ": "s", - "ㅇ": "ng", - "ㅈ": "j", - "ㅊ": "ch", - "ㅋ": "k", - "ㅌ": "t", - "ㅍ": "p", - "ㅎ": "h", - "ㄲ": "k", - "ㄸ": "tt", - "ㅃ": "pp", - "ㅆ": "s", - "ㅉ": "jj", - "ㄳ": "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", - "ㅘ": "wa", - "ㅙ": "oe", - "ㅚ": "oe", - "ㅞ": "oe", - "ㅝ": "wo", - "ㅟ": "wi", - "ㅢ": "ui" + ㄱ: "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 = ['', 'ㄱ', 'ㄲ', 'ㄳ', 'ㄴ', 'ㄵ', 'ㄶ', 'ㄷ', 'ㄹ', 'ㄺ', 'ㄻ', 'ㄼ', 'ㄽ', 'ㄾ', 'ㄿ', 'ㅀ', 'ㅁ', 'ㅂ', 'ㅄ', 'ㅅ', 'ㅆ', 'ㅇ', 'ㅈ', 'ㅊ', 'ㅋ', 'ㅌ', 'ㅍ', 'ㅎ']; +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)) { + 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 mi = parseInt((unicode - fi * 588) / 28); let ei = parseInt(unicode % 28); if (hangul_f[fi] && hangul_f[fi] != "ㅇ") { @@ -91,7 +166,10 @@ function convert() { 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])) { + 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); diff --git a/docs/assets/img/preview.png b/docs/assets/img/preview.png index bfd5deb..80c294a 100644 Binary files a/docs/assets/img/preview.png and b/docs/assets/img/preview.png differ