Is there anyway that I can combine this Korean consonants and vowels into a complete character.
For example if I have
ㄱㅏㅁㅅㅏㅎㅏㅂㄴㅣㄷㅏ
It would be
감사합니다
Is there any way to do this? I can only think of bruteforcing every case that would have to count many many cases.
Below is my try. Not optimal and take too much time.
if strings.Contains(input_str, "ㅏㄴㅈ") {
input_str = strings.Replace(input_str, "ㅇㅏㄴㅈ", "앉", -1)
}
if strings.Contains(input_str, "ㅏㄹㅂ") {
input_str = strings.Replace(input_str, "ㅂㅏㄹㅂ", "밟", -1)
}
if strings.Contains(input_str, "ㅏㅂㅅ") {
input_str = strings.Replace(input_str, "ㄱㅏㅂㅅ", "값", -1)
}