Skip to content

Commit

Permalink
Korean error resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
fluffy-melli committed Jan 15, 2025
1 parent 035ba1a commit 0f59e60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions replace.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import (
)

func ChangeUnicode(unicode string) string {
unicode = strings.ToLower(unicode)
//unicode = strings.ToLower(unicode)
unicode = RemoveDomain(unicode)
unicode = RemoveDuplicate(unicode)
unicode = RemoveNumber(unicode)
unicode = EnglishToKo(unicode)
unicode = strings.ReplaceAll(unicode, "ㅿ", "ㅅ")
unicode = strings.ReplaceAll(unicode, "^", "ㅅ")
unicode = strings.ReplaceAll(unicode, "^", "ㅅ")
Expand Down Expand Up @@ -118,11 +122,7 @@ func ChangeUnicode(unicode string) string {
unicode = strings.ReplaceAll(unicode, "c", "ㄷ")
unicode = strings.ReplaceAll(unicode, "b", "ㅂ")
unicode = strings.ReplaceAll(unicode, "u", "ㅂ")
unicode = strings.ReplaceAll(unicode, "v", "ㅂㅂ")
unicode = RemoveDomain(unicode)
unicode = RemoveDuplicate(unicode)
unicode = RemoveNumber(unicode)
unicode = EnglishToKo(unicode)
unicode = strings.ReplaceAll(unicode, "v", "ㅂ")
dism := gohangul.Disassemble(unicode)
unicode = gohangul.Assemble(dism)
unicode = PreGeneral(unicode)
Expand Down
2 changes: 1 addition & 1 deletion test/speed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ func Benchmark0(b *testing.B) {
}

func Test0(t *testing.T) {
fmt.Println(korcen.EnglishToKo(""))
fmt.Println(korcen.Check(""))
}

0 comments on commit 0f59e60

Please sign in to comment.