Documentation ¶
Overview ¶
Package t9 provides tools for looking up words that match particular digits based on the T9 algorithm.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDigits ¶
CheckDigits validates the designated digits and returns an error, if any.
Types ¶
type T9 ¶
type T9 interface { // Inserts a dictionary word into t9 lookup structure. InsertWord(word string) error // Retrieves any number of dictionary words from t9 lookup structure based on // prefix match or exact match, depending on `exact`. GetWords(digits string, exact bool) ([]string, error) }
T9 interface enables insertion of any dictionary word and then retrieval based on a prefix or exact-only match of t9 digits.
func NewCachingT9 ¶
NewCachingT9 instantiates a new T9 structure that caches lookup results using an LRU cache of the designated maximum size.
Click to show internal directories.
Click to hide internal directories.