Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-2-capstone-design2
/
2015104216
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
장준영
2020-12-12 03:22:03 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3a2d61406870a66c7013bcf1ae5b6b077b67810a
3a2d6140
1 parent
b4fa02ca
refactor : 특수문자, 숫자, 영어 표준화 함수 수정
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
21 deletions
server/service/standardization.js
server/service/standardization.js
View file @
3a2d614
...
...
@@ -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
;
...
...
Please
register
or
login
to post a comment