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

            documents[documentId] = new Document(words);
        }
Exemple #2
0
 private Dictionary <string, int> GetWordEntry(string text)
 {
     return(parser
            .GetAllWords(text)
            .GroupBy(x => x)
            .ToDictionary(x => x.Key, x => x.Count()));
 }
Exemple #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);
        }