示例#1
0
        public void AddOrUpdate(string documentId, string text)
        {
            if (text.Length == 0)
            {
                return;
            }
            var words = GetAllowedNormalizedWords(parser.GetAllWords(text));

            documents[documentId] = new Document(words);
        }
示例#2
0
 private Dictionary <string, int> GetWordEntry(string text)
 {
     return(parser
            .GetAllWords(text)
            .GroupBy(x => x)
            .ToDictionary(x => x.Key, x => x.Count()));
 }
示例#3
0
        public void Run(string inputFile, string outputFile)
        {
            var input  = fileReader.ReadLines(inputFile);
            var parsed = textParser.GetAllWords(input);
            var bmp    = bitmapDrawer.DrawTags(parsed.ToArray());

            bmp.Save(outputFile, imageFormat);
        }