jamo

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComposeHangeul added in v1.0.0

func ComposeHangeul(syllables string) (composedHangeuls []string, err error)

Compose Syllables into hangeul word(not words)

// example
fmt.Println(ComposeHangeul("ㅎㅏㄴㄱㅡㄹ")) // "한글"

* TODO: Flexible to better suit user intent

func DecomposeHangeul

func DecomposeHangeul(hangeuls string, opts ...options.Options) (decomposedHangeul string)

Decompose Hangeul words into Syllables

// example
fmt.Println(DecomposeHangeul("한글 is hangeul!")) // "ㅎㅏㄴㄱㅡㄹ is hangeul!"

* TODO: Allow to apply serveral option (now only first option can apply)

Types

type SyllableType added in v1.0.0

type SyllableType int

classify hangeul's syllable into consonant, vowel and undefined

const (
	Undefined SyllableType = iota
	Consonant
	Vowel
)

func ClassifySyllables added in v1.0.0

func ClassifySyllables(syllable rune) SyllableType

Classify Syllables into hangeul's consonant, vowel and undefined

// example
fmt.Println(ClassifySyllables("ㅎ")) // jamo.Consonant

* TODO: Flexible to better suit user intent

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL