public static WordDict LoadFrom(Stream input) { var decoder = new DawgDecoder(Dawg.FILEVERSION); var dawg = decoder.Decode(input); var wordUtil = new WordDict(); foreach (var pair in dawg.MatchsPrefix(null)) { wordUtil.AddInternal(pair.Key, pair.Value); } return(wordUtil); }
public static WordDict LoadFrom(Stream input) { var decoder = new DawgDecoder(Dawg.FILEVERSION); var dawg = decoder.Decode(input); var wordUtil = new WordDict(); foreach (var pair in dawg.MatchsPrefix(null)) { wordUtil.AddInternal(pair.Key, pair.Value); } return wordUtil; }