Versions in this module Expand all Collapse all v0 v0.1.4 Nov 9, 2025 v0.1.3 Nov 7, 2025 v0.1.2 Nov 7, 2025 v0.1.1 Nov 7, 2025 v0.1.0 Nov 7, 2025 Changes in this version + var DiacriticsIgnoringMatcherInstance = NewDiacriticsIgnoringMatcher() + func GetApostrophe(input string) string + func GetDefaultLookupMap() map[string][]string + func LoadLookupMap(filePath string) (map[string][]string, error) + func LoadWordList(filePath string) ([]string, error) + func NormalizeForLM(s string) string + type AtomicCounter struct + func NewAtomicCounter() *AtomicCounter + func (ac *AtomicCounter) GetAndIncrement() int + type Candidate struct + Content string + Score float32 + func GetEndCandidate() *Candidate + func GetStartCandidate() *Candidate + func NewCandidate(content string) *Candidate + type Candidates struct + Candidates []*Candidate + Word string + func GetEndCandidates() *Candidates + func NewCandidates(word string, candidates []*Candidate) *Candidates + type CaseType int + const DefaultCase + const LowerCase + const MixedCase + const TitleCase + const UpperCase + type CharMatcher interface + Matches func(c rune) []rune + type CharacterGraph struct + Root *Node + func NewCharacterGraph() *CharacterGraph + func (cg *CharacterGraph) AddWord(word string, nodeType NodeType) *Node + func (cg *CharacterGraph) ContainsWord(word string) bool + func (cg *CharacterGraph) GetAllNodes() []*Node + func (cg *CharacterGraph) GetNode(word string) *Node + func (cg *CharacterGraph) GetNodeCount() int + type CharacterGraphDecoder struct + CheckNearKeySubstitution bool + Graph *CharacterGraph + MaxPenalty float64 + func NewCharacterGraphDecoder(graph *CharacterGraph) *CharacterGraphDecoder + func (cgd *CharacterGraphDecoder) GetSuggestions(input string, matcher CharMatcher) []string + type DiacriticsIgnoringMatcher struct + func NewDiacriticsIgnoringMatcher() *DiacriticsIgnoringMatcher + func (dim *DiacriticsIgnoringMatcher) Matches(c rune) []rune + type Hypothesis struct + Current *Candidate + History []*Candidate + Previous *Hypothesis + Score float32 + func GetBestHypothesis(hypotheses []*Hypothesis) *Hypothesis + func NewHypothesis() *Hypothesis + func (h *Hypothesis) Equals(other *Hypothesis) bool + func (h *Hypothesis) Hash() int + type Node struct + Char rune + EpsilonNodes []*Node + Index int + Nodes map[rune]*Node + Type NodeType + Word string + func NewNode(index int, char rune, nodeType NodeType, word string) *Node + func (n *Node) AddChild(index int, c rune, nodeType NodeType, word string) *Node + func (n *Node) ConnectEpsilon(node *Node) bool + func (n *Node) Debug() string + func (n *Node) Equals(other *Node) bool + func (n *Node) GetAllChildNodes() []*Node + func (n *Node) GetChildList(c rune) []*Node + func (n *Node) GetChildListMulti(chars []rune) []*Node + func (n *Node) GetImmediateChild(c rune) *Node + func (n *Node) GetImmediateChildNodeIterable() []*Node + func (n *Node) GetImmediateChildNodes() []*Node + func (n *Node) HasChild(c rune) bool + func (n *Node) HasEpsilonConnection() bool + func (n *Node) HasImmediateChild(c rune) bool + func (n *Node) Hash() int + func (n *Node) String() string + type NodeType int + const TypeEmpty + const TypeEnding + const TypeGraphRoot + const TypeWord + type Operation int + const Deletion + const Insertion + const NA + const NoError + const Substitution + const Transposition + type StemEndingGraph struct + EndingGraph *CharacterGraph + StemGraph *CharacterGraph + func NewStemEndingGraph(stemWords []string, endingsPath string) (*StemEndingGraph, error) + func NewStemEndingGraphFromMorphology(morph *morphology.TurkishMorphology, endingsPath string) (*StemEndingGraph, error) + func (seg *StemEndingGraph) GetEndingGraph() *CharacterGraph + func (seg *StemEndingGraph) GetStemGraph() *CharacterGraph + type TurkishSentenceNormalizer struct + AlwaysApplyDeasciifier bool + CommonConnectedSuffixes map[string]bool + CommonSplits map[string]string + LookupFromASCII map[string][]string + LookupFromGraph map[string][]string + LookupManual map[string][]string + NoSplitWords map[string]bool + Replacements map[string]string + SpellChecker *TurkishSpellChecker + func NewTurkishSentenceNormalizer(stemWords []string, resourcesPath string) (*TurkishSentenceNormalizer, error) + func (tsn *TurkishSentenceNormalizer) Normalize(sentence string) string + func (tsn *TurkishSentenceNormalizer) NormalizeWithBeamSearch(sentence string) string + type TurkishSentenceNormalizerAdvanced struct + AlwaysApplyDeasciifier bool + AnalysisConverter *analysis.InformalAnalysisConverter + CommonConnectedSuffixes map[string]bool + CommonSplits map[string]string + InformalMorphology *morphology.TurkishMorphology + LanguageModel lm.LanguageModel + LookupFromASCII map[string][]string + LookupFromGraph map[string][]string + LookupManual map[string][]string + Morphology *morphology.TurkishMorphology + NoSplitWords map[string]bool + Replacements map[string]string + SpellChecker *TurkishSpellChecker + func NewTurkishSentenceNormalizerAdvanced(morph *morphology.TurkishMorphology, dataRoot string) (*TurkishSentenceNormalizerAdvanced, error) + func (tsn *TurkishSentenceNormalizerAdvanced) Normalize(sentence string) string + type TurkishSentenceNormalizerEnhanced struct + Graph *CharacterGraph + LookupManual map[string][]string + SpellChecker *CharacterGraphDecoder + WordDictionary map[string]bool + func NewTurkishSentenceNormalizerEnhanced() (*TurkishSentenceNormalizerEnhanced, error) + func (tsne *TurkishSentenceNormalizerEnhanced) Normalize(sentence string) string + type TurkishSentenceNormalizerWithLexicon struct + Graph *CharacterGraph + Lexicon *lexicon.RootLexicon + LookupManual map[string][]string + SpellChecker *CharacterGraphDecoder + WordDictionary map[string]bool + func NewTurkishSentenceNormalizerWithLexicon() (*TurkishSentenceNormalizerWithLexicon, error) + func (tsnl *TurkishSentenceNormalizerWithLexicon) Normalize(sentence string) string + type TurkishSpellChecker struct + CharMatcher CharMatcher + Decoder *CharacterGraphDecoder + LanguageModel lm.LanguageModel + Morphology interface{} + func NewTurkishSpellChecker(stemWords []string, endingsPath string, matcher CharMatcher) (*TurkishSpellChecker, error) + func (tsc *TurkishSpellChecker) Check(word string) bool + func (tsc *TurkishSpellChecker) RankByFrequency(suggestions []string, frequencies map[string]int) []string + func (tsc *TurkishSpellChecker) SuggestForWord(word string) []string + func (tsc *TurkishSpellChecker) SuggestForWordForNormalization(word string, leftContext string, rightContext string) []string + func (tsc *TurkishSpellChecker) SuggestForWordWithContext(word string, previous string, next string) []string