Example #1
0
        public IEnumerable <KeywordStat> GetPageStats(string html)
        {
            var htmlDocument   = _htmlDocumentFactory.Create(html);
            var metaKeywordTag = _metaKeywordsTagParser.GetMetaKeywordTag(htmlDocument.DocumentNode);
            var keywords       = _metaKeywordsTagParser.GetKeywordsFromMetaKeywordTag(metaKeywordTag);

            var result = new List <KeywordStat>();

            keywords.ToList().ForEach(k => result.Add(new KeywordStat
            {
                Keyword = k,
                Count   = _bodyParser.CountKeywordOccurrences(htmlDocument.DocumentNode, k)
            }));
            return(result);
        }