options

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JamoOption

type JamoOption struct {
	// contains filtered or unexported fields
}

option for decompose tense constants(된소리 자음, ㄲㄸㅃㅆㅉ), complex consonants(복합 자음, ㄳㄵㄶㄺㄻㄼㄽㄾㄿㅀㅄ), dipthongs(이중 모음, ㅐㅔㅘㅙㅚㅝㅞㅢ)

func Jamo

func Jamo() *JamoOption

get JamoOption that option for decompose tense constants(된소리 자음, ㄲㄸㅃㅆㅉ), complex consonants(복합 자음, ㄳㄵㄶㄺㄻㄼㄽㄾㄿㅀㅄ), dipthongs(이중 모음, ㅐㅔㅘㅙㅚㅝㅞㅢ)

func (JamoOption) GetFilterFunc

func (j JamoOption) GetFilterFunc() func(syllable string) string

GetDecomposeFilter method

func (*JamoOption) SetComplexConsonants

func (j *JamoOption) SetComplexConsonants(b bool) *JamoOption

Option to also decompose complex consonants(복합 자음, ㄳㄵㄶㄺㄻㄼㄽㄾㄿㅀㅄ) // default is true

// example
opts := options.Jamo().SetComplexConsonants(true) // ㄳ -> ㄳ

func (*JamoOption) SetDiphthong

func (j *JamoOption) SetDiphthong(b bool) *JamoOption

Option to also decompose dipthongs(이중 모음, ㅐㅒㅔㅖㅘㅙㅚㅝㅞㅢ) // default is true

// example
opts := options.Jamo().SetDiphthong(true) // ㅞ -> ㅜㅓㅣ

func (*JamoOption) SetTenseConsonants

func (j *JamoOption) SetTenseConsonants(b bool) *JamoOption

Option to also decompose tense consonants(된소리 자음, ㄲㄸㅃㅆㅉ) // default is true

// example
opts := options.Jamo().SetTenseConsonants(true) // ㄲ -> ㄱㄱ

type Options

type Options interface {
	GetFilterFunc() func(syllable string) string
}

type QwertyOption

type QwertyOption struct {
	// contains filtered or unexported fields
}

option for decompose Qwerty Keyboard form

func Qwerty

func Qwerty() *QwertyOption

get QwertyOption that option for decompose qwerty keyboard form // option1 is default option

func (QwertyOption) GetFilterFunc

func (q QwertyOption) GetFilterFunc() func(syllable string) string

GetDecomposeFilter method

func (*QwertyOption) SetShiftOption

func (q *QwertyOption) SetShiftOption(s ShiftOption) *QwertyOption

Option to also decompose tense consonants(된소리 자음, ㄲㄸㅃㅆㅉ) // default is true

// example
opts := options.Qwerty().SetTenseConsonants(true) // ㄲ -> ㄱㄱ

type ShiftOption

type ShiftOption int
const (
	// default option // none shift option
	/*
		"ㄳ" -> "ㄱㅅ"
		"ㄲ" -> "ㄲ"
		"ㅒ" -> "ㅒ"
	*/
	None ShiftOption = iota
	// option1 // first shift option for qwerty
	/*
		"ㄳ" -> "ㄱㅅ"
		"ㄲ" -> "ㄱㄱ"
		"ㅒ" -> "ㅑㅣ"
	*/
	QwertyShiftOption1
	// option2 // second shift option for qwerty
	/*
		"ㄳ" -> "ㄱㅅ"
		"ㄲ" -> "ㄱㄱ"
		"ㅒ" -> "ㅐㅐ"
	*/
	QwertyShiftOption2
)

Jump to

Keyboard shortcuts

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