示例#1
0
        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);
        }
示例#2
0
        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;
        }