장준영

refactor : 특수문자, 숫자, 영어 표준화 함수 수정

......@@ -92,18 +92,28 @@ const isVowelSpecial = (preLetter, letter, nextLetter) => {
const standardizeSpecialConsonent = (letter) => {
switch (letter) {
case ('g', 'ㅑ'):
return 'ㅏ';
case ('ㅗ', 'ㅛ'):
return 'ㅗ';
case ('ㅐ', 'ㅒ', 'ㅔ', 'ㅖ', 'ㅙ', 'ㅚ', 'ㅝ', 'ㅞ'):
return 'ㅐ';
case ('ㅜ', 'ㅠ'):
return 'ㅜ';
case ('ㅓ', 'ㅕ'):
return 'ㅓ';
case ('ㅟ', 'ㅢ', 'ㅣ'):
return 'ㅣ';
case ('g', 'k', 'G', 'K'):
return 'ㄱ';
case ('b', 'v', 'B', 'V'):
return 'ㅂ';
case ('P', 'p', 'F', 'f'):
return 'ㅍ';
case ('n', 'L', 'N'):
return 'ㄴ';
case ('s', 'A', 'S', 'C', 'c'):
return 'ㅅ';
case ('d', 't', 'E'):
return 'ㄷ';
case ('o', 'O'):
return 'ㅇ';
case ('r', 'R'):
return 'ㄹ';
case ('j', 'z', 'J', 'Z'):
return 'ㅈ';
case ('m', '口', 'M'):
return 'ㅁ';
case ('h', 'H'):
return 'ㅎ';
default:
return letter;
}
......@@ -111,17 +121,13 @@ const standardizeSpecialConsonent = (letter) => {
const standardizeSpecialVowel = (letter) => {
switch (letter) {
case ('g', 'ㅑ'):
case ('a', 'A'):
return 'ㅏ';
case ('ㅗ', 'ㅛ'):
return 'ㅗ';
case ('ㅐ', 'ㅒ', 'ㅔ', 'ㅖ', 'ㅙ', 'ㅚ', 'ㅝ', 'ㅞ'):
return 'ㅐ';
case ('ㅜ', 'ㅠ'):
return 'ㅜ';
case ('ㅓ', 'ㅕ'):
case ('u', 'U'):
return 'ㅓ';
case ('ㅟ', 'ㅢ', 'ㅣ'):
case ('@', 'H'):
return 'ㅐ';
case ('l', '1', 'i', 'I', '!'):
return 'ㅣ';
default:
return letter;
......