Versions in this module Expand all Collapse all v1 v1.0.1 May 6, 2021 Changes in this version + var Debug = false + func Contains(slice []string, value string) bool + type Context struct + Input string + Regexp *regexp2.Regexp + func (c Context) IsDefined() bool + func (c Context) Matches(s string) (bool, error) + func (c Context) String() string + type Filter struct + Output string + Regexp *regexp2.Regexp + func (f Filter) Apply(s string) (string, error) + type MOPSyllDef struct + IncludePhnDelim bool + Onsets []string + PhnDelim string + Stress []string + StressPlcmnt StressPlacement + SyllDelim string + Syllabic []string + func (def MOPSyllDef) ContainsSyllabic(phonemes []string) bool + func (def MOPSyllDef) IncludePhonemeDelimiter() bool + func (def MOPSyllDef) IsDefined() bool + func (def MOPSyllDef) IsStress(symbol string) bool + func (def MOPSyllDef) IsSyllabic(phoneme string) bool + func (def MOPSyllDef) PhonemeDelimiter() string + func (def MOPSyllDef) StressPlacement() StressPlacement + func (def MOPSyllDef) SyllableDelimiter() string + func (def MOPSyllDef) ValidSplit(left0 []string, right0 []string) bool + type PhonemeSet struct + PhnDelim Regexp + SyllDelim Regexp + SyllDelimIncludesPhnDelim bool + Symbols []string + func LoadPhonemeSetFile(fName string, syllDelimIncludesPhnDelim bool, ...) (PhonemeSet, error) + func NewPhonemeSet(symbols []string, syllDelimIncludesPhnDelim bool, ...) (PhonemeSet, error) + func (ps PhonemeSet) SplitTranscription(trans string) ([]string, error) + type Prefilter struct + Output string + Regexp *regexp2.Regexp + func (pf Prefilter) Apply(s string) (string, error) + type Regexp struct + RE *regexp.Regexp + Source string + type Rule struct + Input string + LeftContext Context + LineNumber int + Output []string + RightContext Context + func (r Rule) String() string + type RuleSet struct + CharacterSet []string + Content string + Debug bool + DefaultPhoneme string + DowncaseInput bool + Filters []Filter + PhonemeDelimiter string + PhonemeSet PhonemeSet + Prefilters []Prefilter + Rules []Rule + RulesApplied map[string]int + RulesAppliedMutex *sync.RWMutex + Syllabifier Syllabifier + SyllableDelimiter string + Tests []Test + Vars map[string]string + func LoadFile(fName string) (RuleSet, error) + func LoadURL(url string) (RuleSet, error) + func (rs RuleSet) Apply(s string) ([]string, error) + func (rs RuleSet) Test() TestResult + type StressPlacement int + const AfterSyllabic + const BeforeSyllabic + const FirstInSyllable + const Undefined + type SyllDef interface + ContainsSyllabic func(phonemes []string) bool + IncludePhonemeDelimiter func() bool + IsDefined func() bool + IsStress func(symbol string) bool + IsSyllabic func(symbol string) bool + PhonemeDelimiter func() string + StressPlacement func() StressPlacement + SyllableDelimiter func() string + ValidSplit func(left []string, right []string) bool + type SyllTest struct + Input string + Output string + type Syllabifier struct + Debug bool + PhonemeSet PhonemeSet + StressPlacement StressPlacement + SyllDef SyllDef + Tests []SyllTest + func LoadSyllFile(fName string) (Syllabifier, error) + func LoadSyllURL(url string) (Syllabifier, error) + func (s Syllabifier) IsDefined() bool + func (s Syllabifier) SyllabifyFromPhonemes(phns []string) string + func (s Syllabifier) SyllabifyFromString(trans string) (string, error) + func (s Syllabifier) Test() TestResult + type Test struct + Input string + Output []string + type TestResult struct + Errors []string + FailedTests []string + Warnings []string + func (tr TestResult) AllErrors() []string + func (tr TestResult) AllMessages() []string + func (tr TestResult) Failed() bool + func (tr TestResult) Strings() []string