Documentation ¶
Index ¶
- Variables
- func AddBreathing(ch rune, breathing Breathing) rune
- func AddDiacritic(base []rune, diacritic rune) []rune
- func Base(ch rune) rune
- func DisplayAccentuation(accentuation Accentuation) string
- func DisplayWord(parts []string) string
- func IsVowel(ch rune) bool
- func MakeOxytone(word string) string
- func MakeParoxytone(word string) string
- func MakePerispomenon(word string) string
- func MakeProparoxytone(word string) string
- func MakeProperispomenon(word string) string
- func OnPenult(w string, default_short bool) string
- func Persistent(word string, lemma string, defaultShort bool) string
- func Rebreath(word string) string
- func Recessive(w string, treat_final_AI_OI_short bool, default_short bool) string
- func RemoveAccentFromRune(r rune) (rune, bool)
- func RemoveAccentsFromString(s string) string
- func Syllabify(word string) []string
- type Accent
- type Accentuation
- type Breathing
- type ByAccentReverse
- type Diacritic
- type ExtractDiacriticFunction
- type Length
- type RemoveDiacriticFunction
- type RuneInterface
- type Subscript
Constants ¶
This section is empty.
Variables ¶
var Accents []RuneInterface = []RuneInterface{ACUTE, GRAVE, CIRCUMFLEX, OXIA, VARIA, PERISPOMENI}
var Accentuations []Accentuation = []Accentuation{OXYTONE, PERISPOMENON, PAROXYTONE, PROPERISPOMENON, PROPAROXYTONE}
var Breathings []RuneInterface = []RuneInterface{SMOOTH, ROUGH}
var Diacritics []RuneInterface = []RuneInterface{DIAERESIS}
var Lengths []RuneInterface = []RuneInterface{SHORT, LONG, UNKNOWN}
var StripAccents = removeDiacritic(Accents)
var Subscripts []RuneInterface = []RuneInterface{IOTA}
Functions ¶
func AddBreathing ¶
AddBreathing attaches the specified breathing to a character
func AddDiacritic ¶
AddDiacritic attaches the specified diacritic to the specified character
func DisplayAccentuation ¶
func DisplayAccentuation(accentuation Accentuation) string
func DisplayWord ¶
DisplayWord is a helper function that displays a syllable array as a string.
func IsVowel ¶
IsVowel returns true if a character is a vowel. Accents and iota subscripts are ignored
func MakeOxytone ¶
func MakeParoxytone ¶
func MakePerispomenon ¶
func MakeProparoxytone ¶
func MakeProperispomenon ¶
func Persistent ¶
Persistent returns the accented form of a word. Returns an empty string if the dictionary entry contains no accent. func Persistent(w string, lemma string, default_short=False) {
func Recessive ¶
Recessive does something that I am sure is interesting, but I don't know what. func Recessive(w string, treat_final_AI_OI_short=True, default_short=False)
func RemoveAccentFromRune ¶
RemoveAccentFromRune strips all accents from a character. Returns true if the character is valid for a standard greek string.
func RemoveAccentsFromString ¶
Types ¶
type Accentuation ¶
type Accentuation int
const ( NO_ACCENTUATION Accentuation = 0 OXYTONE Accentuation = 1 PERISPOMENON Accentuation = 2 PAROXYTONE Accentuation = 3 PROPERISPOMENON Accentuation = 4 PROPAROXYTONE Accentuation = 5 )
func (Accentuation) Character ¶
func (e Accentuation) Character() Accent
func (Accentuation) Name ¶
func (e Accentuation) Name() string
func (Accentuation) Position ¶
func (e Accentuation) Position() int
func (Accentuation) Value ¶
func (e Accentuation) Value() (int, Accent)
type ByAccentReverse ¶
type ByAccentReverse []Accentuation
func (ByAccentReverse) Len ¶
func (a ByAccentReverse) Len() int
func (ByAccentReverse) Less ¶
func (a ByAccentReverse) Less(i, j int) bool
func (ByAccentReverse) Swap ¶
func (a ByAccentReverse) Swap(i, j int)
type ExtractDiacriticFunction ¶
type ExtractDiacriticFunction func(ch rune) RuneInterface
type RemoveDiacriticFunction ¶
type RuneInterface ¶
type RuneInterface interface {
Rune() rune
}