Git Product home page Git Product logo

hangul's Introduction

한글 음소 분리기

한글을 초성, 중성, 종성으로 분리하여줍니다. 또한, 초성, 중성, 종성을 조합하여 글자를 만들 수 있습니다.

Docs

SeparateToRune(r rune) ([]rune, error)

한글 한 글자를 []rune으로 나눈다.

SeparateToInt(r rune) ([]int, error)

한글 한 글자를 []int로 나눈다.

BuildOfInt(f, s, t int) (rune, error)

초성, 중성, 종성을 int로 받아 한 글자로 조합하여 rune으로 반환한다.

BuildOfRune(f, s, t rune) (rune, error)

초성, 중성, 종성을 rune으로 받아 한 글자로 조합하여 rune으로 반환한다.

Choseong(n int) (rune, error)

n번째 초성을 rune으로 반환한다.

Jungseong(n int) (rune, error)

n번째 중성을 rune으로 반환한다.

Jongseong(n int) (rune, error)

n번째 종성을 rune으로 반환한다.

IndexOfChoseong(r rune) (int, error)

초성의 인덱스를 반환한다. (없을 시 -1 반환)

IndexOfJungseong(r rune) (int, error)

중성의 인덱스를 반환한다. (없을 시 -1 반환)

IndexOfJongseong(r rune) (int, error)

종성의 인덱스를 반환한다. (없을 시 -1 반환)

IsHangulLetter(r rune) bool

초성이아닌 한글인지 판단하여 bool으로 반환.

IsHangul(r rune) bool

초성 여부와 상관없이 한글인지 판단하여 bool으로 반환.

참고

한글 표

Idx 초성 중성 종성 Idx 초성 중성 종성
0 없음 14
1 15
2 16
3 17
4 18
5 19 -
6 20 -
7 21 - -
8 22 - -
9 23 - -
10 24 - -
11 25 - -
12 26 - -
13 27 - -

hangul's People

Contributors

kimmachinegun avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.