Skip to content

golang-jamo library initialized

Compare
Choose a tag to compare
@ymw0407 ymw0407 released this 06 Apr 14:11
· 23 commits to main since this release

Full Changelog: https://github.com/ymw0407/golang-jamo/commits/v0.0.1

  • decomposing hangeul("한글") into syllables("음절") function added
  • option for decomposing syllables more added
    1. Qwerty: decompose syllables more with qwerty keyboard layout
      QwertyDecomposer = map[string]string{
        "ㅘ": "ㅗㅏ",
        "ㅙ": "ㅗㅐ",
        "ㅚ": "ㅗㅣ",
        "ㅝ": "ㅜㅓ",
        "ㅞ": "ㅜㅔ",
        "ㅟ": "ㅜㅣ",
        "ㅢ": "ㅡㅣ",
        "ㄳ": "ㄱㅅ",
        "ㄵ": "ㄴㅈ",
        "ㄶ": "ㄴㅎ",
        "ㄺ": "ㄹㄱ",
        "ㄻ": "ㄹㅁ",
        "ㄼ": "ㄹㅂ",
        "ㄽ": "ㄹㅅ",
        "ㄾ": "ㄹㅌ",
        "ㄿ": "ㄹㅍ",
        "ㅀ": "ㄹㅎ",
        "ㅄ": "ㅂㅅ",
      }
      • 2 addtional shiftOptions available
        1. QwertyShiftOption1
          QwertyOnlyShiftDecomposer1 = map[string]string{
            "ㄲ": "ㄱㄱ",
            "ㄸ": "ㄷㄷ",
            "ㅃ": "ㅂㅂ",
            "ㅆ": "ㅅㅅ",
            "ㅉ": "ㅈㅈ",
            "ㅒ": "ㅑㅣ",
            "ㅖ": "ㅕㅣ",
          }
        2. QwertyShiftOption2
          QwertyOnlyShiftDecomposer2 = map[string]string{
          "ㄲ": "ㄱㄱ",
          "ㄸ": "ㄷㄷ",
          "ㅃ": "ㅂㅂ",
          "ㅆ": "ㅅㅅ",
          "ㅉ": "ㅈㅈ",
          "ㅒ": "ㅐㅐ",
          "ㅖ": "ㅔㅔ",
          }
    2. Jamo: decompose syllables more with jamo options(complex consonants, tense consonants, diphthong)
      1. TenseConsonants(된소리 자음)
        TenseConsonantsDecomposer = map[string]string{
          "ㄲ": "ㄱㄱ",
          "ㄸ": "ㄷㄷ",
          "ㅃ": "ㅂㅂ",
          "ㅆ": "ㅅㅅ",
          "ㅉ": "ㅈㅈ",
        }
      2. ComplexConsonants(복합 자음)
        ComplexConsonantsDecomposer = map[string]string{
          "ㄳ": "ㄱㅅ",
          "ㄵ": "ㄴㅈ",
          "ㄶ": "ㄴㅎ",
          "ㄺ": "ㄹㄱ",
          "ㄻ": "ㄹㅁ",
          "ㄼ": "ㄹㅂ",
          "ㄽ": "ㄹㅅ",
          "ㄾ": "ㄹㅌ",
          "ㄿ": "ㄹㅍ",
          "ㅀ": "ㄹㅎ",
          "ㅄ": "ㅂㅅ",
        }
      3. Diphthong(이중 모음)
        DiphthongDecomposer = map[string]string{
          "ㅐ": "ㅏㅣ",
          "ㅒ": "ㅑㅣ",
          "ㅔ": "ㅓㅣ",
          "ㅖ": "ㅕㅣ",
          "ㅘ": "ㅗㅏ",
          "ㅙ": "ㅗㅏㅣ",
          "ㅚ": "ㅗㅣ",
          "ㅝ": "ㅜㅓ",
          "ㅞ": "ㅜㅓㅣ",
          "ㅟ": "ㅜㅣ",
          "ㅢ": "ㅡㅣ",
        }