Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Alphabet = [26]rune{ ToRune("a"), ToRune("b"), ToRune("c"), ToRune("d"), ToRune("e"), ToRune("f"), ToRune("g"), ToRune("h"), ToRune("i"), ToRune("j"), ToRune("k"), ToRune("l"), ToRune("m"), ToRune("n"), ToRune("o"), ToRune("p"), ToRune("q"), ToRune("r"), ToRune("s"), ToRune("t"), ToRune("u"), ToRune("v"), ToRune("w"), ToRune("x"), ToRune("y"), ToRune("z"), }
View Source
var RuneToLetters = map[rune]int{ ToRune("a"): ToAlphabetIndex(ToRune("a")), ToRune("b"): ToAlphabetIndex(ToRune("b")), ToRune("c"): ToAlphabetIndex(ToRune("c")), ToRune("d"): ToAlphabetIndex(ToRune("d")), ToRune("e"): ToAlphabetIndex(ToRune("e")), ToRune("f"): ToAlphabetIndex(ToRune("f")), ToRune("g"): ToAlphabetIndex(ToRune("g")), ToRune("h"): ToAlphabetIndex(ToRune("h")), ToRune("i"): ToAlphabetIndex(ToRune("i")), ToRune("j"): ToAlphabetIndex(ToRune("j")), ToRune("k"): ToAlphabetIndex(ToRune("k")), ToRune("l"): ToAlphabetIndex(ToRune("l")), ToRune("m"): ToAlphabetIndex(ToRune("m")), ToRune("n"): ToAlphabetIndex(ToRune("n")), ToRune("o"): ToAlphabetIndex(ToRune("o")), ToRune("p"): ToAlphabetIndex(ToRune("p")), ToRune("q"): ToAlphabetIndex(ToRune("q")), ToRune("r"): ToAlphabetIndex(ToRune("r")), ToRune("s"): ToAlphabetIndex(ToRune("s")), ToRune("t"): ToAlphabetIndex(ToRune("t")), ToRune("u"): ToAlphabetIndex(ToRune("u")), ToRune("v"): ToAlphabetIndex(ToRune("v")), ToRune("w"): ToAlphabetIndex(ToRune("w")), ToRune("x"): ToAlphabetIndex(ToRune("x")), ToRune("y"): ToAlphabetIndex(ToRune("y")), ToRune("z"): ToAlphabetIndex(ToRune("z")), }
Functions ¶
func CreateIntDictionaryTree ¶
func CreateIntDictionaryTree(filename string) (Node, []WordDetails)
* Creates a trie of WordDetails where int is used instead of runes The int is the index of a letter in Alphabet
func ToAlphabetIndex ¶
Types ¶
type LetterCount ¶
type Node ¶
type Node struct { Children map[int]*Node Words []*WordDetails }
type WordDetails ¶
type WordDetails struct { Word string SortedLetterCounts []LetterCount }
func NewWordDetails ¶
func NewWordDetails(word string) WordDetails
type WordDetailsSlice ¶
type WordDetailsSlice []WordDetails
Click to show internal directories.
Click to hide internal directories.