/// <summary> /// Returns a list of auto-complete matches and partial matches. /// </summary> /// <param name="fragment">the prefix of the word to search for.</param> /// <returns></returns> public IList <ICandidate> GetWords(string fragment) { return(_Trie.GetByPrefix(fragment).Select(word => (ICandidate) new Candidate(word.Value, word.Count)).ToList()); }