public void AddOrUpdate(string documentId, string text) { if (text.Length == 0) { return; } var words = GetAllowedNormalizedWords(parser.GetAllWords(text)); documents[documentId] = new Document(words); }
private Dictionary <string, int> GetWordEntry(string text) { return(parser .GetAllWords(text) .GroupBy(x => x) .ToDictionary(x => x.Key, x => x.Count())); }
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); }